@Generated(value="jsii-pacmak/1.57.0 (build f614666)", date="2022-04-22T22:36:25.772Z") @Stability(value=Stable) public class AwsCustomResourcePolicy extends software.amazon.jsii.JsiiObject
Example:
AwsCustomResource awsCustom = AwsCustomResource.Builder.create(this, "aws-custom")
.onCreate(AwsSdkCall.builder()
.service("...")
.action("...")
.parameters(Map.of(
"text", "..."))
.physicalResourceId(PhysicalResourceId.of("..."))
.build())
.onUpdate(AwsSdkCall.builder()
.service("...")
.action("...")
.parameters(Map.of(
"text", "...",
"resourceId", new PhysicalResourceIdReference()))
.build())
.policy(AwsCustomResourcePolicy.fromSdkCalls(SdkCallsPolicyOptions.builder()
.resources(AwsCustomResourcePolicy.ANY_RESOURCE)
.build()))
.build();
| Modifier and Type | Field and Description |
|---|---|
static List<String> |
ANY_RESOURCE
Use this constant to configure access to any resource.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AwsCustomResourcePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
AwsCustomResourcePolicy(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static AwsCustomResourcePolicy |
fromSdkCalls(SdkCallsPolicyOptions options)
Generate IAM Policy Statements from the configured SDK calls.
|
static AwsCustomResourcePolicy |
fromStatements(List<? extends PolicyStatement> statements)
Explicit IAM Policy Statements.
|
List<String> |
getResources()
resources for auto-generated from SDK calls.
|
List<PolicyStatement> |
getStatements()
statements for explicit policy.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected AwsCustomResourcePolicy(software.amazon.jsii.JsiiObjectRef objRef)
protected AwsCustomResourcePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static AwsCustomResourcePolicy fromSdkCalls(@NotNull SdkCallsPolicyOptions options)
Each SDK call with be translated to an IAM Policy Statement in the form of: call.service:call.action (e.g s3:PutObject).
This policy generator assumes the IAM policy name has the same name as the API
call. This is true in 99% of cases, but there are exceptions (for example,
S3's PutBucketLifecycleConfiguration requires
s3:PutLifecycleConfiguration permissions, Lambda's Invoke requires
lambda:InvokeFunction permissions). Use fromStatements if you want to
do a call that requires different IAM action names.
options - options for the policy generation. This parameter is required.@Stability(value=Stable) @NotNull public static AwsCustomResourcePolicy fromStatements(@NotNull List<? extends PolicyStatement> statements)
statements - the statements to propagate to the SDK calls. This parameter is required.@Stability(value=Stable) @NotNull public List<PolicyStatement> getStatements()
Copyright © 2022. All rights reserved.