Module: AWSCDK::CodeDeploy::IBindableDeploymentConfig
- Includes:
- Interfaces::AWSCodedeploy::IDeploymentConfigRef
- Included in:
- CustomLambdaDeploymentConfig
- Defined in:
- code_deploy/i_bindable_deployment_config.rb
Overview
A DeploymentConfig that can specialize itself based on the target group it will be used for.
For example, this is used for AWS-managed deployment configs: these are already present in every region, but we need a region-specific ARN to reference them. Since we might use them in conjunction with cross-region DeploymentGroups, we need to specialize the account and region to the DeploymentGroup before using.
A DeploymentGroup must call bind_environment() first if it detects this type,
before reading the DeploymentConfig ARN.
Class Method Summary collapse
Instance Method Summary collapse
-
#bind_environment(deployment_group) ⇒ AWSCDK::Interfaces::AWSCodedeploy::IDeploymentConfigRef
Bind the predefined deployment config to the environment of the given resource.
-
#deployment_config_ref ⇒ AWSCDK::Interfaces::AWSCodedeploy::DeploymentConfigReference
A reference to a DeploymentConfig resource.
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
-
#node ⇒ Constructs::Node
The tree node.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Class Method Details
.jsii_overridable_methods ⇒ Object
69 70 71 72 73 74 75 76 77 |
# File 'code_deploy/i_bindable_deployment_config.rb', line 69 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :env => { kind: :property, name: "env", is_optional: false }, :deployment_config_ref => { kind: :property, name: "deploymentConfigRef", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :bind_environment => { kind: :method, name: "bindEnvironment", is_optional: false }, } end |
Instance Method Details
#bind_environment(deployment_group) ⇒ AWSCDK::Interfaces::AWSCodedeploy::IDeploymentConfigRef
Bind the predefined deployment config to the environment of the given resource.
64 65 66 67 |
# File 'code_deploy/i_bindable_deployment_config.rb', line 64 def bind_environment(deployment_group) Jsii::Type.check_type(deployment_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19jb2RlZGVwbG95LklEZXBsb3ltZW50R3JvdXBSZWYifQ==")), "deploymentGroup") jsii_call_method("bindEnvironment", [deployment_group]) end |
#deployment_config_ref ⇒ AWSCDK::Interfaces::AWSCodedeploy::DeploymentConfigReference
A reference to a DeploymentConfig resource.
42 43 44 |
# File 'code_deploy/i_bindable_deployment_config.rb', line 42 def deployment_config_ref() jsii_get_property("deploymentConfigRef") end |
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
35 36 37 |
# File 'code_deploy/i_bindable_deployment_config.rb', line 35 def env() jsii_get_property("env") end |
#node ⇒ Constructs::Node
The tree node.
20 21 22 |
# File 'code_deploy/i_bindable_deployment_config.rb', line 20 def node() jsii_get_property("node") end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.
53 54 55 56 57 58 |
# File 'code_deploy/i_bindable_deployment_config.rb', line 53 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |