ALIYUN::OSS::BucketPublicAccessBlock

更新时间:
复制为 MD 格式

ALIYUN::OSS::BucketPublicAccessBlock类型用于设置存储空间上的阻止公共访问的配置信息。

语法

{
  "Type": "ALIYUN::OSS::BucketPublicAccessBlock",
  "Properties": {
    "Bucket": String,
    "BlockPublicAccess": Boolean
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

BlockPublicAccess

Boolean

阿里云OSS是否应阻止该存储桶的公共存储桶策略和ACL。

Bucket

String

存储桶的名称。

返回值

Fn::GetAtt

BlockPublicAccess:阿里云OSS是否应阻止该存储桶的公共存储桶策略和ACL。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  BlockPublicAccess:
    Type: Boolean
    Description:
      en: Whether AlibabaCloud OSS should block public bucket policies and ACL 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: Whether AlibabaCloud OSS should block public bucket policies and ACL for this bucket.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "BlockPublicAccess": {
      "Type": "Boolean",
      "Description": {
        "en": "Whether AlibabaCloud OSS should block public bucket policies and ACL 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": "Whether AlibabaCloud OSS should block public bucket policies and ACL for this bucket."
    }
  }
}