@Stability(value=Stable) public static final class Permission.Builder extends Object implements software.amazon.jsii.Builder<Permission>
Permission| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
Permission.Builder |
action(String action)
Sets the value of
Permission.getAction() |
Permission |
build()
Builds the configured instance.
|
Permission.Builder |
eventSourceToken(String eventSourceToken)
Sets the value of
Permission.getEventSourceToken() |
Permission.Builder |
functionUrlAuthType(FunctionUrlAuthType functionUrlAuthType)
Sets the value of
Permission.getFunctionUrlAuthType() |
Permission.Builder |
organizationId(String organizationId)
Sets the value of
Permission.getOrganizationId() |
Permission.Builder |
principal(IPrincipal principal)
Sets the value of
Permission.getPrincipal() |
Permission.Builder |
scope(software.constructs.Construct scope)
Sets the value of
Permission.getScope() |
Permission.Builder |
sourceAccount(String sourceAccount)
Sets the value of
Permission.getSourceAccount() |
Permission.Builder |
sourceArn(String sourceArn)
Sets the value of
Permission.getSourceArn() |
@Stability(value=Stable) public Permission.Builder principal(IPrincipal principal)
Permission.getPrincipal()principal - The entity for which you are granting permission to invoke the Lambda function. This parameter is required.
This entity can be any of the following:
s3.amazonaws.com or sns.amazonaws.comThe principal can be an AccountPrincipal, an ArnPrincipal, a ServicePrincipal, or an OrganizationPrincipal.
this@Stability(value=Stable) public Permission.Builder action(String action)
Permission.getAction()action - The Lambda actions that you want to allow in this statement.
For example,
you can specify lambda:CreateFunction to specify a certain action, or use
a wildcard (lambda:*) to grant permission to all Lambda actions. For a
list of actions, see Actions and Condition Context Keys for AWS Lambda in
the IAM User Guide.this@Stability(value=Stable) public Permission.Builder eventSourceToken(String eventSourceToken)
Permission.getEventSourceToken()eventSourceToken - A unique token that must be supplied by the principal invoking the function.this@Stability(value=Stable) public Permission.Builder functionUrlAuthType(FunctionUrlAuthType functionUrlAuthType)
Permission.getFunctionUrlAuthType()functionUrlAuthType - The authType for the function URL that you are granting permissions for.this@Stability(value=Stable) public Permission.Builder organizationId(String organizationId)
Permission.getOrganizationId()organizationId - The organization you want to grant permissions to.
Use this ONLY if you
need to grant permissions to a subset of the organization. If you want to
grant permissions to the entire organization, sending the organization principal
through the principal property will suffice.
You can use this property to ensure that all source principals are owned by a specific organization.
this@Stability(value=Stable) public Permission.Builder scope(software.constructs.Construct scope)
Permission.getScope()scope - The scope to which the permission constructs be attached.
The default is
the Lambda function construct itself, but this would need to be different
in cases such as cross-stack references where the Permissions would need
to sit closer to the consumer of this permission (i.e., the caller).this@Stability(value=Stable) public Permission.Builder sourceAccount(String sourceAccount)
Permission.getSourceAccount()sourceAccount - The AWS account ID (without hyphens) of the source owner.
For example, if
you specify an S3 bucket in the SourceArn property, this value is the
bucket owner's account ID. You can use this property to ensure that all
source principals are owned by a specific account.this@Stability(value=Stable) public Permission.Builder sourceArn(String sourceArn)
Permission.getSourceArn()sourceArn - The ARN of a resource that is invoking your function.
When granting
Amazon Simple Storage Service (Amazon S3) permission to invoke your
function, specify this property with the bucket ARN as its value. This
ensures that events generated only from the specified bucket, not just
any bucket from any AWS account that creates a mapping to your function,
can invoke the function.this@Stability(value=Stable) public Permission build()
build in interface software.amazon.jsii.Builder<Permission>PermissionNullPointerException - if any required attribute was not providedCopyright © 2022. All rights reserved.