public static final class CreatePolicyRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
CreatePolicyRequest |
build() |
CreatePolicyRequest.Builder |
description(String description)
The description of the policy.
|
CreatePolicyRequest.Builder |
policyDocument(String policyDocument)
The document of the policy.
|
CreatePolicyRequest.Builder |
policyName(String policyName)
The name of the policy.
|
CreatePolicyRequest.Builder |
tag(List<CreatePolicyRequest.Tag> tag)
Tag.
|
public CreatePolicyRequest.Builder description(String description)
The description of the policy.
The description must be 1 to 1,024 characters in length.
example:Query ECS instances in a specific region
public CreatePolicyRequest.Builder policyDocument(String policyDocument)
The document of the policy.
The document must be 1 to 6,144 characters in length.
For more information about policy elements and sample policies, see Policy elements and Overview of sample policies.
example:{"Statement": [{"Effect": "Allow","Action": "ecs:Describe*","Resource": "acs:ecs:cn-qingdao::instance/"}],"Version": "1"}
public CreatePolicyRequest.Builder policyName(String policyName)
The name of the policy.
The name must be 1 to 128 characters in length, and can contain letters, digits, and hyphens (-).
example:View-ECS-instances-in-a-specific-region
public CreatePolicyRequest.Builder tag(List<CreatePolicyRequest.Tag> tag)
public CreatePolicyRequest build()
Copyright © 2025. All rights reserved.