Google Cloud Iam V3 Client - Class CreatePolicyBindingRequest (1.1.0)

Reference documentation and code samples for the Google Cloud Iam V3 Client class CreatePolicyBindingRequest.

Request message for CreatePolicyBinding method.

Generated from protobuf message google.iam.v3.CreatePolicyBindingRequest

Namespace

Google \ Cloud \ Iam \ V3

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ parent string

Required. The parent resource where this policy binding will be created. The binding parent is the closest Resource Manager resource (project, folder or organization) to the binding target. Format: * * projects/{project_id}/locations/{location} * * projects/{project_number}/locations/{location} * * folders/{folder_id}/locations/{location} * * organizations/{organization_id}/locations/{location}

↳ policy_binding_id string

Required. The ID to use for the policy binding, which will become the final component of the policy binding's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-.]{2,62}/.

↳ policy_binding PolicyBinding

Required. The policy binding to create.

↳ validate_only bool

Optional. If set, validate the request and preview the creation, but do not actually post it.

getParent

Required. The parent resource where this policy binding will be created.

The binding parent is the closest Resource Manager resource (project, folder or organization) to the binding target. Format:

  • projects/{project_id}/locations/{location}
  • projects/{project_number}/locations/{location}
  • folders/{folder_id}/locations/{location}
  • organizations/{organization_id}/locations/{location}
Returns
Type Description
string

setParent

Required. The parent resource where this policy binding will be created.

The binding parent is the closest Resource Manager resource (project, folder or organization) to the binding target. Format:

  • projects/{project_id}/locations/{location}
  • projects/{project_number}/locations/{location}
  • folders/{folder_id}/locations/{location}
  • organizations/{organization_id}/locations/{location}
Parameter
Name Description
var string
Returns
Type Description
$this

getPolicyBindingId

Required. The ID to use for the policy binding, which will become the final component of the policy binding's resource name.

This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-.]{2,62}/.

Returns
Type Description
string

setPolicyBindingId

Required. The ID to use for the policy binding, which will become the final component of the policy binding's resource name.

This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-.]{2,62}/.

Parameter
Name Description
var string
Returns
Type Description
$this

getPolicyBinding

Required. The policy binding to create.

Returns
Type Description
PolicyBinding|null

hasPolicyBinding

clearPolicyBinding

setPolicyBinding

Required. The policy binding to create.

Parameter
Name Description
var PolicyBinding
Returns
Type Description
$this

getValidateOnly

Optional. If set, validate the request and preview the creation, but do not actually post it.

Returns
Type Description
bool

setValidateOnly

Optional. If set, validate the request and preview the creation, but do not actually post it.

Parameter
Name Description
var bool
Returns
Type Description
$this

static::build

Parameters
Name Description
parent string

Required. The parent resource where this policy binding will be created. The binding parent is the closest Resource Manager resource (project, folder or organization) to the binding target.

Format:

    • projects/{project_id}/locations/{location}
    • projects/{project_number}/locations/{location}
    • folders/{folder_id}/locations/{location}
    • organizations/{organization_id}/locations/{location} Please see PolicyBindingsClient::organizationLocationName() for help formatting this field.
policyBinding PolicyBinding

Required. The policy binding to create.

policyBindingId string

Required. The ID to use for the policy binding, which will become the final component of the policy binding's resource name.

This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-.]{2,62}/.

Returns
Type Description
CreatePolicyBindingRequest