Full name: projects.locations.instances.tenants.create
Provisions a new tenant under the specified partner/MSSP parent resource.
Behavior
- The API returns a
google.longrunning.Operation. The client must poll this operation (usingGetOperationin the operations service) to monitor the provisioning progress. - The operation's metadata is of type
TenantMetadata. The client should inspectcreationWorkflowStatus(of typeWorkflowState) in the metadata to determine the workflow status. - If the provisioning workflow fails or encounters an issue requiring intervention, the operation's
donefield remainsfalse(the operation is not successfully completion-finished), and thecreationWorkflowStatustransitions toERROR. - If the tenant's
displayName,customerCode, andfrontendPathConfigsmatch those of an existing tenant, the API behaves as a retry of the provisioning workflow:- If the existing provisioning workflow has already completed (
WorkflowStateisFINISHED), the API returnsALREADY_EXISTS. - If the existing workflow is in a retryable state (e.g.,
ERRORorCANCELLED), it retries the creation workflow.
- If the existing provisioning workflow has already completed (
- If the tenant's parameters (e.g.,
displayNameorfrontendPathConfigs) differ from the existing tenant under the samecustomerCode, the API returnsALREADY_EXISTS.
Error Scenarios
PERMISSION_DENIED
- The caller is not authorized or recognized as a partner (MSSP).
- The caller does not have the
billing.resourceAssociations.createpermission on the specifiedbillingAccount.
INVALID_ARGUMENT
- The request is missing the
tenantfield. - The tenant's
billingAccountortenantGcpProjectis missing or invalid. - The
displayNameorcustomerCode(tenant ID) violates validation constraints. - The
authMethodis invalid, unspecified, or unsupported. - The
retentionDurationis invalid or unspecified. - The GCP project format is invalid, or the project number is negative.
- The validation of
frontendPathConfigsfails. - The
provisioningFlowspecification is invalid.
ALREADY_EXISTS
- The tenant with the specified
customerCodehas already been fully provisioned. - The tenant is already associated with another GCP project.
- The provided GCP project is already associated with another customer or tenant.
FAILED_PRECONDITION
- Multiple active SecOps contracts are found for the specified
billingAccount. - The requested data retention duration does not match the data retention duration specified in the contract.
- Tenant GCP project is not same as the billing account in the SecOps contract.
- For v1alpha,
BACKSTORY_API_PARITYflow is used, but active SecOps contracts exist for thebillingAccount(the client must use theTENANT_ATTRIBUTIONflow instead). - The customer SecOps contract is not of type
MANAGED_SECURITY_SERVICE_PROVIDER.
HTTP request
POST https://{endpoint}/v1alpha/{parent}/tenants
Where {endpoint} is one of the supported service endpoints.
Path parameters
| Parameters | |
|---|---|
parent |
Required. Resource name of the Partner Format: projects/{project}/locations/{location}/instances/{instanceId} |
Request body
The request body contains an instance of Tenant.
Response body
If successful, the response body contains a newly created instance of Operation.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/chroniclehttps://www.googleapis.com/auth/chronicle.readonly
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the parent resource:
chronicle.tenants.create
Requires the following IAM permission on the tenantGcpProject resource:
chronicle.instances.update
For more information, see the IAM documentation.