CfnBucketPolicyProps Struct
Properties for defining a CfnBucketPolicy.
| Source |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3outposts as s3outposts } from 'aws-cdk-lib';
declare const policyDocument: any;
const cfnBucketPolicyProps: s3outposts.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_s3outposts as s3outposts
# policy_document: Any
cfn_bucket_policy_props = s3outposts.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.s3outposts.*;
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.S3Outposts;
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 Amazon S3 Outposts 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 Access Policy Language Overview .