The ALIYUN::OSS::BucketPublicAccessBlock resource configures the public access block settings for a bucket.
Syntax
{
"Type": "ALIYUN::OSS::BucketPublicAccessBlock",
"Properties": {
"Bucket": String,
"BlockPublicAccess": Boolean
}
}
Properties
|
Parameter |
Type |
Required |
Update allowed |
Description |
Constraints |
|
BlockPublicAccess |
Boolean |
Yes |
Yes |
Specifies whether Alibaba Cloud OSS blocks public bucket policies and ACLs on this bucket. |
None |
|
Bucket |
String |
Yes |
No |
The name of the bucket. |
None |
Return values
Fn::GetAtt
BlockPublicAccess: Indicates whether public bucket policies and ACLs are blocked on this bucket.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
BlockPublicAccess:
Type: Boolean
Description:
en: Specifies whether to block public access for this bucket.
Required: true
Bucket:
Type: String
Description:
en: The name of the bucket.
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::OSS::BucketPublicAccessBlock
Properties:
BlockPublicAccess:
Ref: BlockPublicAccess
Bucket:
Ref: Bucket
Outputs:
BlockPublicAccess:
Value:
Fn::GetAtt:
- ExtensionResource
- BlockPublicAccess
Description: Indicates whether public access is blocked for this bucket.
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"BlockPublicAccess": {
"Type": "Boolean",
"Description": {
"en": "Specifies whether to block public access for this bucket."
},
"Required": true
},
"Bucket": {
"Type": "String",
"Description": {
"en": "The name of the bucket."
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::OSS::BucketPublicAccessBlock",
"Properties": {
"BlockPublicAccess": {
"Ref": "BlockPublicAccess"
},
"Bucket": {
"Ref": "Bucket"
}
}
}
},
"Outputs": {
"BlockPublicAccess": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"BlockPublicAccess"
]
},
"Description": "Indicates whether public access is blocked for this bucket."
}
}
}