Google_Service_ServiceConsumerManagement_Resource_ServicesTenancyUnits
extends Google_Service_Resource
in package
The "tenancyUnits" collection of methods.
Typical usage is:
$serviceconsumermanagementService = new Google_Service_ServiceConsumerManagement(...);
$tenancyUnits = $serviceconsumermanagementService->tenancyUnits;
Table of Contents
- $client : Google_Client
- $methods : array<string|int, mixed>
- $resourceName : string
- $rootUrl : string
- $serviceName : string
- $servicePath : string
- $stackParameters : mixed
- __construct() : mixed
- addProject() : Google_Service_ServiceConsumerManagement_Operation
- Add a new tenant project to the tenancy unit. There can be a maximum of 1024 tenant projects in a tenancy unit. If there are previously failed `AddTenantProject` calls, you might need to call `RemoveTenantProject` first to resolve them before you can make another call to `AddTenantProject` with the same tag. Operation. (tenancyUnits.addProject)
- applyProjectConfig() : Google_Service_ServiceConsumerManagement_Operation
- Apply a configuration to an existing tenant project. This project must exist in an active state and have the original owner account. The caller must have permission to add a project to the given tenancy unit. The configuration is applied, but any existing settings on the project aren't modified. Specified policy bindings are applied. Existing bindings aren't modified. Specified services are activated. No service is deactivated. If specified, new billing configuration is applied. Omit a billing configuration to keep the existing one. A service account in the project is created if previously non existed.
- attachProject() : Google_Service_ServiceConsumerManagement_Operation
- Attach an existing project to the tenancy unit as a new tenant resource. The project could either be the tenant project reserved by calling `AddTenantProject` under a tenancy unit of a service producer's project of a managed service, or from a separate project. The caller is checked against a set of permissions as if calling `AddTenantProject` on the same service consumer. To trigger the attachment, the targeted tenant project must be in a folder. Make sure the ServiceConsumerManagement service account is the owner of that project. These two requirements are already met if the project is reserved by calling `AddTenantProject`. Operation.
- call() : Google_Http_Request|expectedClass
- TODO: This function needs simplifying.
- create() : Google_Service_ServiceConsumerManagement_TenancyUnit
- Creates a tenancy unit with no tenant resources. If tenancy unit already exists, it will be returned, however, in this case, returned TenancyUnit does not have tenant_resources field set and ListTenancyUnits has to be used to get a complete TenancyUnit with all fields populated. (tenancyUnits.create)
- createRequestUri() : string
- Parse/expand request parameters and create a fully qualified request uri.
- delete() : Google_Service_ServiceConsumerManagement_Operation
- Delete a tenancy unit. Before you delete the tenancy unit, there should be no tenant resources in it that aren't in a DELETED state. Operation.
- deleteProject() : Google_Service_ServiceConsumerManagement_Operation
- Deletes the specified project resource identified by a tenant resource tag.
- listServicesTenancyUnits() : Google_Service_ServiceConsumerManagement_ListTenancyUnitsResponse
- Find the tenancy unit for a managed service and service consumer. This method shouldn't be used in a service producer's runtime path, for example to find the tenant project number when creating VMs. Service producers must persist the tenant project's information after the project is created.
- removeProject() : Google_Service_ServiceConsumerManagement_Operation
- Removes the specified project resource identified by a tenant resource tag.
- undeleteProject() : Google_Service_ServiceConsumerManagement_Operation
- Attempts to undelete a previously deleted tenant project. The project must be in a DELETED state. There are no guarantees that an undeleted project will be in a fully restored and functional state. Call the `ApplyTenantProjectConfig` method to update its configuration and then validate all managed service resources. Operation. (tenancyUnits.undeleteProject)
- convertToArrayAndStripNulls() : mixed
Properties
$client
private
Google_Client
$client
$methods
private
array<string|int, mixed>
$methods
$resourceName
private
string
$resourceName
$rootUrl
private
string
$rootUrl
$serviceName
private
string
$serviceName
$servicePath
private
string
$servicePath
$stackParameters
private
mixed
$stackParameters
= array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))
Methods
__construct()
public
__construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
- $service : mixed
- $serviceName : mixed
- $resourceName : mixed
- $resource : mixed
Return values
mixed —addProject()
Add a new tenant project to the tenancy unit. There can be a maximum of 1024 tenant projects in a tenancy unit. If there are previously failed `AddTenantProject` calls, you might need to call `RemoveTenantProject` first to resolve them before you can make another call to `AddTenantProject` with the same tag. Operation. (tenancyUnits.addProject)
public
addProject(string $parent, Google_Service_ServiceConsumerManagement_AddTenantProjectRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ServiceConsumerManagement_Operation
Parameters
- $parent : string
-
Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.
- $postBody : Google_Service_ServiceConsumerManagement_AddTenantProjectRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ServiceConsumerManagement_Operation —applyProjectConfig()
Apply a configuration to an existing tenant project. This project must exist in an active state and have the original owner account. The caller must have permission to add a project to the given tenancy unit. The configuration is applied, but any existing settings on the project aren't modified. Specified policy bindings are applied. Existing bindings aren't modified. Specified services are activated. No service is deactivated. If specified, new billing configuration is applied. Omit a billing configuration to keep the existing one. A service account in the project is created if previously non existed.
public
applyProjectConfig(string $name, Google_Service_ServiceConsumerManagement_ApplyTenantProjectConfigRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ServiceConsumerManagement_Operation
Specified labels will be appended to tenant project, note that the value of existing label key will be updated if the same label key is requested. The specified folder is ignored, as moving a tenant project to a different folder isn't supported. The operation fails if any of the steps fail, but no rollback of already applied configuration changes is attempted. Operation. (tenancyUnits.applyProjectConfig)
Parameters
- $name : string
-
Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.
- $postBody : Google_Service_ServiceConsumerManagement_ApplyTenantProjectConfigRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ServiceConsumerManagement_Operation —attachProject()
Attach an existing project to the tenancy unit as a new tenant resource. The project could either be the tenant project reserved by calling `AddTenantProject` under a tenancy unit of a service producer's project of a managed service, or from a separate project. The caller is checked against a set of permissions as if calling `AddTenantProject` on the same service consumer. To trigger the attachment, the targeted tenant project must be in a folder. Make sure the ServiceConsumerManagement service account is the owner of that project. These two requirements are already met if the project is reserved by calling `AddTenantProject`. Operation.
public
attachProject(string $name, Google_Service_ServiceConsumerManagement_AttachTenantProjectRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ServiceConsumerManagement_Operation
(tenancyUnits.attachProject)
Parameters
- $name : string
-
Required. Name of the tenancy unit that the project will be attached to. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.
- $postBody : Google_Service_ServiceConsumerManagement_AttachTenantProjectRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ServiceConsumerManagement_Operation —call()
TODO: This function needs simplifying.
public
call( $name, $arguments[, $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
Tags
Return values
Google_Http_Request|expectedClass —create()
Creates a tenancy unit with no tenant resources. If tenancy unit already exists, it will be returned, however, in this case, returned TenancyUnit does not have tenant_resources field set and ListTenancyUnits has to be used to get a complete TenancyUnit with all fields populated. (tenancyUnits.create)
public
create(string $parent, Google_Service_ServiceConsumerManagement_CreateTenancyUnitRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ServiceConsumerManagement_TenancyUnit
Parameters
- $parent : string
-
Required. services/{service}/{collection id}/{resource id} {collection id} is the cloud resource collection type representing the service consumer, for example 'projects', or 'organizations'. {resource id} is the consumer numeric id, such as project number: '123456'. {service} the name of a managed service, such as 'service.googleapis.com'. Enables service binding using the new tenancy unit.
- $postBody : Google_Service_ServiceConsumerManagement_CreateTenancyUnitRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ServiceConsumerManagement_TenancyUnit —createRequestUri()
Parse/expand request parameters and create a fully qualified request uri.
public
createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
- $restPath : string
- $params : array<string|int, mixed>
Tags
Return values
string —$requestUrl
delete()
Delete a tenancy unit. Before you delete the tenancy unit, there should be no tenant resources in it that aren't in a DELETED state. Operation.
public
delete(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ServiceConsumerManagement_Operation
(tenancyUnits.delete)
Parameters
- $name : string
-
Required. Name of the tenancy unit to be deleted.
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ServiceConsumerManagement_Operation —deleteProject()
Deletes the specified project resource identified by a tenant resource tag.
public
deleteProject(string $name, Google_Service_ServiceConsumerManagement_DeleteTenantProjectRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ServiceConsumerManagement_Operation
The mothod removes a project lien with a 'TenantManager' origin if that was
added. It will then attempt to delete the project. If that operation fails,
this method also fails. After the project has been deleted, the tenant
resource state is set to DELETED. To permanently remove resource metadata,
call the RemoveTenantProject method. New resources with the same tag can't
be added if there are existing resources in a DELETED state. Operation.
(tenancyUnits.deleteProject)
Parameters
- $name : string
-
Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.
- $postBody : Google_Service_ServiceConsumerManagement_DeleteTenantProjectRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ServiceConsumerManagement_Operation —listServicesTenancyUnits()
Find the tenancy unit for a managed service and service consumer. This method shouldn't be used in a service producer's runtime path, for example to find the tenant project number when creating VMs. Service producers must persist the tenant project's information after the project is created.
public
listServicesTenancyUnits(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ServiceConsumerManagement_ListTenancyUnitsResponse
(tenancyUnits.listServicesTenancyUnits)
Parameters
- $parent : string
-
Required. Managed service and service consumer. Required. services/{service}/{collection id}/{resource id} {collection id} is the cloud resource collection type representing the service consumer, for example 'projects', or 'organizations'. {resource id} is the consumer numeric id, such as project number: '123456'. {service} the name of a service, such as 'service.googleapis.com'.
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_ServiceConsumerManagement_ListTenancyUnitsResponse —removeProject()
Removes the specified project resource identified by a tenant resource tag.
public
removeProject(string $name, Google_Service_ServiceConsumerManagement_RemoveTenantProjectRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ServiceConsumerManagement_Operation
The method removes the project lien with 'TenantManager' origin if that was added. It then attempts to delete the project. If that operation fails, this method also fails. Calls to remove already removed or non-existent tenant project succeed. After the project has been deleted, or if was already in a DELETED state, resource metadata is permanently removed from the tenancy unit. Operation. (tenancyUnits.removeProject)
Parameters
- $name : string
-
Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.
- $postBody : Google_Service_ServiceConsumerManagement_RemoveTenantProjectRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ServiceConsumerManagement_Operation —undeleteProject()
Attempts to undelete a previously deleted tenant project. The project must be in a DELETED state. There are no guarantees that an undeleted project will be in a fully restored and functional state. Call the `ApplyTenantProjectConfig` method to update its configuration and then validate all managed service resources. Operation. (tenancyUnits.undeleteProject)
public
undeleteProject(string $name, Google_Service_ServiceConsumerManagement_UndeleteTenantProjectRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ServiceConsumerManagement_Operation
Parameters
- $name : string
-
Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.
- $postBody : Google_Service_ServiceConsumerManagement_UndeleteTenantProjectRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_ServiceConsumerManagement_Operation —convertToArrayAndStripNulls()
protected
convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
- $o : mixed