Class: AWSCDK::CodePipelineActions::StackSetDeploymentModel
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::CodePipelineActions::StackSetDeploymentModel
- Defined in:
- code_pipeline_actions/stack_set_deployment_model.rb
Overview
Determines how IAM roles are created and managed.
Class Method Summary collapse
- .jsii_overridable_methods ⇒ Object
-
.organizations(props = nil) ⇒ AWSCDK::CodePipelineActions::StackSetDeploymentModel
Deploy to AWS Organizations accounts.
-
.self_managed(props = nil) ⇒ AWSCDK::CodePipelineActions::StackSetDeploymentModel
Deploy to AWS Accounts not managed by AWS Organizations.
Instance Method Summary collapse
-
#initialize ⇒ StackSetDeploymentModel
constructor
A new instance of StackSetDeploymentModel.
Constructor Details
#initialize ⇒ StackSetDeploymentModel
Returns a new instance of StackSetDeploymentModel.
8 9 10 |
# File 'code_pipeline_actions/stack_set_deployment_model.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.jsii_overridable_methods ⇒ Object
12 13 14 15 |
# File 'code_pipeline_actions/stack_set_deployment_model.rb', line 12 def self.jsii_overridable_methods { } end |
.organizations(props = nil) ⇒ AWSCDK::CodePipelineActions::StackSetDeploymentModel
Deploy to AWS Organizations accounts.
AWS CloudFormation StackSets automatically creates the IAM roles required to deploy to accounts managed by AWS Organizations. This requires an account to be a member of an Organization.
Using this deployment model, you can specify either AWS Account Ids or
Organization Unit Ids in the stack_instances parameter.
28 29 30 31 32 |
# File 'code_pipeline_actions/stack_set_deployment_model.rb', line 28 def self.organizations(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CodePipelineActions::OrganizationsDeploymentProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lX2FjdGlvbnMuT3JnYW5pemF0aW9uc0RlcGxveW1lbnRQcm9wcyJ9")), "props") unless props.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codepipeline_actions.StackSetDeploymentModel", "organizations", [props]) end |
.self_managed(props = nil) ⇒ AWSCDK::CodePipelineActions::StackSetDeploymentModel
Deploy to AWS Accounts not managed by AWS Organizations.
You are responsible for creating Execution Roles in every account you will
be deploying to in advance to create the actual stack instances. Unless you
specify overrides, StackSets expects the execution roles you create to have
the default name AWSCloudFormationStackSetExecutionRole. See the Grant
self-managed
permissions
section of the CloudFormation documentation.
The CDK will automatically create the central Administration Role in the Pipeline account which will be used to assume the Execution Role in each of the target accounts.
If you wish to use a pre-created Administration Role, use Role.fromRoleName()
or Role.fromRoleArn() to import it, and pass it to this function:
existing_admin_role = AWSCDK::IAM::Role.from_role_name(self, "AdminRole", "AWSCloudFormationStackSetAdministrationRole")
deployment_model = AWSCDK::CodePipelineActions::StackSetDeploymentModel.self_managed({
# Use an existing Role. Leave this out to create a new Role.
administration_role: existing_admin_role,
})
Using this deployment model, you can only specify AWS Account Ids in the
stack_instances parameter.
66 67 68 69 70 |
# File 'code_pipeline_actions/stack_set_deployment_model.rb', line 66 def self.self_managed(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CodePipelineActions::SelfManagedDeploymentProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lX2FjdGlvbnMuU2VsZk1hbmFnZWREZXBsb3ltZW50UHJvcHMifQ==")), "props") unless props.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codepipeline_actions.StackSetDeploymentModel", "selfManaged", [props]) end |