Class: AWSCDK::Lex::CfnResourcePolicyProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lex::CfnResourcePolicyProps
- Defined in:
- lex/cfn_resource_policy_props.rb
Overview
Properties for defining a CfnResourcePolicy.
Instance Attribute Summary collapse
-
#policy ⇒ Object
readonly
A resource policy to add to the resource.
-
#resource_arn ⇒ String
readonly
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(policy:, resource_arn:) ⇒ CfnResourcePolicyProps
constructor
A new instance of CfnResourcePolicyProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(policy:, resource_arn:) ⇒ CfnResourcePolicyProps
Returns a new instance of CfnResourcePolicyProps.
11 12 13 14 15 16 |
# File 'lex/cfn_resource_policy_props.rb', line 11 def initialize(policy:, resource_arn:) @policy = policy Jsii::Type.check_type(@policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "policy") @resource_arn = resource_arn Jsii::Type.check_type(@resource_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceArn") end |
Instance Attribute Details
#policy ⇒ Object (readonly)
A resource policy to add to the resource.
The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow IAM syntax. If the policy isn't valid, Amazon Lex returns a validation exception.
24 25 26 |
# File 'lex/cfn_resource_policy_props.rb', line 24 def policy @policy end |
#resource_arn ⇒ String (readonly)
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
29 30 31 |
# File 'lex/cfn_resource_policy_props.rb', line 29 def resource_arn @resource_arn end |
Class Method Details
.jsii_properties ⇒ Object
31 32 33 34 35 36 |
# File 'lex/cfn_resource_policy_props.rb', line 31 def self.jsii_properties { :policy => "policy", :resource_arn => "resourceArn", } end |
Instance Method Details
#to_jsii ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lex/cfn_resource_policy_props.rb', line 38 def to_jsii result = {} result.merge!({ "policy" => @policy, "resourceArn" => @resource_arn, }) result.compact end |