Skip to content
v2.277.0

ScopedActionsProperty Struct ​

A group of actions within an access grant, together with the resource scopes and context conditions that apply to exactly those actions.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';
const scopedActionsProperty: cloudwatch.CfnAccessGrant.ScopedActionsProperty = {
  actions: ['actions'],

  // the properties below are optional
  contextConditions: {
    contextConditionsKey: ['contextConditions'],
  },
  resources: [{
    resourceType: 'resourceType',

    // the properties below are optional
    resourceArns: ['resourceArns'],
    rowScopeGroups: [[{
      field: 'field',
      operator: 'operator',
      values: ['values'],
    }]],
    signalTypes: ['signalTypes'],
    tags: {
      tagsKey: 'tags',
    },
  }],
};
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_cloudwatch as cloudwatch

scoped_actions_property = cloudwatch.CfnAccessGrant.ScopedActionsProperty(
    actions=["actions"],

    # the properties below are optional
    context_conditions={
        "context_conditions_key": ["contextConditions"]
    },
    resources=[cloudwatch.CfnAccessGrant.ResourceScopeProperty(
        resource_type="resourceType",

        # the properties below are optional
        resource_arns=["resourceArns"],
        row_scope_groups=[[cloudwatch.CfnAccessGrant.RowScopeProperty(
            field="field",
            operator="operator",
            values=["values"]
        )]],
        signal_types=["signalTypes"],
        tags={
            "tags_key": "tags"
        }
    )]
)
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.cloudwatch.*;

ScopedActionsProperty scopedActionsProperty = ScopedActionsProperty.builder()
        .actions(List.of("actions"))

        // the properties below are optional
        .contextConditions(Map.of(
                "contextConditionsKey", List.of("contextConditions")))
        .resources(List.of(ResourceScopeProperty.builder()
                .resourceType("resourceType")

                // the properties below are optional
                .resourceArns(List.of("resourceArns"))
                .rowScopeGroups(List.of(List.of(RowScopeProperty.builder()
                        .field("field")
                        .operator("operator")
                        .values(List.of("values"))
                        .build())))
                .signalTypes(List.of("signalTypes"))
                .tags(Map.of(
                        "tagsKey", "tags"))
                .build()))
        .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.CloudWatch;

var scopedActionsProperty = new ScopedActionsProperty {
    Actions = new [] { "actions" },

    // the properties below are optional
    ContextConditions = new Dictionary<string, string[]> {
        { "contextConditionsKey", new [] { "contextConditions" } }
    },
    Resources = new [] { new ResourceScopeProperty {
        ResourceType = "resourceType",

        // the properties below are optional
        ResourceArns = new [] { "resourceArns" },
        RowScopeGroups = new [] { new [] { new RowScopeProperty {
            Field = "field",
            Operator = "operator",
            Values = new [] { "values" }
        } } },
        SignalTypes = new [] { "signalTypes" },
        Tags = new Dictionary<string, string> {
            { "tagsKey", "tags" }
        }
    } }
};
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"

scopedActionsProperty := &ScopedActionsProperty{
	Actions: []*string{
		jsii.String("actions"),
	},

	// the properties below are optional
	ContextConditions: map[string][]*string{
		"contextConditionsKey": []*string{
			jsii.String("contextConditions"),
		},
	},
	Resources: []interface{}{
		&ResourceScopeProperty{
			ResourceType: jsii.String("resourceType"),

			// the properties below are optional
			ResourceArns: []*string{
				jsii.String("resourceArns"),
			},
			RowScopeGroups: []interface{}{
				[]interface{}{
					&RowScopeProperty{
						Field: jsii.String("field"),
						Operator: jsii.String("operator"),
						Values: []*string{
							jsii.String("values"),
						},
					},
				},
			},
			SignalTypes: []*string{
				jsii.String("signalTypes"),
			},
			Tags: map[string]*string{
				"tagsKey": jsii.String("tags"),
			},
		},
	},
}

Properties ​

actionsstring[]actionstyping.List[str]actionsList<String>Actionsstring[]Actions*[]*string required #
The actions this group applies to, each in vendor-code:Action form.
contextConditionsoptionalIResolvable | { [key: string]: string[] }context_conditionsoptionaltyping.Union[IResolvable, typing.Mapping[str, typing.List[str]]]contextConditionsoptionalIResolvableContextConditionsoptionalIResolvableContextConditionsoptionalinterface{} #
Context conditions for fine-grained access control on these actions, as a map of condition keys to lists of allowed values.
resourcesoptionalIResolvable | IResolvable | CfnAccessGrant.ResourceScopeProperty[]resourcesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ResourceScopeProperty]]]resourcesoptionalIResolvableResourcesoptionalIResolvableResourcesoptionalinterface{} #
Resource scopes constraining these actions to specific resources.