AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi
aws.auditmanager.getControl
Explore with Pulumi AI
Data source for managing an AWS Audit Manager Control.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.auditmanager.getControl({
name: "1. Risk Management",
type: "Standard",
});
import pulumi
import pulumi_aws as aws
example = aws.auditmanager.get_control(name="1. Risk Management",
type="Standard")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/auditmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := auditmanager.LookupControl(ctx, &auditmanager.LookupControlArgs{
Name: "1. Risk Management",
Type: "Standard",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Auditmanager.GetControl.Invoke(new()
{
Name = "1. Risk Management",
Type = "Standard",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.auditmanager.AuditmanagerFunctions;
import com.pulumi.aws.auditmanager.inputs.GetControlArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = AuditmanagerFunctions.getControl(GetControlArgs.builder()
.name("1. Risk Management")
.type("Standard")
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:auditmanager:getControl
Arguments:
name: 1. Risk Management
type: Standard
With Framework Resource
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.auditmanager.getControl({
name: "1. Risk Management",
type: "Standard",
});
const example2 = aws.auditmanager.getControl({
name: "2. Personnel",
type: "Standard",
});
const exampleFramework = new aws.auditmanager.Framework("example", {
name: "example",
controlSets: [
{
name: "example",
controls: [{
id: example.then(example => example.id),
}],
},
{
name: "example2",
controls: [{
id: example2.then(example2 => example2.id),
}],
},
],
});
import pulumi
import pulumi_aws as aws
example = aws.auditmanager.get_control(name="1. Risk Management",
type="Standard")
example2 = aws.auditmanager.get_control(name="2. Personnel",
type="Standard")
example_framework = aws.auditmanager.Framework("example",
name="example",
control_sets=[
{
"name": "example",
"controls": [{
"id": example.id,
}],
},
{
"name": "example2",
"controls": [{
"id": example2.id,
}],
},
])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/auditmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := auditmanager.LookupControl(ctx, &auditmanager.LookupControlArgs{
Name: "1. Risk Management",
Type: "Standard",
}, nil)
if err != nil {
return err
}
example2, err := auditmanager.LookupControl(ctx, &auditmanager.LookupControlArgs{
Name: "2. Personnel",
Type: "Standard",
}, nil)
if err != nil {
return err
}
_, err = auditmanager.NewFramework(ctx, "example", &auditmanager.FrameworkArgs{
Name: pulumi.String("example"),
ControlSets: auditmanager.FrameworkControlSetArray{
&auditmanager.FrameworkControlSetArgs{
Name: pulumi.String("example"),
Controls: auditmanager.FrameworkControlSetControlArray{
&auditmanager.FrameworkControlSetControlArgs{
Id: pulumi.String(example.Id),
},
},
},
&auditmanager.FrameworkControlSetArgs{
Name: pulumi.String("example2"),
Controls: auditmanager.FrameworkControlSetControlArray{
&auditmanager.FrameworkControlSetControlArgs{
Id: pulumi.String(example2.Id),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Auditmanager.GetControl.Invoke(new()
{
Name = "1. Risk Management",
Type = "Standard",
});
var example2 = Aws.Auditmanager.GetControl.Invoke(new()
{
Name = "2. Personnel",
Type = "Standard",
});
var exampleFramework = new Aws.Auditmanager.Framework("example", new()
{
Name = "example",
ControlSets = new[]
{
new Aws.Auditmanager.Inputs.FrameworkControlSetArgs
{
Name = "example",
Controls = new[]
{
new Aws.Auditmanager.Inputs.FrameworkControlSetControlArgs
{
Id = example.Apply(getControlResult => getControlResult.Id),
},
},
},
new Aws.Auditmanager.Inputs.FrameworkControlSetArgs
{
Name = "example2",
Controls = new[]
{
new Aws.Auditmanager.Inputs.FrameworkControlSetControlArgs
{
Id = example2.Apply(getControlResult => getControlResult.Id),
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.auditmanager.AuditmanagerFunctions;
import com.pulumi.aws.auditmanager.inputs.GetControlArgs;
import com.pulumi.aws.auditmanager.Framework;
import com.pulumi.aws.auditmanager.FrameworkArgs;
import com.pulumi.aws.auditmanager.inputs.FrameworkControlSetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = AuditmanagerFunctions.getControl(GetControlArgs.builder()
.name("1. Risk Management")
.type("Standard")
.build());
final var example2 = AuditmanagerFunctions.getControl(GetControlArgs.builder()
.name("2. Personnel")
.type("Standard")
.build());
var exampleFramework = new Framework("exampleFramework", FrameworkArgs.builder()
.name("example")
.controlSets(
FrameworkControlSetArgs.builder()
.name("example")
.controls(FrameworkControlSetControlArgs.builder()
.id(example.applyValue(getControlResult -> getControlResult.id()))
.build())
.build(),
FrameworkControlSetArgs.builder()
.name("example2")
.controls(FrameworkControlSetControlArgs.builder()
.id(example2.applyValue(getControlResult -> getControlResult.id()))
.build())
.build())
.build());
}
}
resources:
exampleFramework:
type: aws:auditmanager:Framework
name: example
properties:
name: example
controlSets:
- name: example
controls:
- id: ${example.id}
- name: example2
controls:
- id: ${example2.id}
variables:
example:
fn::invoke:
Function: aws:auditmanager:getControl
Arguments:
name: 1. Risk Management
type: Standard
example2:
fn::invoke:
Function: aws:auditmanager:getControl
Arguments:
name: 2. Personnel
type: Standard
Using getControl
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getControl(args: GetControlArgs, opts?: InvokeOptions): Promise<GetControlResult>
function getControlOutput(args: GetControlOutputArgs, opts?: InvokeOptions): Output<GetControlResult>
def get_control(control_mapping_sources: Optional[Sequence[GetControlControlMappingSource]] = None,
name: Optional[str] = None,
type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetControlResult
def get_control_output(control_mapping_sources: Optional[pulumi.Input[Sequence[pulumi.Input[GetControlControlMappingSourceArgs]]]] = None,
name: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetControlResult]
func LookupControl(ctx *Context, args *LookupControlArgs, opts ...InvokeOption) (*LookupControlResult, error)
func LookupControlOutput(ctx *Context, args *LookupControlOutputArgs, opts ...InvokeOption) LookupControlResultOutput
> Note: This function is named LookupControl
in the Go SDK.
public static class GetControl
{
public static Task<GetControlResult> InvokeAsync(GetControlArgs args, InvokeOptions? opts = null)
public static Output<GetControlResult> Invoke(GetControlInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetControlResult> getControl(GetControlArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:auditmanager/getControl:getControl
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- Name of the control.
- Type string
- Type of control. Valid values are
Custom
andStandard
. - Control
Mapping List<Pulumi.Sources Aws. Auditmanager. Inputs. Get Control Control Mapping Source>
- Name string
- Name of the control.
- Type string
- Type of control. Valid values are
Custom
andStandard
. - Control
Mapping []GetSources Control Control Mapping Source
- name String
- Name of the control.
- type String
- Type of control. Valid values are
Custom
andStandard
. - control
Mapping List<GetSources Control Control Mapping Source>
- name string
- Name of the control.
- type string
- Type of control. Valid values are
Custom
andStandard
. - control
Mapping GetSources Control Control Mapping Source[]
- name str
- Name of the control.
- type str
- Type of control. Valid values are
Custom
andStandard
. - control_
mapping_ Sequence[Getsources Control Control Mapping Source]
- name String
- Name of the control.
- type String
- Type of control. Valid values are
Custom
andStandard
. - control
Mapping List<Property Map>Sources
getControl Result
The following output properties are available:
- Action
Plan stringInstructions - Action
Plan stringTitle - Arn string
- Description string
- Id string
- Name string
- Dictionary<string, string>
- Testing
Information string - Type string
- Control
Mapping List<Pulumi.Sources Aws. Auditmanager. Outputs. Get Control Control Mapping Source>
- Action
Plan stringInstructions - Action
Plan stringTitle - Arn string
- Description string
- Id string
- Name string
- map[string]string
- Testing
Information string - Type string
- Control
Mapping []GetSources Control Control Mapping Source
- action
Plan StringInstructions - action
Plan StringTitle - arn String
- description String
- id String
- name String
- Map<String,String>
- testing
Information String - type String
- control
Mapping List<GetSources Control Control Mapping Source>
- action
Plan stringInstructions - action
Plan stringTitle - arn string
- description string
- id string
- name string
- {[key: string]: string}
- testing
Information string - type string
- control
Mapping GetSources Control Control Mapping Source[]
- action_
plan_ strinstructions - action_
plan_ strtitle - arn str
- description str
- id str
- name str
- Mapping[str, str]
- testing_
information str - type str
- control_
mapping_ Sequence[Getsources Control Control Mapping Source]
- action
Plan StringInstructions - action
Plan StringTitle - arn String
- description String
- id String
- name String
- Map<String>
- testing
Information String - type String
- control
Mapping List<Property Map>Sources
Supporting Types
GetControlControlMappingSource
- Source
Description string - Source
Frequency string - Source
Id string - Source
Name string - Source
Set stringUp Option - Source
Type string - Troubleshooting
Text string - Source
Keyword Pulumi.Aws. Auditmanager. Inputs. Get Control Control Mapping Source Source Keyword
- Source
Description string - Source
Frequency string - Source
Id string - Source
Name string - Source
Set stringUp Option - Source
Type string - Troubleshooting
Text string - Source
Keyword GetControl Control Mapping Source Source Keyword
- source
Description String - source
Frequency String - source
Id String - source
Name String - source
Set StringUp Option - source
Type String - troubleshooting
Text String - source
Keyword GetControl Control Mapping Source Source Keyword
- source
Description string - source
Frequency string - source
Id string - source
Name string - source
Set stringUp Option - source
Type string - troubleshooting
Text string - source
Keyword GetControl Control Mapping Source Source Keyword
- source
Description String - source
Frequency String - source
Id String - source
Name String - source
Set StringUp Option - source
Type String - troubleshooting
Text String - source
Keyword Property Map
GetControlControlMappingSourceSourceKeyword
- Keyword
Input stringType - Keyword
Value string
- Keyword
Input stringType - Keyword
Value string
- keyword
Input StringType - keyword
Value String
- keyword
Input stringType - keyword
Value string
- keyword_
input_ strtype - keyword_
value str
- keyword
Input StringType - keyword
Value String
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.