Class: AWSCDK::CfnStackSet::DeploymentTargetsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cfn_stack_set.rb

Overview

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 OrganizationalUnitIds property.
  • If you specify organizational units (OUs) for OrganizationalUnitIds and use either the Accounts or AccountsUrl property, you must also specify the AccountFilterType property.

When deploying to AWS accounts with SELF_MANAGED permissions:

  • You must specify either the Accounts or AccountsUrl property, but not both.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account_filter_type: nil, accounts: nil, accounts_url: nil, organizational_unit_ids: nil) ⇒ DeploymentTargetsProperty

Returns a new instance of DeploymentTargetsProperty.

Parameters:

  • account_filter_type (String, nil) (defaults to: nil)

    Refines which accounts to deploy stacks to by specifying how to use the Accounts and OrganizationalUnitIds properties together.

  • accounts (Array<String>, nil) (defaults to: nil)

    The account IDs of the AWS accounts .

  • accounts_url (String, nil) (defaults to: nil)

    The Amazon S3 URL path to a file that contains a list of AWS account IDs.

  • organizational_unit_ids (Array<String>, nil) (defaults to: nil)

    The organization root ID or organizational unit (OU) IDs.



771
772
773
774
775
776
777
778
779
780
# File 'cfn_stack_set.rb', line 771

def initialize(account_filter_type: nil, accounts: nil, accounts_url: nil, organizational_unit_ids: nil)
  @account_filter_type = 
  Jsii::Type.check_type(@account_filter_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accountFilterType") unless @account_filter_type.nil?
  @accounts = accounts
  Jsii::Type.check_type(@accounts, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "accounts") unless @accounts.nil?
  @accounts_url = accounts_url
  Jsii::Type.check_type(@accounts_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accountsUrl") unless @accounts_url.nil?
  @organizational_unit_ids = organizational_unit_ids
  Jsii::Type.check_type(@organizational_unit_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "organizationalUnitIds") unless @organizational_unit_ids.nil?
end

Instance Attribute Details

#account_filter_typeString? (readonly)

Refines which accounts to deploy stacks to by specifying how to use the Accounts and OrganizationalUnitIds properties together.

The following values determine how CloudFormation selects target accounts:

  • INTERSECTION : StackSet deploys to the accounts specified in the Accounts property.
  • DIFFERENCE : StackSet deploys to the OU, excluding the accounts specified in the Accounts property.
  • UNION : StackSet deploys to the OU, and the accounts specified in the Accounts property. UNION is not supported for create operations when using StackSet as a resource or the CreateStackInstances API.


792
793
794
# File 'cfn_stack_set.rb', line 792

def 
  @account_filter_type
end

#accountsArray<String>? (readonly)

The account IDs of the AWS accounts .

If you have many account numbers, you can provide those accounts using the AccountsUrl property instead.

Pattern : ^[0-9]{12}$



801
802
803
# File 'cfn_stack_set.rb', line 801

def accounts
  @accounts
end

#accounts_urlString? (readonly)

The Amazon S3 URL path to a file that contains a list of AWS account IDs.

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.



810
811
812
# File 'cfn_stack_set.rb', line 810

def accounts_url
  @accounts_url
end

#organizational_unit_idsArray<String>? (readonly)

The organization root ID or organizational unit (OU) IDs.

Pattern : ^(ou-[a-z0-9]{4,32}-[a-z0-9]{8,32}|r-[a-z0-9]{4,32})$



817
818
819
# File 'cfn_stack_set.rb', line 817

def organizational_unit_ids
  @organizational_unit_ids
end

Class Method Details

.jsii_propertiesObject



819
820
821
822
823
824
825
826
# File 'cfn_stack_set.rb', line 819

def self.jsii_properties
  {
    :account_filter_type => "accountFilterType",
    :accounts => "accounts",
    :accounts_url => "accountsUrl",
    :organizational_unit_ids => "organizationalUnitIds",
  }
end

Instance Method Details

#to_jsiiObject



828
829
830
831
832
833
834
835
836
837
# File 'cfn_stack_set.rb', line 828

def to_jsii
  result = {}
  result.merge!({
    "accountFilterType" => @account_filter_type,
    "accounts" => @accounts,
    "accountsUrl" => @accounts_url,
    "organizationalUnitIds" => @organizational_unit_ids,
  })
  result.compact
end