Class PoliciesResource.CreatePolicyRequest
Creates a policy.
Inheritance
Inherited Members
Namespace: Google.Apis.Iam.v2
Assembly: Google.Apis.Iam.v2.dll
Syntax
public class PoliciesResource.CreatePolicyRequest : IamBaseServiceRequest<GoogleLongrunningOperation>, IClientServiceRequest<GoogleLongrunningOperation>, IClientServiceRequest
Constructors
CreatePolicyRequest(IClientService, GoogleIamV2Policy, string)
Constructs a new CreatePolicy request.
Declaration
public CreatePolicyRequest(IClientService service, GoogleIamV2Policy body, string parent)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service | |
GoogleIamV2Policy | body | |
string | parent |
Properties
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Parent
Required. The resource that the policy is attached to, along with the kind of policy to create. Format:
policies/{attachment_point}/denypolicies
The attachment point is identified by its URL-encoded full
resource name, which means that the forward-slash character, /
, must be written as %2F
. For example,
policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies
. For organizations
and folders, use the numeric ID in the full resource name. For projects, you can use the alphanumeric or
the numeric ID.
Declaration
[RequestParameter("parent", RequestParameterType.Path)]
public virtual string Parent { get; }
Property Value
Type | Description |
---|---|
string |
PolicyId
The ID to use for this policy, which will become the final component of the policy's resource name. The
ID must contain 3 to 63 characters. It can contain lowercase letters and numbers, as well as dashes
(-
) and periods (.
). The first character must be a lowercase letter.
Declaration
[RequestParameter("policyId", RequestParameterType.Query)]
public virtual string PolicyId { get; set; }
Property Value
Type | Description |
---|---|
string |
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
Type | Description |
---|---|
object |
Overrides
InitParameters()
Initializes CreatePolicy parameter list.
Declaration
protected override void InitParameters()