Class: AWSCDK::RUM::CfnAppMonitor::ResourcePolicyProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
rum/cfn_app_monitor.rb

Overview

Use this structure to assign a resource-based policy to a CloudWatch RUM app monitor to control access to it.

Each app monitor can have one resource-based policy. The maximum size of the policy is 4 KB. To learn more about using resource policies with RUM, see Using resource-based policies with CloudWatch RUM .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(policy_document:, policy_revision_id: nil) ⇒ ResourcePolicyProperty

Returns a new instance of ResourcePolicyProperty.

Parameters:

  • policy_document (String)

    The JSON to use as the resource policy.

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

    A string value that you can use to conditionally update your policy.



1088
1089
1090
1091
1092
1093
# File 'rum/cfn_app_monitor.rb', line 1088

def initialize(policy_document:, policy_revision_id: nil)
  @policy_document = policy_document
  Jsii::Type.check_type(@policy_document, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "policyDocument")
  @policy_revision_id = policy_revision_id
  Jsii::Type.check_type(@policy_revision_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "policyRevisionId") unless @policy_revision_id.nil?
end

Instance Attribute Details

#policy_documentString (readonly)

The JSON to use as the resource policy.

The document can be up to 4 KB in size. For more information about the contents and syntax for this policy, see Using resource-based policies with CloudWatch RUM .



1101
1102
1103
# File 'rum/cfn_app_monitor.rb', line 1101

def policy_document
  @policy_document
end

#policy_revision_idString? (readonly)

A string value that you can use to conditionally update your policy.

You can provide the revision ID of your existing policy to make mutating requests against that policy.

When you assign a policy revision ID, then later requests about that policy will be rejected with an InvalidPolicyRevisionIdException error if they don't provide the correct current revision ID.



1110
1111
1112
# File 'rum/cfn_app_monitor.rb', line 1110

def policy_revision_id
  @policy_revision_id
end

Class Method Details

.jsii_propertiesObject



1112
1113
1114
1115
1116
1117
# File 'rum/cfn_app_monitor.rb', line 1112

def self.jsii_properties
  {
    :policy_document => "policyDocument",
    :policy_revision_id => "policyRevisionId",
  }
end

Instance Method Details

#to_jsiiObject



1119
1120
1121
1122
1123
1124
1125
1126
# File 'rum/cfn_app_monitor.rb', line 1119

def to_jsii
  result = {}
  result.merge!({
    "policyDocument" => @policy_document,
    "policyRevisionId" => @policy_revision_id,
  })
  result.compact
end