@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-11T19:24:32.022Z") @Stability(value=Experimental) public interface PolicyStatementProps extends software.amazon.jsii.JsiiSerializable
Example:
// Add gateway endpoints when creating the VPC
Vpc vpc = Vpc.Builder.create(this, "MyVpc")
.gatewayEndpoints(Map.of(
"S3", GatewayVpcEndpointOptions.builder()
.service(GatewayVpcEndpointAwsService.S3)
.build()))
.build();
// Alternatively gateway endpoints can be added on the VPC
GatewayVpcEndpoint dynamoDbEndpoint = vpc.addGatewayEndpoint("DynamoDbEndpoint", GatewayVpcEndpointOptions.builder()
.service(GatewayVpcEndpointAwsService.DYNAMODB)
.build());
// This allows to customize the endpoint policy
dynamoDbEndpoint.addToPolicy(
PolicyStatement.Builder.create() // Restrict to listing and describing tables
.principals(List.of(new AnyPrincipal()))
.actions(List.of("dynamodb:DescribeTable", "dynamodb:ListTables"))
.resources(List.of("*")).build());
// Add an interface endpoint
vpc.addInterfaceEndpoint("EcrDockerEndpoint", InterfaceVpcEndpointOptions.builder()
.service(InterfaceVpcEndpointAwsService.ECR_DOCKER)
.build());
| Modifier and Type | Interface and Description |
|---|---|
static class |
PolicyStatementProps.Builder
A builder for
PolicyStatementProps |
static class |
PolicyStatementProps.Jsii$Proxy
An implementation for
PolicyStatementProps |
| Modifier and Type | Method and Description |
|---|---|
static PolicyStatementProps.Builder |
builder() |
default List<String> |
getActions()
(experimental) List of actions to add to the statement.
|
default Map<String,Object> |
getConditions()
(experimental) Conditions to add to the statement.
|
default Effect |
getEffect()
(experimental) Whether to allow or deny the actions in this statement.
|
default List<String> |
getNotActions()
(experimental) List of not actions to add to the statement.
|
default List<IPrincipal> |
getNotPrincipals()
(experimental) List of not principals to add to the statement.
|
default List<String> |
getNotResources()
(experimental) NotResource ARNs to add to the statement.
|
default List<IPrincipal> |
getPrincipals()
(experimental) List of principals to add to the statement.
|
default List<String> |
getResources()
(experimental) Resource ARNs to add to the statement.
|
default String |
getSid()
(experimental) The Sid (statement ID) is an optional identifier that you provide for the policy statement.
|
@Stability(value=Experimental) @Nullable default List<String> getActions()
Default: - no actions
@Stability(value=Experimental) @Nullable default Map<String,Object> getConditions()
Default: - no condition
@Stability(value=Experimental) @Nullable default Effect getEffect()
Default: Effect.ALLOW
@Stability(value=Experimental) @Nullable default List<String> getNotActions()
Default: - no not-actions
@Stability(value=Experimental) @Nullable default List<IPrincipal> getNotPrincipals()
Default: - no not principals
@Stability(value=Experimental) @Nullable default List<String> getNotResources()
Default: - no not-resources
@Stability(value=Experimental) @Nullable default List<IPrincipal> getPrincipals()
Default: - no principals
@Stability(value=Experimental) @Nullable default List<String> getResources()
Default: - no resources
@Stability(value=Experimental) @Nullable default String getSid()
You can assign a Sid value to each statement in a statement array. In services that let you specify an ID element, such as SQS and SNS, the Sid value is just a sub-ID of the policy document's ID. In IAM, the Sid value must be unique within a JSON policy.
Default: - no sid
@Stability(value=Experimental) static PolicyStatementProps.Builder builder()
PolicyStatementProps.Builder of PolicyStatementPropsCopyright © 2022. All rights reserved.