AWS v6.77.1 published on Friday, Apr 18, 2025 by Pulumi
aws.controltower.getControls
Explore with Pulumi AI
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)
public static Output<GetControlsResult> getControls(GetControlsArgs args, InvokeOptions options)
fn::invoke:
  function: aws:controltower/getControls:getControls
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Target
Identifier string - The ARN of the organizational unit.
 
- Target
Identifier string - The ARN of the organizational unit.
 
- target
Identifier String - The ARN of the organizational unit.
 
- target
Identifier string - The ARN of the organizational unit.
 
- target_
identifier str - The ARN of the organizational unit.
 
- target
Identifier String - The ARN of the organizational unit.
 
getControls Result
The following output properties are available:
- Enabled
Controls 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.
 - Target
Identifier string 
- Enabled
Controls []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.
 - Target
Identifier string 
- enabled
Controls 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.
 - target
Identifier String 
- enabled
Controls 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.
 - target
Identifier 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 
- enabled
Controls 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.
 - target
Identifier String 
Package Details
- Repository
 - AWS Classic pulumi/pulumi-aws
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
awsTerraform Provider.