Class: AWSCDK::CloudTrail::CfnResourcePolicyProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_trail/cfn_resource_policy_props.rb

Overview

Properties for defining a CfnResourcePolicy.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource_arn:, resource_policy:) ⇒ CfnResourcePolicyProps

Returns a new instance of CfnResourcePolicyProps.

Parameters:

  • resource_arn (String)

    The Amazon Resource Name (ARN) of the CloudTrail event data store, dashboard, or channel attached to the resource-based policy.

  • resource_policy (Object)

    A JSON-formatted string for an AWS resource-based policy.



11
12
13
14
15
16
# File 'cloud_trail/cfn_resource_policy_props.rb', line 11

def initialize(resource_arn:, resource_policy:)
  @resource_arn = resource_arn
  Jsii::Type.check_type(@resource_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceArn")
  @resource_policy = resource_policy
  Jsii::Type.check_type(@resource_policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "resourcePolicy")
end

Instance Attribute Details

#resource_arnString (readonly)

The Amazon Resource Name (ARN) of the CloudTrail event data store, dashboard, or channel attached to the resource-based policy.

Example event data store ARN format: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE

Example dashboard ARN format: arn:aws:cloudtrail:us-east-1:123456789012:dashboard/exampleDash

Example channel ARN format: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890



28
29
30
# File 'cloud_trail/cfn_resource_policy_props.rb', line 28

def resource_arn
  @resource_arn
end

#resource_policyObject (readonly)

A JSON-formatted string for an AWS resource-based policy.

For example resource-based policies, see CloudTrail resource-based policy examples in the CloudTrail User Guide .



35
36
37
# File 'cloud_trail/cfn_resource_policy_props.rb', line 35

def resource_policy
  @resource_policy
end

Class Method Details

.jsii_propertiesObject



37
38
39
40
41
42
# File 'cloud_trail/cfn_resource_policy_props.rb', line 37

def self.jsii_properties
  {
    :resource_arn => "resourceArn",
    :resource_policy => "resourcePolicy",
  }
end

Instance Method Details

#to_jsiiObject



44
45
46
47
48
49
50
51
# File 'cloud_trail/cfn_resource_policy_props.rb', line 44

def to_jsii
  result = {}
  result.merge!({
    "resourceArn" => @resource_arn,
    "resourcePolicy" => @resource_policy,
  })
  result.compact
end