1. Packages
  2. AWS Classic
  3. API Docs
  4. controltower
  5. getControls

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

aws.controltower.getControls

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

    List of Control Tower controls applied to an OU.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const this = aws.organizations.getOrganization({});
    const thisGetOrganizationalUnits = _this.then(_this => aws.organizations.getOrganizationalUnits({
        parentId: _this.roots?.[0]?.id,
    }));
    const thisGetControls = thisGetOrganizationalUnits.then(thisGetOrganizationalUnits => aws.controltower.getControls({
        targetIdentifier: .filter(x => x.name == "Security").map(x => (x.arn))[0],
    }));
    
    import pulumi
    import pulumi_aws as aws
    
    this = aws.organizations.get_organization()
    this_get_organizational_units = aws.organizations.get_organizational_units(parent_id=this.roots[0].id)
    this_get_controls = aws.controltower.get_controls(target_identifier=[x.arn for x in this_get_organizational_units.children if x.name == "Security"][0])
    
    Coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = Aws.Organizations.GetOrganization.Invoke();
    
        var thisGetOrganizationalUnits = Aws.Organizations.GetOrganizationalUnits.Invoke(new()
        {
            ParentId = @this.Apply(getOrganizationResult => getOrganizationResult.Roots[0]?.Id),
        });
    
        var thisGetControls = Aws.ControlTower.GetControls.Invoke(new()
        {
            TargetIdentifier = [0],
        });
    
    });
    
    Coming soon!
    
    Coming soon!
    

    Using getControls

    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 getControls(args: GetControlsArgs, opts?: InvokeOptions): Promise<GetControlsResult>
    function getControlsOutput(args: GetControlsOutputArgs, opts?: InvokeOptions): Output<GetControlsResult>
    def get_controls(target_identifier: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetControlsResult
    def get_controls_output(target_identifier: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetControlsResult]
    func GetControls(ctx *Context, args *GetControlsArgs, opts ...InvokeOption) (*GetControlsResult, error)
    func GetControlsOutput(ctx *Context, args *GetControlsOutputArgs, opts ...InvokeOption) GetControlsResultOutput

    > Note: This function is named GetControls in the Go SDK.

    public static class GetControls 
    {
        public static Task<GetControlsResult> InvokeAsync(GetControlsArgs args, InvokeOptions? opts = null)
        public static Output<GetControlsResult> Invoke(GetControlsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetControlsResult> getControls(GetControlsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:controltower/getControls:getControls
      arguments:
        # arguments dictionary

    The following arguments are supported:

    TargetIdentifier string
    The ARN of the organizational unit.
    TargetIdentifier string
    The ARN of the organizational unit.
    targetIdentifier String
    The ARN of the organizational unit.
    targetIdentifier string
    The ARN of the organizational unit.
    target_identifier str
    The ARN of the organizational unit.
    targetIdentifier String
    The ARN of the organizational unit.

    getControls Result

    The following output properties are available:

    EnabledControls List<string>
    List of all the ARNs for the controls applied to the target_identifier.
    Id string
    The provider-assigned unique ID for this managed resource.
    TargetIdentifier string
    EnabledControls []string
    List of all the ARNs for the controls applied to the target_identifier.
    Id string
    The provider-assigned unique ID for this managed resource.
    TargetIdentifier string
    enabledControls List<String>
    List of all the ARNs for the controls applied to the target_identifier.
    id String
    The provider-assigned unique ID for this managed resource.
    targetIdentifier String
    enabledControls string[]
    List of all the ARNs for the controls applied to the target_identifier.
    id string
    The provider-assigned unique ID for this managed resource.
    targetIdentifier string
    enabled_controls Sequence[str]
    List of all the ARNs for the controls applied to the target_identifier.
    id str
    The provider-assigned unique ID for this managed resource.
    target_identifier str
    enabledControls List<String>
    List of all the ARNs for the controls applied to the target_identifier.
    id String
    The provider-assigned unique ID for this managed resource.
    targetIdentifier String

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi