Class PoliciesResource
The "policies" collection of methods.
Inherited Members
Namespace: Google.Apis.Iam.v2
Assembly: Google.Apis.Iam.v2.dll
Syntax
public class PoliciesResource
Constructors
PoliciesResource(IClientService)
Constructs a new resource.
Declaration
public PoliciesResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Properties
Operations
Gets the Operations resource.
Declaration
public virtual PoliciesResource.OperationsResource Operations { get; }
Property Value
Type | Description |
---|---|
PoliciesResource.OperationsResource |
Methods
CreatePolicy(GoogleIamV2Policy, string)
Creates a policy.
Declaration
public virtual PoliciesResource.CreatePolicyRequest CreatePolicy(GoogleIamV2Policy body, string parent)
Parameters
Type | Name | Description |
---|---|---|
GoogleIamV2Policy | body | The body of the request. |
string | parent | Required. The resource that the policy is attached to, along with the kind of policy to create. Format:
|
Returns
Type | Description |
---|---|
PoliciesResource.CreatePolicyRequest |
Delete(string)
Deletes a policy. This action is permanent.
Declaration
public virtual PoliciesResource.DeleteRequest Delete(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The resource name of the policy to delete. Format:
|
Returns
Type | Description |
---|---|
PoliciesResource.DeleteRequest |
Get(string)
Gets a policy.
Declaration
public virtual PoliciesResource.GetRequest Get(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The resource name of the policy to retrieve. Format:
|
Returns
Type | Description |
---|---|
PoliciesResource.GetRequest |
ListPolicies(string)
Retrieves the policies of the specified kind that are attached to a resource. The response lists only policy metadata. In particular, policy rules are omitted.
Declaration
public virtual PoliciesResource.ListPoliciesRequest ListPolicies(string parent)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The resource that the policy is attached to, along with the kind of policy to list. Format:
|
Returns
Type | Description |
---|---|
PoliciesResource.ListPoliciesRequest |
Update(GoogleIamV2Policy, string)
Updates the specified policy. You can update only the rules and the display name for the policy. To update a
policy, you should use a read-modify-write loop: 1. Use GetPolicy to read the current version of the policy.
2. Modify the policy as needed. 3. Use UpdatePolicy
to write the updated policy. This pattern helps
prevent conflicts between concurrent updates.
Declaration
public virtual PoliciesResource.UpdateRequest Update(GoogleIamV2Policy body, string name)
Parameters
Type | Name | Description |
---|---|---|
GoogleIamV2Policy | body | The body of the request. |
string | name | Immutable. The resource name of the |
Returns
Type | Description |
---|---|
PoliciesResource.UpdateRequest |