Template name
ACS-OSS-PutBucketVersioning
Template description
Enables versioning for a specified OSS bucket.
Template type
Automated
Owner
Alibaba Cloud
Input parameters
|
Parameter |
Description |
Type |
Required |
Default value |
Limit |
|
bucketName |
The name of the Object Storage Service (OSS) 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
None
Permission policy that is required to execute the template
{
"Version": "1",
"Statement": [
{
"Action": [
"oss:PutBucketVersioning"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
References
For more information, see ACS-OSS-PutBucketVersioning.yml at GitHub.
Template content
FormatVersion: OOS-2019-06-01
Description:
en: Enable the versioning state of a bucket
name-en: ACS-OSS-PutBucketVersioning
categories:
- security
Parameters:
regionId:
Type: String
Label:
en: RegionId
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
bucketName:
Label:
en: BucketName
Type: String
OOSAssumeRole:
Label:
en: OOSAssumeRole
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: putBucketVersioning
Action: ACS::ExecuteAPI
Description:
en: Enable the versioning state of a bucket
Properties:
Service: OSS
API: PutBucketVersioning
Method: PUT
URI: '?versioning'
Parameters:
RegionId: '{{ regionId }}'
BucketName: '{{ bucketName }}'
Body: <?xml version="1.0" encoding="UTF-8"?> <VersioningConfiguration> <Status>Enabled</Status></VersioningConfiguration>
该文章对您有帮助吗?