class ProjectsLocationsMemberships extends Resource (View source)

The "memberships" collection of methods.

Typical usage is:

 $gkehubService = new Google\Service\GKEHub(...);
 $memberships = $gkehubService->projects_locations_memberships;

Methods

create(string $parent, Membership $postBody, array $optParams = [])

Creates a new Membership. This is currently only supported for GKE clusters on Google Cloud. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering- a-cluster. (memberships.create)

delete(string $name, array $optParams = [])

Removes a Membership. This is currently only supported for GKE clusters on Google Cloud. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster- management/connect/unregistering-a-cluster. (memberships.delete)

generateConnectManifest(string $name, array $optParams = [])

Generates the manifest for deployment of the GKE connect agent. This method is used internally by Google-provided libraries. Most clients should not need to call this method directly. (memberships.generateConnectManifest)

get(string $name, array $optParams = [])

Gets the details of a Membership. (memberships.get)

getIamPolicy(string $resource, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (memberships.getIamPolicy)

listProjectsLocationsMemberships(string $parent, array $optParams = [])

Lists Memberships in a given project and location.

patch(string $name, Membership $postBody, array $optParams = [])

Updates an existing Membership. (memberships.patch)

setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (memberships.setIamPolicy)

testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

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.

Details

Operation create(string $parent, Membership $postBody, array $optParams = [])

Creates a new Membership. This is currently only supported for GKE clusters on Google Cloud. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering- a-cluster. (memberships.create)

Parameters

string $parent

Required. The parent (project and location) where the Memberships will be created. Specified in the format projects/locations.

Membership $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation delete(string $name, array $optParams = [])

Removes a Membership. This is currently only supported for GKE clusters on Google Cloud. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster- management/connect/unregistering-a-cluster. (memberships.delete)

Parameters

string $name

Required. The Membership resource name in the format projects/locations/memberships.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

GenerateConnectManifestResponse generateConnectManifest(string $name, array $optParams = [])

Generates the manifest for deployment of the GKE connect agent. This method is used internally by Google-provided libraries. Most clients should not need to call this method directly. (memberships.generateConnectManifest)

Parameters

string $name

Required. The Membership resource name the Agent will associate with, in the format projects/locations/memberships.

array $optParams

Optional parameters.

Return Value

GenerateConnectManifestResponse

Exceptions

Exception

Membership get(string $name, array $optParams = [])

Gets the details of a Membership. (memberships.get)

Parameters

string $name

Required. The Membership resource name in the format projects/locations/memberships.

array $optParams

Optional parameters.

Return Value

Membership

Exceptions

Exception

Policy getIamPolicy(string $resource, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (memberships.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

ListMembershipsResponse listProjectsLocationsMemberships(string $parent, array $optParams = [])

Lists Memberships in a given project and location.

(memberships.listProjectsLocationsMemberships)

Parameters

string $parent

Required. The parent (project and location) where the Memberships will be listed. Specified in the format projects/locations. projects/locations/- list memberships in all the regions.

array $optParams

Optional parameters.

Return Value

ListMembershipsResponse

Exceptions

Exception

Operation patch(string $name, Membership $postBody, array $optParams = [])

Updates an existing Membership. (memberships.patch)

Parameters

string $name

Required. The Membership resource name in the format projects/locations/memberships.

Membership $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Policy setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (memberships.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

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. (memberships.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception