DeploymentTargetsProperty Struct
The AWS Organizations accounts or AWS accounts to deploy stacks to in the specified Regions.
When deploying to AWS Organizations accounts with SERVICE_MANAGED permissions:
- You must specify the
OrganizationalUnitIdsproperty. - If you specify organizational units (OUs) for
OrganizationalUnitIdsand use either theAccountsorAccountsUrlproperty, you must also specify theAccountFilterTypeproperty.
When deploying to AWS accounts with SELF_MANAGED permissions:
- You must specify either the
AccountsorAccountsUrlproperty, but not both.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const deploymentTargetsProperty: cdk.CfnStackSet.DeploymentTargetsProperty = {
accountFilterType: 'accountFilterType',
accounts: ['accounts'],
accountsUrl: 'accountsUrl',
organizationalUnitIds: ['organizationalUnitIds'],
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
deployment_targets_property = cdk.CfnStackSet.DeploymentTargetsProperty(
account_filter_type="accountFilterType",
accounts=["accounts"],
accounts_url="accountsUrl",
organizational_unit_ids=["organizationalUnitIds"]
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
DeploymentTargetsProperty deploymentTargetsProperty = DeploymentTargetsProperty.builder()
.accountFilterType("accountFilterType")
.accounts(List.of("accounts"))
.accountsUrl("accountsUrl")
.organizationalUnitIds(List.of("organizationalUnitIds"))
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var deploymentTargetsProperty = new DeploymentTargetsProperty {
AccountFilterType = "accountFilterType",
Accounts = new [] { "accounts" },
AccountsUrl = "accountsUrl",
OrganizationalUnitIds = new [] { "organizationalUnitIds" }
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
deploymentTargetsProperty := &DeploymentTargetsProperty{
AccountFilterType: jsii.String("accountFilterType"),
Accounts: []*string{
jsii.String("accounts"),
},
AccountsUrl: jsii.String("accountsUrl"),
OrganizationalUnitIds: []*string{
jsii.String("organizationalUnitIds"),
},
}
Properties
accountFilterTypeoptionalstringaccount_filter_typeoptionalstraccountFilterTypeoptionalStringAccountFilterTypeoptionalstringAccountFilterTypeoptional*string #notes
The following values determine how CloudFormation selects target accounts:
INTERSECTION: StackSet deploys to the accounts specified in theAccountsproperty.DIFFERENCE: StackSet deploys to the OU, excluding the accounts specified in theAccountsproperty.UNION: StackSet deploys to the OU, and the accounts specified in theAccountsproperty.UNIONis not supported for create operations when using StackSet as a resource or theCreateStackInstancesAPI.
accountsoptionalstring[]accountsoptionaltyping.List[str]accountsoptionalList<String>Accountsoptionalstring[]Accountsoptional*[]*string #If you have many account numbers, you can provide those accounts using the AccountsUrl property instead.
Pattern : ^[0-9]{12}$
accountsUrloptionalstringaccounts_urloptionalstraccountsUrloptionalStringAccountsUrloptionalstringAccountsUrloptional*string #notes
The file format must be either .csv or .txt , and the data can be comma-separated or new-line-separated. There is currently a 10MB limit for the data (approximately 800,000 accounts).
This property serves the same purpose as Accounts but allows you to specify a large number of accounts.
organizationalUnitIdsoptionalstring[]organizational_unit_idsoptionaltyping.List[str]organizationalUnitIdsoptionalList<String>OrganizationalUnitIdsoptionalstring[]OrganizationalUnitIdsoptional*[]*string #Pattern : ^(ou-[a-z0-9]{4,32}-[a-z0-9]{8,32}|r-[a-z0-9]{4,32})$