Class: AWSCDK::Pipelines::StackDeploymentProps

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

Overview

Properties for a StackDeployment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(absolute_template_path:, construct_path:, stack_artifact_id:, stack_name:, account: nil, assets: nil, assume_role_arn: nil, execution_role_arn: nil, region: nil, tags: nil, template_s3_uri: nil) ⇒ StackDeploymentProps

Returns a new instance of StackDeploymentProps.

Parameters:

  • absolute_template_path (String)

    Template path on disk to cloud assembly (cdk.out).

  • construct_path (String)

    Construct path for this stack.

  • stack_artifact_id (String)

    Artifact ID for this stack.

  • stack_name (String)

    Name for this stack.

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

    Account where the stack should be deployed.

  • assets (Array<AWSCDK::Pipelines::StackAsset>, nil) (defaults to: nil)

    Assets referenced by this stack.

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

    Role to assume before deploying this stack.

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

    Execution role to pass to CloudFormation.

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

    Region where the stack should be deployed.

  • tags (Hash{String => String}, nil) (defaults to: nil)

    Tags to apply to the stack.

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

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



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'pipelines/stack_deployment_props.rb', line 18

def initialize(absolute_template_path:, construct_path:, stack_artifact_id:, stack_name:, account: nil, assets: nil, assume_role_arn: nil, execution_role_arn: nil, region: nil, tags: nil, template_s3_uri: nil)
  @absolute_template_path = absolute_template_path
  Jsii::Type.check_type(@absolute_template_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "absoluteTemplatePath")
  @construct_path = construct_path
  Jsii::Type.check_type(@construct_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "constructPath")
  @stack_artifact_id = stack_artifact_id
  Jsii::Type.check_type(@stack_artifact_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stackArtifactId")
  @stack_name = stack_name
  Jsii::Type.check_type(@stack_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stackName")
  @account = 
  Jsii::Type.check_type(@account, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "account") unless @account.nil?
  @assets = assets.is_a?(Array) ? assets.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::Pipelines::StackAsset.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : assets
  Jsii::Type.check_type(@assets, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLnBpcGVsaW5lcy5TdGFja0Fzc2V0In0sImtpbmQiOiJhcnJheSJ9fQ==")), "assets") unless @assets.nil?
  @assume_role_arn = assume_role_arn
  Jsii::Type.check_type(@assume_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assumeRoleArn") unless @assume_role_arn.nil?
  @execution_role_arn = execution_role_arn
  Jsii::Type.check_type(@execution_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "executionRoleArn") unless @execution_role_arn.nil?
  @region = region
  Jsii::Type.check_type(@region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region") unless @region.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
  @template_s3_uri = template_s3_uri
  Jsii::Type.check_type(@template_s3_uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateS3Uri") unless @template_s3_uri.nil?
end

Instance Attribute Details

#absolute_template_pathString (readonly)

Template path on disk to cloud assembly (cdk.out).

Returns:

  • (String)


46
47
48
# File 'pipelines/stack_deployment_props.rb', line 46

def absolute_template_path
  @absolute_template_path
end

#accountString? (readonly)

Note:

Default: - Pipeline account

Account where the stack should be deployed.

Returns:

  • (String, nil)


63
64
65
# File 'pipelines/stack_deployment_props.rb', line 63

def 
  @account
end

#assetsArray<AWSCDK::Pipelines::StackAsset>? (readonly)

Note:

Default: - No assets

Assets referenced by this stack.

Returns:



68
69
70
# File 'pipelines/stack_deployment_props.rb', line 68

def assets
  @assets
end

#assume_role_arnString? (readonly)

Note:

Default: - Don't assume any role

Role to assume before deploying this stack.

Returns:

  • (String, nil)


73
74
75
# File 'pipelines/stack_deployment_props.rb', line 73

def assume_role_arn
  @assume_role_arn
end

#construct_pathString (readonly)

Construct path for this stack.

Returns:

  • (String)


50
51
52
# File 'pipelines/stack_deployment_props.rb', line 50

def construct_path
  @construct_path
end

#execution_role_arnString? (readonly)

Note:

Default: - No execution role

Execution role to pass to CloudFormation.

Returns:

  • (String, nil)


78
79
80
# File 'pipelines/stack_deployment_props.rb', line 78

def execution_role_arn
  @execution_role_arn
end

#regionString? (readonly)

Note:

Default: - Pipeline region

Region where the stack should be deployed.

Returns:

  • (String, nil)


83
84
85
# File 'pipelines/stack_deployment_props.rb', line 83

def region
  @region
end

#stack_artifact_idString (readonly)

Artifact ID for this stack.

Returns:

  • (String)


54
55
56
# File 'pipelines/stack_deployment_props.rb', line 54

def stack_artifact_id
  @stack_artifact_id
end

#stack_nameString (readonly)

Name for this stack.

Returns:

  • (String)


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

def stack_name
  @stack_name
end

#tagsHash{String => String}? (readonly)

Note:

Default: - No tags

Tags to apply to the stack.

Returns:

  • (Hash{String => String}, nil)


88
89
90
# File 'pipelines/stack_deployment_props.rb', line 88

def tags
  @tags
end

#template_s3_uriString? (readonly)

Note:

Default: - Stack template is not published

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

Returns:

  • (String, nil)


93
94
95
# File 'pipelines/stack_deployment_props.rb', line 93

def template_s3_uri
  @template_s3_uri
end

Class Method Details

.jsii_propertiesObject



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'pipelines/stack_deployment_props.rb', line 95

def self.jsii_properties
  {
    :absolute_template_path => "absoluteTemplatePath",
    :construct_path => "constructPath",
    :stack_artifact_id => "stackArtifactId",
    :stack_name => "stackName",
    :account => "account",
    :assets => "assets",
    :assume_role_arn => "assumeRoleArn",
    :execution_role_arn => "executionRoleArn",
    :region => "region",
    :tags => "tags",
    :template_s3_uri => "templateS3Uri",
  }
end

Instance Method Details

#to_jsiiObject



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'pipelines/stack_deployment_props.rb', line 111

def to_jsii
  result = {}
  result.merge!({
    "absoluteTemplatePath" => @absolute_template_path,
    "constructPath" => @construct_path,
    "stackArtifactId" => @stack_artifact_id,
    "stackName" => @stack_name,
    "account" => @account,
    "assets" => @assets,
    "assumeRoleArn" => @assume_role_arn,
    "executionRoleArn" => @execution_role_arn,
    "region" => @region,
    "tags" => @tags,
    "templateS3Uri" => @template_s3_uri,
  })
  result.compact
end