CfnBucketPolicyProps Struct
Properties for defining a CfnBucketPolicy.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3express as s3express } from 'aws-cdk-lib';
declare const policyDocument: any;
const cfnBucketPolicyProps: s3express.CfnBucketPolicyProps = {
bucket: 'bucket',
policyDocument: policyDocument,
};
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_s3express as s3express
# policy_document: Any
cfn_bucket_policy_props = s3express.CfnBucketPolicyProps(
bucket="bucket",
policy_document=policy_document
)
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.s3express.*;
Object policyDocument;
CfnBucketPolicyProps cfnBucketPolicyProps = CfnBucketPolicyProps.builder()
.bucket("bucket")
.policyDocument(policyDocument)
.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.S3Express;
var policyDocument;
var cfnBucketPolicyProps = new CfnBucketPolicyProps {
Bucket = "bucket",
PolicyDocument = policyDocument
};
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"
var policyDocument interface{}
cfnBucketPolicyProps := &CfnBucketPolicyProps{
Bucket: jsii.String("bucket"),
PolicyDocument: policyDocument,
}
Properties
The name of the S3 directory bucket to which the policy applies.
policyDocumentanypolicy_documentAnypolicyDocumentObjectPolicyDocumentobjectPolicyDocumentinterface{} required #A policy document containing permissions to add to the specified bucket.
notes
In IAM, you must provide policy documents in JSON format. However, in CloudFormation you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to IAM. For more information, see the AWS::IAM::Policy PolicyDocument resource description in this guide and Policies and Permissions in Amazon S3 in the Amazon S3 User Guide .