Class: AWSCDK::Pipelines::StackDeployment

Inherits:
Jsii::Object
  • Object
show all
Defined in:
pipelines/stack_deployment.rb

Overview

Deployment of a single Stack.

You don't need to instantiate this class -- it will be automatically instantiated as necessary when you add a Stage to a pipeline.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ StackDeployment

Returns a new instance of StackDeployment.

Raises:

  • (NoMethodError)


12
13
14
# File 'pipelines/stack_deployment.rb', line 12

def initialize(*args)
  raise NoMethodError, "aws-cdk-lib.pipelines.StackDeployment does not have a visible constructor; use the provided factory methods"
end

Class Method Details

.from_artifact(stack_artifact) ⇒ AWSCDK::Pipelines::StackDeployment

Build a StackDeployment from a Stack Artifact in a Cloud Assembly.

Parameters:

Returns:

  • (AWSCDK::Pipelines::StackDeployment)


43
44
45
46
# File 'pipelines/stack_deployment.rb', line 43

def self.from_artifact(stack_artifact)
  Jsii::Type.check_type(stack_artifact, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jeF9hcGkuQ2xvdWRGb3JtYXRpb25TdGFja0FydGlmYWN0In0=")), "stackArtifact")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.pipelines.StackDeployment", "fromArtifact", [stack_artifact])
end

.jsii_overridable_methodsObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'pipelines/stack_deployment.rb', line 16

def self.jsii_overridable_methods
  {
    :absolute_template_path => { kind: :property, name: "absoluteTemplatePath", is_optional: false },
    :assets => { kind: :property, name: "assets", is_optional: false },
    :change_set => { kind: :property, name: "changeSet", is_optional: false },
    :construct_path => { kind: :property, name: "constructPath", is_optional: false },
    :post => { kind: :property, name: "post", is_optional: false },
    :pre => { kind: :property, name: "pre", is_optional: false },
    :stack_artifact_id => { kind: :property, name: "stackArtifactId", is_optional: false },
    :stack_dependencies => { kind: :property, name: "stackDependencies", is_optional: false },
    :stack_name => { kind: :property, name: "stackName", is_optional: false },
    :tags => { kind: :property, name: "tags", is_optional: false },
    :account => { kind: :property, name: "account", is_optional: true },
    :assume_role_arn => { kind: :property, name: "assumeRoleArn", is_optional: true },
    :execution_role_arn => { kind: :property, name: "executionRoleArn", is_optional: true },
    :region => { kind: :property, name: "region", is_optional: true },
    :template_asset => { kind: :property, name: "templateAsset", is_optional: true },
    :template_url => { kind: :property, name: "templateUrl", is_optional: true },
    :add_stack_dependency => { kind: :method, name: "addStackDependency", is_optional: false },
    :add_stack_steps => { kind: :method, name: "addStackSteps", is_optional: false },
  }
end

Instance Method Details

#absolute_template_pathString

Template path on disk to CloudAssembly.

Returns:

  • (String)


51
52
53
# File 'pipelines/stack_deployment.rb', line 51

def absolute_template_path()
  jsii_get_property("absoluteTemplatePath")
end

#accountString?

Note:

Default: - Pipeline account

Account where the stack should be deployed.

Returns:

  • (String, nil)


126
127
128
# File 'pipelines/stack_deployment.rb', line 126

def ()
  jsii_get_property("account")
end

#add_stack_dependency(stack_deployment) ⇒ void

This method returns an undefined value.

Add a dependency on another stack.

Parameters:

  • stack_deployment (AWSCDK::Pipelines::StackDeployment)


177
178
179
180
# File 'pipelines/stack_deployment.rb', line 177

def add_stack_dependency(stack_deployment)
  Jsii::Type.check_type(stack_deployment, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5waXBlbGluZXMuU3RhY2tEZXBsb3ltZW50In0=")), "stackDeployment")
  jsii_call_method("addStackDependency", [stack_deployment])
end

#add_stack_steps(pre, change_set, post) ⇒ void

This method returns an undefined value.

Adds steps to each phase of the stack.

Parameters:



188
189
190
191
192
193
# File 'pipelines/stack_deployment.rb', line 188

def add_stack_steps(pre, change_set, post)
  Jsii::Type.check_type(pre, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLnBpcGVsaW5lcy5TdGVwIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "pre")
  Jsii::Type.check_type(change_set, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLnBpcGVsaW5lcy5TdGVwIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "changeSet")
  Jsii::Type.check_type(post, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLnBpcGVsaW5lcy5TdGVwIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "post")
  jsii_call_method("addStackSteps", [pre, change_set, post])
end

#assetsArray<AWSCDK::Pipelines::StackAsset>

Assets referenced by this stack.

Returns:



58
59
60
# File 'pipelines/stack_deployment.rb', line 58

def assets()
  jsii_get_property("assets")
end

#assume_role_arnString?

Note:

Default: - Don't assume any role

Role to assume before deploying this stack.

Returns:

  • (String, nil)


134
135
136
# File 'pipelines/stack_deployment.rb', line 134

def assume_role_arn()
  jsii_get_property("assumeRoleArn")
end

#change_setArray<AWSCDK::Pipelines::Step>

Steps that take place after stack is prepared but before stack deploys.

Your pipeline engine may not disable prepare_step.

Returns:



67
68
69
# File 'pipelines/stack_deployment.rb', line 67

def change_set()
  jsii_get_property("changeSet")
end

#construct_pathString

Construct path for this stack.

Returns:

  • (String)


74
75
76
# File 'pipelines/stack_deployment.rb', line 74

def construct_path()
  jsii_get_property("constructPath")
end

#execution_role_arnString?

Note:

Default: - No execution role

Execution role to pass to CloudFormation.

Returns:

  • (String, nil)


142
143
144
# File 'pipelines/stack_deployment.rb', line 142

def execution_role_arn()
  jsii_get_property("executionRoleArn")
end

#postArray<AWSCDK::Pipelines::Step>

Steps to execute after stack deploys.

Returns:



81
82
83
# File 'pipelines/stack_deployment.rb', line 81

def post()
  jsii_get_property("post")
end

#preArray<AWSCDK::Pipelines::Step>

Steps that take place before stack is prepared.

If your pipeline engine disables 'prepareStep', then this will happen before stack deploys

Returns:



90
91
92
# File 'pipelines/stack_deployment.rb', line 90

def pre()
  jsii_get_property("pre")
end

#regionString?

Note:

Default: - Pipeline region

Region where the stack should be deployed.

Returns:

  • (String, nil)


150
151
152
# File 'pipelines/stack_deployment.rb', line 150

def region()
  jsii_get_property("region")
end

#stack_artifact_idString

Artifact ID for this stack.

Returns:

  • (String)


97
98
99
# File 'pipelines/stack_deployment.rb', line 97

def stack_artifact_id()
  jsii_get_property("stackArtifactId")
end

#stack_dependenciesArray<AWSCDK::Pipelines::StackDeployment>

Other stacks this stack depends on.

Returns:

  • (Array<AWSCDK::Pipelines::StackDeployment>)


104
105
106
# File 'pipelines/stack_deployment.rb', line 104

def stack_dependencies()
  jsii_get_property("stackDependencies")
end

#stack_nameString

Name for this stack.

Returns:

  • (String)


111
112
113
# File 'pipelines/stack_deployment.rb', line 111

def stack_name()
  jsii_get_property("stackName")
end

#tagsHash{String => String}

Tags to apply to the stack.

Returns:

  • (Hash{String => String})


118
119
120
# File 'pipelines/stack_deployment.rb', line 118

def tags()
  jsii_get_property("tags")
end

#template_assetAWSCDK::Pipelines::StackAsset?

The asset that represents the CloudFormation template for this stack.



157
158
159
# File 'pipelines/stack_deployment.rb', line 157

def template_asset()
  jsii_get_property("templateAsset")
end

#template_urlString?

The S3 URL which points to the template asset location in the publishing bucket.

This is undefined if the stack template is not published. Use the DefaultStackSynthesizer to ensure it is.

Example value: https://bucket.s3.amazonaws.com/object/key

Returns:

  • (String, nil)


169
170
171
# File 'pipelines/stack_deployment.rb', line 169

def template_url()
  jsii_get_property("templateUrl")
end