Class: AWSCDK::ImageBuilder::CfnLifecyclePolicyProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ImageBuilder::CfnLifecyclePolicyProps
- Defined in:
- image_builder/cfn_lifecycle_policy_props.rb
Overview
Properties for defining a CfnLifecyclePolicy.
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
Optional description for the lifecycle policy.
-
#execution_role ⇒ String
readonly
The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to run lifecycle actions.
-
#name ⇒ String
readonly
The name of the lifecycle policy to create.
-
#policy_details ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::ImageBuilder::CfnLifecyclePolicy::PolicyDetailProperty>
readonly
Configuration details for the lifecycle policy rules.
-
#resource_selection ⇒ AWSCDK::IResolvable, AWSCDK::ImageBuilder::CfnLifecyclePolicy::ResourceSelectionProperty
readonly
Selection criteria for the resources that the lifecycle policy applies to.
-
#resource_type ⇒ String
readonly
The type of Image Builder resource that the lifecycle policy applies to.
-
#status ⇒ String?
readonly
Indicates whether the lifecycle policy resource is enabled.
-
#tags ⇒ Hash{String => String}?
readonly
Tags to apply to the lifecycle policy resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(execution_role:, name:, policy_details:, resource_selection:, resource_type:, description: nil, status: nil, tags: nil) ⇒ CfnLifecyclePolicyProps
constructor
A new instance of CfnLifecyclePolicyProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(execution_role:, name:, policy_details:, resource_selection:, resource_type:, description: nil, status: nil, tags: nil) ⇒ CfnLifecyclePolicyProps
Returns a new instance of CfnLifecyclePolicyProps.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'image_builder/cfn_lifecycle_policy_props.rb', line 17 def initialize(execution_role:, name:, policy_details:, resource_selection:, resource_type:, description: nil, status: nil, tags: nil) @execution_role = execution_role Jsii::Type.check_type(@execution_role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "executionRole") @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @policy_details = policy_details Jsii::Type.check_type(@policy_details, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaW1hZ2VidWlsZGVyLkNmbkxpZmVjeWNsZVBvbGljeS5Qb2xpY3lEZXRhaWxQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "policyDetails") @resource_selection = resource_selection.is_a?(Hash) ? ::AWSCDK::ImageBuilder::CfnLifecyclePolicy::ResourceSelectionProperty.new(**resource_selection.transform_keys(&:to_sym)) : resource_selection Jsii::Type.check_type(@resource_selection, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pbWFnZWJ1aWxkZXIuQ2ZuTGlmZWN5Y2xlUG9saWN5LlJlc291cmNlU2VsZWN0aW9uUHJvcGVydHkifV19fQ==")), "resourceSelection") @resource_type = resource_type Jsii::Type.check_type(@resource_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceType") @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @status = status Jsii::Type.check_type(@status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "status") unless @status.nil? @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil? end |
Instance Attribute Details
#description ⇒ String? (readonly)
Optional description for the lifecycle policy.
65 66 67 |
# File 'image_builder/cfn_lifecycle_policy_props.rb', line 65 def description @description end |
#execution_role ⇒ String (readonly)
The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to run lifecycle actions.
40 41 42 |
# File 'image_builder/cfn_lifecycle_policy_props.rb', line 40 def execution_role @execution_role end |
#name ⇒ String (readonly)
The name of the lifecycle policy to create.
45 46 47 |
# File 'image_builder/cfn_lifecycle_policy_props.rb', line 45 def name @name end |
#policy_details ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::ImageBuilder::CfnLifecyclePolicy::PolicyDetailProperty> (readonly)
Configuration details for the lifecycle policy rules.
50 51 52 |
# File 'image_builder/cfn_lifecycle_policy_props.rb', line 50 def policy_details @policy_details end |
#resource_selection ⇒ AWSCDK::IResolvable, AWSCDK::ImageBuilder::CfnLifecyclePolicy::ResourceSelectionProperty (readonly)
Selection criteria for the resources that the lifecycle policy applies to.
55 56 57 |
# File 'image_builder/cfn_lifecycle_policy_props.rb', line 55 def resource_selection @resource_selection end |
#resource_type ⇒ String (readonly)
The type of Image Builder resource that the lifecycle policy applies to.
60 61 62 |
# File 'image_builder/cfn_lifecycle_policy_props.rb', line 60 def resource_type @resource_type end |
#status ⇒ String? (readonly)
Indicates whether the lifecycle policy resource is enabled.
70 71 72 |
# File 'image_builder/cfn_lifecycle_policy_props.rb', line 70 def status @status end |
#tags ⇒ Hash{String => String}? (readonly)
Tags to apply to the lifecycle policy resource.
75 76 77 |
# File 'image_builder/cfn_lifecycle_policy_props.rb', line 75 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'image_builder/cfn_lifecycle_policy_props.rb', line 77 def self.jsii_properties { :execution_role => "executionRole", :name => "name", :policy_details => "policyDetails", :resource_selection => "resourceSelection", :resource_type => "resourceType", :description => "description", :status => "status", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'image_builder/cfn_lifecycle_policy_props.rb', line 90 def to_jsii result = {} result.merge!({ "executionRole" => @execution_role, "name" => @name, "policyDetails" => @policy_details, "resourceSelection" => @resource_selection, "resourceType" => @resource_type, "description" => @description, "status" => @status, "tags" => @tags, }) result.compact end |