1. Packages
  2. Packages
  3. AWS
  4. API Docs
  5. auditmanager
  6. getControl
Viewing docs for AWS v7.32.0
published on Friday, May 29, 2026 by Pulumi
aws logo
Viewing docs for AWS v7.32.0
published on Friday, May 29, 2026 by Pulumi

    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/v7/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.ArrayList;
    import java.util.Arrays;
    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
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    data "aws_auditmanager_getcontrol" "example" {
      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/v7/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.ArrayList;
    import java.util.Arrays;
    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.id())
                            .build())
                        .build(),
                    FrameworkControlSetArgs.builder()
                        .name("example2")
                        .controls(FrameworkControlSetControlArgs.builder()
                            .id(example2.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
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    data "aws_auditmanager_getcontrol" "example" {
      name = "1. Risk Management"
      type = "Standard"
    }
    data "aws_auditmanager_getcontrol" "example2" {
      name = "2. Personnel"
      type = "Standard"
    }
    
    resource "aws_auditmanager_framework" "example" {
      name = "example"
      control_sets {
        name = "example"
        controls {
          id = data.aws_auditmanager_getcontrol.example.id
        }
      }
      control_sets {
        name = "example2"
        controls {
          id = data.aws_auditmanager_getcontrol.example2.id
        }
      }
    }
    

    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(name: Optional[str] = None,
                    region: Optional[str] = None,
                    type: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetControlResult
    def get_control_output(name: pulumi.Input[Optional[str]] = None,
                    region: pulumi.Input[Optional[str]] = None,
                    type: pulumi.Input[Optional[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)
    public static Output<GetControlResult> getControl(GetControlArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws:auditmanager/getControl:getControl
      arguments:
        # arguments dictionary
    data "aws_auditmanager_getcontrol" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    Name of the control.
    Type string
    Type of control. Valid values are Custom and Standard.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Name string
    Name of the control.
    Type string
    Type of control. Valid values are Custom and Standard.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    name string
    Name of the control.
    type string
    Type of control. Valid values are Custom and Standard.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    name String
    Name of the control.
    type String
    Type of control. Valid values are Custom and Standard.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    name string
    Name of the control.
    type string
    Type of control. Valid values are Custom and Standard.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    name str
    Name of the control.
    type str
    Type of control. Valid values are Custom and Standard.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    name String
    Name of the control.
    type String
    Type of control. Valid values are Custom and Standard.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.

    getControl Result

    The following output properties are available:

    ActionPlanInstructions string
    Recommended actions to carry out if the control isn't fulfilled.
    ActionPlanTitle string
    Title of the action plan for remediating the control.
    Arn string
    ARN of the control.
    ControlMappingSources List<GetControlControlMappingSource>
    Data mapping sources for the control.
    Description string
    Description of the control.
    Id string
    Unique identifier for the control.
    Name string
    Region string
    Tags Dictionary<string, string>
    Map of tags assigned to the control.
    TestingInformation string
    Steps to follow to determine if the control is satisfied.
    Type string
    ActionPlanInstructions string
    Recommended actions to carry out if the control isn't fulfilled.
    ActionPlanTitle string
    Title of the action plan for remediating the control.
    Arn string
    ARN of the control.
    ControlMappingSources []GetControlControlMappingSource
    Data mapping sources for the control.
    Description string
    Description of the control.
    Id string
    Unique identifier for the control.
    Name string
    Region string
    Tags map[string]string
    Map of tags assigned to the control.
    TestingInformation string
    Steps to follow to determine if the control is satisfied.
    Type string
    action_plan_instructions string
    Recommended actions to carry out if the control isn't fulfilled.
    action_plan_title string
    Title of the action plan for remediating the control.
    arn string
    ARN of the control.
    control_mapping_sources list(object)
    Data mapping sources for the control.
    description string
    Description of the control.
    id string
    Unique identifier for the control.
    name string
    region string
    tags map(string)
    Map of tags assigned to the control.
    testing_information string
    Steps to follow to determine if the control is satisfied.
    type string
    actionPlanInstructions String
    Recommended actions to carry out if the control isn't fulfilled.
    actionPlanTitle String
    Title of the action plan for remediating the control.
    arn String
    ARN of the control.
    controlMappingSources List<GetControlControlMappingSource>
    Data mapping sources for the control.
    description String
    Description of the control.
    id String
    Unique identifier for the control.
    name String
    region String
    tags Map<String,String>
    Map of tags assigned to the control.
    testingInformation String
    Steps to follow to determine if the control is satisfied.
    type String
    actionPlanInstructions string
    Recommended actions to carry out if the control isn't fulfilled.
    actionPlanTitle string
    Title of the action plan for remediating the control.
    arn string
    ARN of the control.
    controlMappingSources GetControlControlMappingSource[]
    Data mapping sources for the control.
    description string
    Description of the control.
    id string
    Unique identifier for the control.
    name string
    region string
    tags {[key: string]: string}
    Map of tags assigned to the control.
    testingInformation string
    Steps to follow to determine if the control is satisfied.
    type string
    action_plan_instructions str
    Recommended actions to carry out if the control isn't fulfilled.
    action_plan_title str
    Title of the action plan for remediating the control.
    arn str
    ARN of the control.
    control_mapping_sources Sequence[GetControlControlMappingSource]
    Data mapping sources for the control.
    description str
    Description of the control.
    id str
    Unique identifier for the control.
    name str
    region str
    tags Mapping[str, str]
    Map of tags assigned to the control.
    testing_information str
    Steps to follow to determine if the control is satisfied.
    type str
    actionPlanInstructions String
    Recommended actions to carry out if the control isn't fulfilled.
    actionPlanTitle String
    Title of the action plan for remediating the control.
    arn String
    ARN of the control.
    controlMappingSources List<Property Map>
    Data mapping sources for the control.
    description String
    Description of the control.
    id String
    Unique identifier for the control.
    name String
    region String
    tags Map<String>
    Map of tags assigned to the control.
    testingInformation String
    Steps to follow to determine if the control is satisfied.
    type String

    Supporting Types

    GetControlControlMappingSource

    GetControlControlMappingSourceSourceKeyword

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    Viewing docs for AWS v7.32.0
    published on Friday, May 29, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial