ACS-OSS-PutBucketAcl

更新时间:
复制 MD 格式

Sets or modifies the access control list (ACL) of an Object Storage Service (OSS) bucket.

Template name

ACS-OSS-PutBucketAcl

Execute Now

Template description

Sets or modifies the access control list (ACL) of an OSS bucket.

Template type

Automated

Owner

Alibaba Cloud

Input parameters

Parameter

Description

Data type

Required

Default value

Limit

bucketName

The name of the OSS bucket.

String

Yes

permissionName

The ACL to apply to the bucket.

String

Yes

regionId

The region ID.

String

No

{{ ACS::RegionId }}

OOSAssumeRole

The RAM role assumed by CloudOps Orchestration Service (OOS).

String

No

""

Output parameters

Parameter

Description

Data type

permissionInfo

Json

Required permission policy

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "oss:PutBucketACL"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

References

ACS-OSS-PutBucketAcl

Template content

FormatVersion: OOS-2019-06-01
Description:
  en: Set or modify the access permission (ACL) of the bucket
  name-en: ACS-OSS-PutBucketAcl
  categories:
    - security
Parameters:
  regionId:
    Type: String
    Label:
      en: RegionId
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  bucketName:
    Label:
      en: BucketName
    Type: String
  permissionName:
    Label:
      en: PermissionName  
    Type: String
    AllowedValues:
      - public-read-write
      - public-read
      - private
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole       
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: putBucketAcl
    Action: 'ACS::ExecuteAPI'
    Description:
      en: Set or modify the access permission (ACL) of the bucket      
    Properties:
      Service: OSS
      API: PutBucketACL
      Method: PUT
      URI: '?acl'
      Headers:
        x-oss-acl: '{{ permissionName }}'
      Parameters:
        BucketName: '{{ bucketName }}'
        RegionId: '{{ regionId }}'
Outputs:
  permissionInfo:
    Type: Json
    Value:
      bucketName: '{{ bucketName }}'
      permissionName: '{{ permissionName }}'