public static final class CreatePolicyVersionRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
CreatePolicyVersionRequest |
build() |
CreatePolicyVersionRequest.Builder |
policyDocument(String policyDocument)
The document of the policy.
|
CreatePolicyVersionRequest.Builder |
policyName(String policyName)
The name of the policy.
|
CreatePolicyVersionRequest.Builder |
rotateStrategy(String rotateStrategy)
The rotation strategy of the policy.
|
CreatePolicyVersionRequest.Builder |
setAsDefault(Boolean setAsDefault)
Specifies whether to set this policy as the default policy.
|
public CreatePolicyVersionRequest.Builder policyDocument(String policyDocument)
The document of the policy. The document can be up to 6,144 bytes in length.
example:{"Statement":[{"Action":["oss:"],"Effect":"Allow","Resource":["acs:oss:::"]}],"Version":"1"}
public CreatePolicyVersionRequest.Builder policyName(String policyName)
The name of the policy.
example:OSS-Administrator
public CreatePolicyVersionRequest.Builder rotateStrategy(String rotateStrategy)
The rotation strategy of the policy. The rotation strategy can be used to delete an early policy version.
Valid values:
None: disables the rotation strategy.DeleteOldestNonDefaultVersionWhenLimitExceeded: deletes the earliest non-active version if the number of versions exceeds the limit.Default value: None.
None
public CreatePolicyVersionRequest.Builder setAsDefault(Boolean setAsDefault)
Specifies whether to set this policy as the default policy. Default value: false.
false
public CreatePolicyVersionRequest build()
Copyright © 2025. All rights reserved.