class ProjectsLocationsNamespaces extends Resource (View source)

The "namespaces" collection of methods.

Typical usage is:

 $servicedirectoryService = new Google\Service\ServiceDirectory(...);
 $namespaces = $servicedirectoryService->projects_locations_namespaces;

Methods

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

Creates a namespace, and returns the new namespace. (namespaces.create)

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

Deletes a namespace. This also deletes all services and endpoints in the namespace. (namespaces.delete)

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

Gets a namespace. (namespaces.get)

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

Gets the IAM Policy for a resource (namespace or service only).

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

Lists all namespaces. (namespaces.listProjectsLocationsNamespaces)

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

Updates a namespace. (namespaces.patch)

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

Sets the IAM Policy for a resource (namespace or service only).

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

Tests IAM permissions for a resource (namespace or service only).

Details

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

Creates a namespace, and returns the new namespace. (namespaces.create)

Parameters

string $parent

Required. The resource name of the project and location the namespace will be created in.

ServicedirectoryNamespace $postBody
array $optParams

Optional parameters.

Return Value

ServicedirectoryNamespace

Exceptions

Exception

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

Deletes a namespace. This also deletes all services and endpoints in the namespace. (namespaces.delete)

Parameters

string $name

Required. The name of the namespace to delete.

array $optParams

Optional parameters.

Return Value

ServicedirectoryEmpty

Exceptions

Exception

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

Gets a namespace. (namespaces.get)

Parameters

string $name

Required. The name of the namespace to retrieve.

array $optParams

Optional parameters.

Return Value

ServicedirectoryNamespace

Exceptions

Exception

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

Gets the IAM Policy for a resource (namespace or service only).

(namespaces.getIamPolicy)

Parameters

string $resource

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

GetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

ListNamespacesResponse listProjectsLocationsNamespaces(string $parent, array $optParams = [])

Lists all namespaces. (namespaces.listProjectsLocationsNamespaces)

Parameters

string $parent

Required. The resource name of the project and location whose namespaces you'd like to list.

array $optParams

Optional parameters.

Return Value

ListNamespacesResponse

Exceptions

Exception

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

Updates a namespace. (namespaces.patch)

Parameters

string $name

Immutable. The resource name for the namespace in the format projects/locations/namespaces.

ServicedirectoryNamespace $postBody
array $optParams

Optional parameters.

Return Value

ServicedirectoryNamespace

Exceptions

Exception

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

Sets the IAM Policy for a resource (namespace or service only).

(namespaces.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 = [])

Tests IAM permissions for a resource (namespace or service only).

(namespaces.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