Skip to content
v2.277.0

ResourcePolicyProperty Struct ​

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 .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_rum as rum } from 'aws-cdk-lib';
const resourcePolicyProperty: rum.CfnAppMonitor.ResourcePolicyProperty = {
  policyDocument: 'policyDocument',

  // the properties below are optional
  policyRevisionId: 'policyRevisionId',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_rum as rum

resource_policy_property = rum.CfnAppMonitor.ResourcePolicyProperty(
    policy_document="policyDocument",

    # the properties below are optional
    policy_revision_id="policyRevisionId"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.rum.*;

ResourcePolicyProperty resourcePolicyProperty = ResourcePolicyProperty.builder()
        .policyDocument("policyDocument")

        // the properties below are optional
        .policyRevisionId("policyRevisionId")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.RUM;

var resourcePolicyProperty = new ResourcePolicyProperty {
    PolicyDocument = "policyDocument",

    // the properties below are optional
    PolicyRevisionId = "policyRevisionId"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

resourcePolicyProperty := &ResourcePolicyProperty{
	PolicyDocument: jsii.String("policyDocument"),

	// the properties below are optional
	PolicyRevisionId: jsii.String("policyRevisionId"),
}

Properties ​

policyDocumentstringpolicy_documentstrpolicyDocumentStringPolicyDocumentstringPolicyDocument*stringrequired#
The JSON to use as the resource policy.
notes

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 .

policyRevisionIdoptionalstringpolicy_revision_idoptionalstrpolicyRevisionIdoptionalStringPolicyRevisionIdoptionalstringPolicyRevisionIdoptional*string#
A string value that you can use to conditionally update your policy.
notes

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.