Class: AWSCDK::CodePipelineActions::S3DeployActionProps

Inherits:
AWSCDK::Codepipeline::CommonAWSActionProps
  • Object
show all
Defined in:
code_pipeline_actions/s3_deploy_action_props.rb

Overview

Construction properties of the S3DeployAction S3 deploy Action.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action_name:, run_order: nil, variables_namespace: nil, role: nil, bucket:, input:, access_control: nil, cache_control: nil, encryption_key: nil, extract: nil, object_key: nil) ⇒ S3DeployActionProps

Returns a new instance of S3DeployActionProps.

Parameters:

  • action_name (String)

    The physical, human-readable name of the Action.

  • run_order (Numeric, nil) (defaults to: nil)

    The runOrder property for this Action.

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

    The name of the namespace to use for variables emitted by this action.

  • role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    The Role in which context's this Action will be executing in.

  • bucket (AWSCDK::S3::IBucket)

    The Amazon S3 bucket that is the deploy target.

  • input (AWSCDK::Codepipeline::Artifact)

    The input Artifact to deploy to Amazon S3.

  • access_control (AWSCDK::S3::BucketAccessControl, nil) (defaults to: nil)

    The specified canned ACL to objects deployed to Amazon S3.

  • cache_control (Array<AWSCDK::CodePipelineActions::CacheControl>, nil) (defaults to: nil)

    The caching behavior for requests/responses for objects in the bucket.

  • encryption_key (AWSCDK::KMS::IKey, nil) (defaults to: nil)

    The AWS KMS encryption key for the host bucket.

  • extract (Boolean, nil) (defaults to: nil)

    Should the deploy action extract the artifact before deploying to Amazon S3.

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

    The key of the target object.



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 'code_pipeline_actions/s3_deploy_action_props.rb', line 18

def initialize(action_name:, run_order: nil, variables_namespace: nil, role: nil, bucket:, input:, access_control: nil, cache_control: nil, encryption_key: nil, extract: nil, object_key: nil)
  @action_name = action_name
  Jsii::Type.check_type(@action_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actionName")
  @run_order = run_order
  Jsii::Type.check_type(@run_order, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "runOrder") unless @run_order.nil?
  @variables_namespace = variables_namespace
  Jsii::Type.check_type(@variables_namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "variablesNamespace") unless @variables_namespace.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
  @bucket = bucket
  Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket")
  @input = input
  Jsii::Type.check_type(@input, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLkFydGlmYWN0In0=")), "input")
  @access_control = access_control
  Jsii::Type.check_type(@access_control, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuQnVja2V0QWNjZXNzQ29udHJvbCJ9")), "accessControl") unless @access_control.nil?
  @cache_control = cache_control
  Jsii::Type.check_type(@cache_control, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlcGlwZWxpbmVfYWN0aW9ucy5DYWNoZUNvbnRyb2wifSwia2luZCI6ImFycmF5In19")), "cacheControl") unless @cache_control.nil?
  @encryption_key = encryption_key
  Jsii::Type.check_type(@encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "encryptionKey") unless @encryption_key.nil?
  @extract = extract
  Jsii::Type.check_type(@extract, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "extract") unless @extract.nil?
  @object_key = object_key
  Jsii::Type.check_type(@object_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "objectKey") unless @object_key.nil?
end

Instance Attribute Details

#access_controlAWSCDK::S3::BucketAccessControl? (readonly)

Note:

Default: - the original object ACL

The specified canned ACL to objects deployed to Amazon S3.

This overwrites any existing ACL that was applied to the object.



87
88
89
# File 'code_pipeline_actions/s3_deploy_action_props.rb', line 87

def access_control
  @access_control
end

#action_nameString (readonly)

The physical, human-readable name of the Action.

Note that Action names must be unique within a single Stage.

Returns:

  • (String)


48
49
50
# File 'code_pipeline_actions/s3_deploy_action_props.rb', line 48

def action_name
  @action_name
end

#bucketAWSCDK::S3::IBucket (readonly)

The Amazon S3 bucket that is the deploy target.

Returns:



76
77
78
# File 'code_pipeline_actions/s3_deploy_action_props.rb', line 76

def bucket
  @bucket
end

#cache_controlArray<AWSCDK::CodePipelineActions::CacheControl>? (readonly)

Note:

Default: - none, decided by the HTTP client

The caching behavior for requests/responses for objects in the bucket.

The final cache control property will be the result of joining all of the provided array elements with a comma (plus a space after the comma).



95
96
97
# File 'code_pipeline_actions/s3_deploy_action_props.rb', line 95

def cache_control
  @cache_control
end

#encryption_keyAWSCDK::KMS::IKey? (readonly)

Note:

Default: - none

The AWS KMS encryption key for the host bucket.

The encryptionKey parameter encrypts uploaded artifacts with the provided AWS KMS key.

Returns:



102
103
104
# File 'code_pipeline_actions/s3_deploy_action_props.rb', line 102

def encryption_key
  @encryption_key
end

#extractBoolean? (readonly)

Note:

Default: true

Should the deploy action extract the artifact before deploying to Amazon S3.

Returns:

  • (Boolean, nil)


107
108
109
# File 'code_pipeline_actions/s3_deploy_action_props.rb', line 107

def extract
  @extract
end

#inputAWSCDK::Codepipeline::Artifact (readonly)

The input Artifact to deploy to Amazon S3.



80
81
82
# File 'code_pipeline_actions/s3_deploy_action_props.rb', line 80

def input
  @input
end

#object_keyString? (readonly)

The key of the target object.

This is required if extract is false.

Returns:

  • (String, nil)


113
114
115
# File 'code_pipeline_actions/s3_deploy_action_props.rb', line 113

def object_key
  @object_key
end

#roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: a new Role will be generated

The Role in which context's this Action will be executing in.

The Pipeline's Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your IAction.bind method in the ActionBindOptions.role property.

Returns:



72
73
74
# File 'code_pipeline_actions/s3_deploy_action_props.rb', line 72

def role
  @role
end

#run_orderNumeric? (readonly)

Note:

Default: 1

The runOrder property for this Action.

RunOrder determines the relative order in which multiple Actions in the same Stage execute.



56
57
58
# File 'code_pipeline_actions/s3_deploy_action_props.rb', line 56

def run_order
  @run_order
end

#variables_namespaceString? (readonly)

Note:

Default: - a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set

The name of the namespace to use for variables emitted by this action.

Returns:

  • (String, nil)


61
62
63
# File 'code_pipeline_actions/s3_deploy_action_props.rb', line 61

def variables_namespace
  @variables_namespace
end

Class Method Details

.jsii_propertiesObject



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'code_pipeline_actions/s3_deploy_action_props.rb', line 115

def self.jsii_properties
  {
    :action_name => "actionName",
    :run_order => "runOrder",
    :variables_namespace => "variablesNamespace",
    :role => "role",
    :bucket => "bucket",
    :input => "input",
    :access_control => "accessControl",
    :cache_control => "cacheControl",
    :encryption_key => "encryptionKey",
    :extract => "extract",
    :object_key => "objectKey",
  }
end

Instance Method Details

#to_jsiiObject



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'code_pipeline_actions/s3_deploy_action_props.rb', line 131

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "actionName" => @action_name,
    "runOrder" => @run_order,
    "variablesNamespace" => @variables_namespace,
    "role" => @role,
    "bucket" => @bucket,
    "input" => @input,
    "accessControl" => @access_control,
    "cacheControl" => @cache_control,
    "encryptionKey" => @encryption_key,
    "extract" => @extract,
    "objectKey" => @object_key,
  })
  result.compact
end