Class ProjectsResource.PolicyResource
The "policy" collection of methods.
Inherited Members
Namespace: Google.Apis.BinaryAuthorization.v1beta1
Assembly: Google.Apis.BinaryAuthorization.v1beta1.dll
Syntax
public class ProjectsResource.PolicyResource
Constructors
PolicyResource(IClientService)
Constructs a new resource.
Declaration
public PolicyResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Methods
GetIamPolicy(string)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Declaration
public virtual ProjectsResource.PolicyResource.GetIamPolicyRequest GetIamPolicy(string resource)
Parameters
Type | Name | Description |
---|---|---|
string | resource | REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field. |
Returns
Type | Description |
---|---|
ProjectsResource.PolicyResource.GetIamPolicyRequest |
SetIamPolicy(SetIamPolicyRequest, string)
Sets the access control policy on the specified resource. Replaces any existing policy. Can return
NOT_FOUND
, INVALID_ARGUMENT
, and PERMISSION_DENIED
errors.
Declaration
public virtual ProjectsResource.PolicyResource.SetIamPolicyRequest SetIamPolicy(SetIamPolicyRequest body, string resource)
Parameters
Type | Name | Description |
---|---|---|
SetIamPolicyRequest | body | The body of the request. |
string | resource | REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field. |
Returns
Type | Description |
---|---|
ProjectsResource.PolicyResource.SetIamPolicyRequest |
TestIamPermissions(TestIamPermissionsRequest, string)
Returns permissions that a caller has on the specified resource. If the resource does not exist, this
will return an empty set of permissions, not a NOT_FOUND
error. Note: This operation is designed to be
used for building permission-aware UIs and command-line tools, not for authorization checking. This
operation may "fail open" without warning.
Declaration
public virtual ProjectsResource.PolicyResource.TestIamPermissionsRequest TestIamPermissions(TestIamPermissionsRequest body, string resource)
Parameters
Type | Name | Description |
---|---|---|
TestIamPermissionsRequest | body | The body of the request. |
string | resource | REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field. |
Returns
Type | Description |
---|---|
ProjectsResource.PolicyResource.TestIamPermissionsRequest |