Reference documentation and code samples for the Google Cloud Channel V1 Client class CloudChannelServiceClient.
Service Description: CloudChannelService lets Google cloud resellers and distributors manage their customers, channel partners, entitlements, and reports.
Using this service:
- Resellers and distributors can manage a customer entity.
- Distributors can register an authorized reseller in their channel and provide them with delegated admin access.
- Resellers and distributors can manage customer entitlements.
CloudChannelService exposes the following resources:
Customers: An entity—usually an enterprise—managed by a reseller or distributor.
Entitlements: An entity that provides a customer with the means to use a service. Entitlements are created or updated as a result of a successful fulfillment.
ChannelPartnerLinks: An entity that identifies links between distributors and their indirect resellers in a channel.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$name = 'name';
$operationResponse = $cloudChannelServiceClient->activateEntitlement($name);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$result = $operationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $cloudChannelServiceClient->activateEntitlement($name);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $cloudChannelServiceClient->resumeOperation($operationName, 'activateEntitlement');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
$result = $newOperationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$cloudChannelServiceClient->close();
}
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parseName method to extract the individual identifiers contained within formatted names that are returned by the API.
Methods
channelPartnerLinkName
Formats a string containing the fully-qualified path to represent a channel_partner_link resource.
Parameters | |
---|---|
Name | Description |
account |
string
|
channelPartnerLink |
string
|
Returns | |
---|---|
Type | Description |
string | The formatted channel_partner_link resource. |
customerName
Formats a string containing the fully-qualified path to represent a customer resource.
Parameters | |
---|---|
Name | Description |
account |
string
|
customer |
string
|
Returns | |
---|---|
Type | Description |
string | The formatted customer resource. |
entitlementName
Formats a string containing the fully-qualified path to represent a entitlement resource.
Parameters | |
---|---|
Name | Description |
account |
string
|
customer |
string
|
entitlement |
string
|
Returns | |
---|---|
Type | Description |
string | The formatted entitlement resource. |
offerName
Formats a string containing the fully-qualified path to represent a offer resource.
Parameters | |
---|---|
Name | Description |
account |
string
|
offer |
string
|
Returns | |
---|---|
Type | Description |
string | The formatted offer resource. |
productName
Formats a string containing the fully-qualified path to represent a product resource.
Parameter | |
---|---|
Name | Description |
product |
string
|
Returns | |
---|---|
Type | Description |
string | The formatted product resource. |
parseName
Parses a formatted name string and returns an associative array of the components in the name.
The following name formats are supported: Template: Pattern
- channelPartnerLink: accounts/{account}/channelPartnerLinks/{channel_partner_link}
- customer: accounts/{account}/customers/{customer}
- entitlement: accounts/{account}/customers/{customer}/entitlements/{entitlement}
- offer: accounts/{account}/offers/{offer}
- product: products/{product}
The optional $template argument can be supplied to specify a particular pattern, and must match one of the templates listed above. If no $template argument is provided, or if the $template argument does not match one of the templates listed, then parseName will check each of the supported templates, and return the first match.
Parameters | |
---|---|
Name | Description |
formattedName |
string
The formatted name string |
template |
string
Optional name of template to match |
Returns | |
---|---|
Type | Description |
array | An associative array from name component IDs to component values. |
getOperationsClient
Return an OperationsClient object with the same endpoint as $this.
Returns | |
---|---|
Type | Description |
Google\ApiCore\LongRunning\OperationsClient |
resumeOperation
Resume an existing long running operation that was previously started by a long running API method. If $methodName is not provided, or does not match a long running API method, then the operation can still be resumed, but the OperationResponse object will not deserialize the final response.
Parameters | |
---|---|
Name | Description |
operationName |
string
The name of the long running operation |
methodName |
string
The name of the method used to start the operation |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
options |
array
Optional. Options for configuring the service API wrapper. |
↳ serviceAddress |
string
Deprecated. This option will be removed in a future major release. Please utilize the |
↳ apiEndpoint |
string
The address of the API remote host. May optionally include the port, formatted as "
|
↳ credentials |
string|array|FetchAuthTokenInterface|CredentialsWrapper
The credentials to be used by the client to authorize API calls. This option accepts either a path to a credentials file, or a decoded credentials file as a PHP array. Advanced usage: In addition, this option can also accept a pre-constructed {@see} object or {@see} object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. |
↳ credentialsConfig |
array
Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see {@see} . |
↳ disableRetries |
bool
Determines whether or not retries defined by the client configuration should be disabled. Defaults to |
↳ clientConfig |
string|array
Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder. |
↳ transport |
string|TransportInterface
The transport used for executing network requests. May be either the string |
↳ transportConfig |
array
Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = [ 'grpc' => [...], 'rest' => [...], ]; See the {@see} and {@see} methods for the supported options. |
↳ clientCertSource |
callable
A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS. |
activateEntitlement
Activates a previously suspended entitlement. Entitlements suspended for pending ToS acceptance can't be activated using this method.
An entitlement activation is a long-running operation and it updates the state of the customer entitlement.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: Entitlement resource not found.
- SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated suspensions and entitlements that have accepted the TOS.
- NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE state.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$name = 'name';
$operationResponse = $cloudChannelServiceClient->activateEntitlement($name);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$result = $operationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $cloudChannelServiceClient->activateEntitlement($name);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $cloudChannelServiceClient->resumeOperation($operationName, 'activateEntitlement');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
$result = $newOperationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
name |
string
Required. The resource name of the entitlement to activate. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} |
optionalArgs |
array
Optional. |
↳ requestId |
string
Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
cancelEntitlement
Cancels a previously fulfilled entitlement.
An entitlement cancellation is a long-running operation.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- FAILED_PRECONDITION: There are Google Cloud projects linked to the Google Cloud entitlement's Cloud Billing subaccount.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: Entitlement resource not found.
- DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons, or entitlements for Google Cloud's development platform.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$name = 'name';
$operationResponse = $cloudChannelServiceClient->cancelEntitlement($name);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $cloudChannelServiceClient->cancelEntitlement($name);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $cloudChannelServiceClient->resumeOperation($operationName, 'cancelEntitlement');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
name |
string
Required. The resource name of the entitlement to cancel. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} |
optionalArgs |
array
Optional. |
↳ requestId |
string
Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
changeOffer
Updates the Offer for an existing customer entitlement.
An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: Offer or Entitlement resource not found.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$name = 'name';
$formattedOffer = $cloudChannelServiceClient->offerName('[ACCOUNT]', '[OFFER]');
$operationResponse = $cloudChannelServiceClient->changeOffer($name, $formattedOffer);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$result = $operationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $cloudChannelServiceClient->changeOffer($name, $formattedOffer);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $cloudChannelServiceClient->resumeOperation($operationName, 'changeOffer');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
$result = $newOperationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
name |
string
Required. The resource name of the entitlement to update. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} |
offer |
string
Required. New Offer. Format: accounts/{account_id}/offers/{offer_id}. |
optionalArgs |
array
Optional. |
↳ parameters |
Parameter[]
Optional. Parameters needed to purchase the Offer. To view the available Parameters refer to the Offer.parameter_definitions from the desired offer. |
↳ purchaseOrderId |
string
Optional. Purchase order id provided by the reseller. |
↳ requestId |
string
Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
changeParameters
Change parameters of the entitlement.
An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid. For example, the number of seats being changed is greater than the allowed number of max seats, or decreasing seats for a commitment based plan.
- NOT_FOUND: Entitlement resource not found.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$name = 'name';
$parameters = [];
$operationResponse = $cloudChannelServiceClient->changeParameters($name, $parameters);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$result = $operationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $cloudChannelServiceClient->changeParameters($name, $parameters);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $cloudChannelServiceClient->resumeOperation($operationName, 'changeParameters');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
$result = $newOperationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
name |
string
Required. The name of the entitlement to update. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} |
parameters |
array<Google\Cloud\Channel\V1\Parameter>
Required. Entitlement parameters to update. You can only change editable parameters. To view the available Parameters for a request, refer to the Offer.parameter_definitions from the desired offer. |
optionalArgs |
array
Optional. |
↳ requestId |
string
Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( |
↳ purchaseOrderId |
string
Optional. Purchase order ID provided by the reseller. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
changeRenewalSettings
Updates the renewal settings for an existing customer entitlement.
An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: Entitlement resource not found.
- NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't enable or disable renewals for non-commitment plans.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$name = 'name';
$renewalSettings = new RenewalSettings();
$operationResponse = $cloudChannelServiceClient->changeRenewalSettings($name, $renewalSettings);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$result = $operationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $cloudChannelServiceClient->changeRenewalSettings($name, $renewalSettings);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $cloudChannelServiceClient->resumeOperation($operationName, 'changeRenewalSettings');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
$result = $newOperationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
name |
string
Required. The name of the entitlement to update. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} |
renewalSettings |
Google\Cloud\Channel\V1\RenewalSettings
Required. New renewal settings. |
optionalArgs |
array
Optional. |
↳ requestId |
string
Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
checkCloudIdentityAccountsExist
Confirms the existence of Cloud Identity accounts based on the domain and if the Cloud Identity accounts are owned by the reseller.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- INVALID_VALUE: Invalid domain value in the request.
Return value: A list of CloudIdentityCustomerAccount resources for the domain (may be empty)
Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if no CloudIdentityCustomerAccount resources match the domain.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$parent = 'parent';
$domain = 'domain';
$response = $cloudChannelServiceClient->checkCloudIdentityAccountsExist($parent, $domain);
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
parent |
string
Required. The reseller account's resource name. Parent uses the format: accounts/{account_id} |
domain |
string
Required. Domain to fetch for Cloud Identity account customer. |
optionalArgs |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Channel\V1\CheckCloudIdentityAccountsExistResponse |
createChannelPartnerLink
Initiates a channel partner link between a distributor and a reseller, or between resellers in an n-tier reseller channel.
Invited partners need to follow the invite_link_uri provided in the response to accept. After accepting the invitation, a link is set up between the two parties. You must be a distributor to call this method.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- ALREADY_EXISTS: The ChannelPartnerLink sent in the request already exists.
- NOT_FOUND: No Cloud Identity customer exists for provided domain.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The new ChannelPartnerLink resource.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$parent = 'parent';
$channelPartnerLink = new ChannelPartnerLink();
$response = $cloudChannelServiceClient->createChannelPartnerLink($parent, $channelPartnerLink);
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
parent |
string
Required. Create a channel partner link for the provided reseller account's resource name. Parent uses the format: accounts/{account_id} |
channelPartnerLink |
Google\Cloud\Channel\V1\ChannelPartnerLink
Required. The channel partner link to create. Either channel_partner_link.reseller_cloud_identity_id or domain can be used to create a link. |
optionalArgs |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Channel\V1\ChannelPartnerLink |
createCustomer
Creates a new Customer resource under the reseller or distributor account.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT:
- Required request parameters are missing or invalid.
- Domain field value doesn't match the primary email domain.
Return value: The newly created Customer resource.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$parent = 'parent';
$customer = new Customer();
$response = $cloudChannelServiceClient->createCustomer($parent, $customer);
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
parent |
string
Required. The resource name of reseller account in which to create the customer. Parent uses the format: accounts/{account_id} |
customer |
Google\Cloud\Channel\V1\Customer
Required. The customer to create. |
optionalArgs |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Channel\V1\Customer |
createEntitlement
Creates an entitlement for a customer.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT:
- Required request parameters are missing or invalid.
- There is already a customer entitlement for a SKU from the same product family.
- INVALID_VALUE: Make sure the OfferId is valid. If it is, contact Google Channel support for further troubleshooting.
- NOT_FOUND: The customer or offer resource was not found.
- ALREADY_EXISTS:
- The SKU was already purchased for the customer.
- The customer's primary email already exists. Retry after changing the customer's primary contact email.
- CONDITION_NOT_MET or FAILED_PRECONDITION:
- The domain required for purchasing a SKU has not been verified.
- A pre-requisite SKU required to purchase an Add-On SKU is missing. For example, Google Workspace Business Starter is required to purchase Vault or Drive.
- (Developer accounts only) Reseller and resold domain must meet the following naming requirements:
- Domain names must start with goog-test.
- Domain names must include the reseller domain.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$formattedParent = $cloudChannelServiceClient->customerName('[ACCOUNT]', '[CUSTOMER]');
$entitlement = new Entitlement();
$operationResponse = $cloudChannelServiceClient->createEntitlement($formattedParent, $entitlement);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$result = $operationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $cloudChannelServiceClient->createEntitlement($formattedParent, $entitlement);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $cloudChannelServiceClient->resumeOperation($operationName, 'createEntitlement');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
$result = $newOperationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
parent |
string
Required. The resource name of the reseller's customer account in which to create the entitlement. Parent uses the format: accounts/{account_id}/customers/{customer_id} |
entitlement |
Google\Cloud\Channel\V1\Entitlement
Required. The entitlement to create. |
optionalArgs |
array
Optional. |
↳ requestId |
string
Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
deleteCustomer
Deletes the given Customer permanently.
Possible error codes:
- PERMISSION_DENIED: The account making the request does not own this customer.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- FAILED_PRECONDITION: The customer has existing entitlements.
- NOT_FOUND: No Customer resource found for the name in the request.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$formattedName = $cloudChannelServiceClient->customerName('[ACCOUNT]', '[CUSTOMER]');
$cloudChannelServiceClient->deleteCustomer($formattedName);
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
name |
string
Required. The resource name of the customer to delete. |
optionalArgs |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
getChannelPartnerLink
Returns the requested ChannelPartnerLink resource.
You must be a distributor to call this method.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: ChannelPartnerLink resource not found because of an invalid channel partner link name.
Return value: The ChannelPartnerLink resource.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$name = 'name';
$response = $cloudChannelServiceClient->getChannelPartnerLink($name);
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
name |
string
Required. The resource name of the channel partner link to retrieve. Name uses the format: accounts/{account_id}/channelPartnerLinks/{id} where {id} is the Cloud Identity ID of the partner. |
optionalArgs |
array
Optional. |
↳ view |
int
Optional. The level of granularity the ChannelPartnerLink will display. For allowed values, use constants defined on {@see} |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Channel\V1\ChannelPartnerLink |
getCustomer
Returns the requested Customer resource.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The customer resource doesn't exist. Usually the result of an invalid name parameter.
Return value: The Customer resource.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$formattedName = $cloudChannelServiceClient->customerName('[ACCOUNT]', '[CUSTOMER]');
$response = $cloudChannelServiceClient->getCustomer($formattedName);
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
name |
string
Required. The resource name of the customer to retrieve. Name uses the format: accounts/{account_id}/customers/{customer_id} |
optionalArgs |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Channel\V1\Customer |
getEntitlement
Returns the requested Entitlement resource.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The customer entitlement was not found.
Return value: The requested Entitlement resource.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$formattedName = $cloudChannelServiceClient->entitlementName('[ACCOUNT]', '[CUSTOMER]', '[ENTITLEMENT]');
$response = $cloudChannelServiceClient->getEntitlement($formattedName);
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
name |
string
Required. The resource name of the entitlement to retrieve. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} |
optionalArgs |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Channel\V1\Entitlement |
importCustomer
Imports a Customer from the Cloud Identity associated with the provided Cloud Identity ID or domain before a TransferEntitlements call. If a linked Customer already exists and overwrite_if_exists is true, it will update that Customer's data.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- NOT_FOUND: Cloud Identity doesn't exist or was deleted.
- INVALID_ARGUMENT: Required parameters are missing, or the auth_token is expired or invalid.
- ALREADY_EXISTS: A customer already exists and has conflicting critical fields. Requires an overwrite.
Return value: The Customer.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$customerIdentity = (new CustomerIdentityOneof())->setDomain('domain');
$parent = 'parent';
$overwriteIfExists = false;
$response = $cloudChannelServiceClient->importCustomer($customerIdentity, $parent, $overwriteIfExists);
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
customerIdentity |
Google\Cloud\Channel\V1\ImportCustomerRequest\CustomerIdentityOneof
An instance of the wrapper class for the required proto oneof customer_identity. |
parent |
string
Required. The resource name of the reseller's account. Parent takes the format: accounts/{account_id} or accounts/{account_id}/channelPartnerLinks/{channel_partner_id} |
overwriteIfExists |
bool
Required. Choose to overwrite an existing customer if found. This must be set to true if there is an existing customer with a conflicting region code or domain. |
optionalArgs |
array
Optional. |
↳ authToken |
string
Optional. The super admin of the resold customer generates this token to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. You can omit this token after authorization. See https://support.google.com/a/answer/7643790 for more details. |
↳ channelPartnerId |
string
Optional. Cloud Identity ID of a channel partner who will be the direct reseller for the customer's order. This field is required for 2-tier transfer scenarios and can be provided via the request Parent binding as well. |
↳ customer |
string
Optional. Specifies the customer that will receive imported Cloud Identity information. Format: accounts/{account_id}/customers/{customer_id} |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Channel\V1\Customer |
listChannelPartnerLinks
List ChannelPartnerLinks belonging to a distributor.
You must be a distributor to call this method.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: The list of the distributor account's ChannelPartnerLink resources.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$parent = 'parent';
// Iterate over pages of elements
$pagedResponse = $cloudChannelServiceClient->listChannelPartnerLinks($parent);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $cloudChannelServiceClient->listChannelPartnerLinks($parent);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
parent |
string
Required. The resource name of the reseller account for listing channel partner links. Parent uses the format: accounts/{account_id} |
optionalArgs |
array
Optional. |
↳ pageSize |
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved. |
↳ pageToken |
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API. |
↳ view |
int
Optional. The level of granularity the ChannelPartnerLink will display. For allowed values, use constants defined on {@see} |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
listCustomers
List Customers.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: List of Customers, or an empty list if there are no customers.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$parent = 'parent';
// Iterate over pages of elements
$pagedResponse = $cloudChannelServiceClient->listCustomers($parent);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $cloudChannelServiceClient->listCustomers($parent);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
parent |
string
Required. The resource name of the reseller account to list customers from. Parent uses the format: accounts/{account_id}. |
optionalArgs |
array
Optional. |
↳ pageSize |
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved. |
↳ pageToken |
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
listEntitlements
Lists Entitlements belonging to a customer.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: A list of the customer's Entitlements.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$formattedParent = $cloudChannelServiceClient->customerName('[ACCOUNT]', '[CUSTOMER]');
// Iterate over pages of elements
$pagedResponse = $cloudChannelServiceClient->listEntitlements($formattedParent);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $cloudChannelServiceClient->listEntitlements($formattedParent);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
parent |
string
Required. The resource name of the reseller's customer account to list entitlements for. Parent uses the format: accounts/{account_id}/customers/{customer_id} |
optionalArgs |
array
Optional. |
↳ pageSize |
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved. |
↳ pageToken |
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
listOffers
Lists the Offers the reseller can sell.
Possible error codes:
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$parent = 'parent';
// Iterate over pages of elements
$pagedResponse = $cloudChannelServiceClient->listOffers($parent);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $cloudChannelServiceClient->listOffers($parent);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
parent |
string
Required. The resource name of the reseller account from which to list Offers. Parent uses the format: accounts/{account_id}. |
optionalArgs |
array
Optional. |
↳ pageSize |
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved. |
↳ pageToken |
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API. |
↳ filter |
string
Optional. The expression to filter results by name (name of the Offer), sku.name (name of the SKU), or sku.product.name (name of the Product). Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 Example 2: name=accounts/a1/offers/o1 |
↳ languageCode |
string
Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
listProducts
Lists the Products the reseller is authorized to sell.
Possible error codes:
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$account = 'account';
// Iterate over pages of elements
$pagedResponse = $cloudChannelServiceClient->listProducts($account);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $cloudChannelServiceClient->listProducts($account);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
account |
string
Required. The resource name of the reseller account. Format: accounts/{account_id}. |
optionalArgs |
array
Optional. |
↳ pageSize |
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved. |
↳ pageToken |
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API. |
↳ languageCode |
string
Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
listPurchasableOffers
Lists the following:
- Offers that you can purchase for a customer.
- Offers that you can change for an entitlement.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$formattedCustomer = $cloudChannelServiceClient->customerName('[ACCOUNT]', '[CUSTOMER]');
// Iterate over pages of elements
$pagedResponse = $cloudChannelServiceClient->listPurchasableOffers($formattedCustomer);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $cloudChannelServiceClient->listPurchasableOffers($formattedCustomer);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
customer |
string
Required. The resource name of the customer to list Offers for. Format: accounts/{account_id}/customers/{customer_id}. |
optionalArgs |
array
Optional. |
↳ createEntitlementPurchase |
CreateEntitlementPurchase
List Offers for CreateEntitlement purchase. |
↳ changeOfferPurchase |
ChangeOfferPurchase
List Offers for ChangeOffer purchase. |
↳ pageSize |
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved. |
↳ pageToken |
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API. |
↳ languageCode |
string
Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
listPurchasableSkus
Lists the following:
- SKUs that you can purchase for a customer
- SKUs that you can upgrade or downgrade for an entitlement.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$formattedCustomer = $cloudChannelServiceClient->customerName('[ACCOUNT]', '[CUSTOMER]');
// Iterate over pages of elements
$pagedResponse = $cloudChannelServiceClient->listPurchasableSkus($formattedCustomer);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $cloudChannelServiceClient->listPurchasableSkus($formattedCustomer);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
customer |
string
Required. The resource name of the customer to list SKUs for. Format: accounts/{account_id}/customers/{customer_id}. |
optionalArgs |
array
Optional. |
↳ createEntitlementPurchase |
Google\Cloud\Channel\V1\ListPurchasableSkusRequest\CreateEntitlementPurchase
List SKUs for CreateEntitlement purchase. |
↳ changeOfferPurchase |
Google\Cloud\Channel\V1\ListPurchasableSkusRequest\ChangeOfferPurchase
List SKUs for ChangeOffer purchase with a new SKU. |
↳ pageSize |
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved. |
↳ pageToken |
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API. |
↳ languageCode |
string
Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
listSkus
Lists the SKUs for a product the reseller is authorized to sell.
Possible error codes:
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$formattedParent = $cloudChannelServiceClient->productName('[PRODUCT]');
$account = 'account';
// Iterate over pages of elements
$pagedResponse = $cloudChannelServiceClient->listSkus($formattedParent, $account);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $cloudChannelServiceClient->listSkus($formattedParent, $account);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
parent |
string
Required. The resource name of the Product to list SKUs for. Parent uses the format: products/{product_id}. Supports products/- to retrieve SKUs for all products. |
account |
string
Required. Resource name of the reseller. Format: accounts/{account_id}. |
optionalArgs |
array
Optional. |
↳ pageSize |
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved. |
↳ pageToken |
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API. |
↳ languageCode |
string
Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
listSubscribers
Lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The topic resource doesn't exist.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: A list of service email addresses.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$account = 'account';
// Iterate over pages of elements
$pagedResponse = $cloudChannelServiceClient->listSubscribers($account);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $cloudChannelServiceClient->listSubscribers($account);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
account |
string
Required. Resource name of the account. |
optionalArgs |
array
Optional. |
↳ pageSize |
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved. |
↳ pageToken |
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
listTransferableOffers
List TransferableOffers of a customer based on Cloud Identity ID or Customer Name in the request.
Use this method when a reseller gets the entitlement information of an unowned customer. The reseller should provide the customer's Cloud Identity ID or Customer Name.
Possible error codes:
- PERMISSION_DENIED:
- The customer doesn't belong to the reseller and has no auth token.
- The supplied auth token is invalid.
- The reseller account making the request is different from the reseller account in the query.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: List of TransferableOffer for the given customer and SKU.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$parent = 'parent';
$sku = 'sku';
// Iterate over pages of elements
$pagedResponse = $cloudChannelServiceClient->listTransferableOffers($parent, $sku);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $cloudChannelServiceClient->listTransferableOffers($parent, $sku);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
parent |
string
Required. The resource name of the reseller's account. |
sku |
string
Required. The SKU to look up Offers for. |
optionalArgs |
array
Optional. |
↳ cloudIdentityId |
string
Customer's Cloud Identity ID |
↳ customerName |
string
A reseller should create a customer and use the resource name of that customer here. |
↳ pageSize |
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved. |
↳ pageToken |
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API. |
↳ languageCode |
string
The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
listTransferableSkus
List TransferableSkus of a customer based on the Cloud Identity ID or Customer Name in the request.
Use this method to list the entitlements information of an unowned customer. You should provide the customer's Cloud Identity ID or Customer Name.
Possible error codes:
- PERMISSION_DENIED:
- The customer doesn't belong to the reseller and has no auth token.
- The supplied auth token is invalid.
- The reseller account making the request is different from the reseller account in the query.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: A list of the customer's TransferableSku.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$parent = 'parent';
// Iterate over pages of elements
$pagedResponse = $cloudChannelServiceClient->listTransferableSkus($parent);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $cloudChannelServiceClient->listTransferableSkus($parent);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
parent |
string
Required. The reseller account's resource name. Parent uses the format: accounts/{account_id} |
optionalArgs |
array
Optional. |
↳ cloudIdentityId |
string
Customer's Cloud Identity ID |
↳ customerName |
string
A reseller is required to create a customer and use the resource name of the created customer here. Customer_name uses the format: accounts/{account_id}/customers/{customer_id} |
↳ pageSize |
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved. |
↳ pageToken |
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API. |
↳ authToken |
string
The super admin of the resold customer generates this token to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. You can omit this token after authorization. See https://support.google.com/a/answer/7643790 for more details. |
↳ languageCode |
string
The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
lookupOffer
Returns the requested Offer resource.
Possible error codes:
- PERMISSION_DENIED: The entitlement doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: Entitlement or offer was not found.
Return value: The Offer resource.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$formattedEntitlement = $cloudChannelServiceClient->entitlementName('[ACCOUNT]', '[CUSTOMER]', '[ENTITLEMENT]');
$response = $cloudChannelServiceClient->lookupOffer($formattedEntitlement);
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
entitlement |
string
Required. The resource name of the entitlement to retrieve the Offer. Entitlement uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} |
optionalArgs |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Channel\V1\Offer |
provisionCloudIdentity
Creates a Cloud Identity for the given customer using the customer's information, or the information provided here.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The customer was not found.
- ALREADY_EXISTS: The customer's primary email already exists. Retry after changing the customer's primary contact email.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of OperationMetadata.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$formattedCustomer = $cloudChannelServiceClient->customerName('[ACCOUNT]', '[CUSTOMER]');
$operationResponse = $cloudChannelServiceClient->provisionCloudIdentity($formattedCustomer);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$result = $operationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $cloudChannelServiceClient->provisionCloudIdentity($formattedCustomer);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $cloudChannelServiceClient->resumeOperation($operationName, 'provisionCloudIdentity');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
$result = $newOperationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
customer |
string
Required. Resource name of the customer. Format: accounts/{account_id}/customers/{customer_id} |
optionalArgs |
array
Optional. |
↳ cloudIdentityInfo |
CloudIdentityInfo
CloudIdentity-specific customer information. |
↳ user |
AdminUser
Admin user information. |
↳ validateOnly |
bool
Validate the request and preview the review, but do not post it. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
registerSubscriber
Registers a service account with subscriber privileges on the Cloud Pub/Sub topic for this Channel Services account. After you create a subscriber, you get the events through SubscriberEvent
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The topic name with the registered service email address.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$account = 'account';
$serviceAccount = 'service_account';
$response = $cloudChannelServiceClient->registerSubscriber($account, $serviceAccount);
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
account |
string
Required. Resource name of the account. |
serviceAccount |
string
Required. Service account that provides subscriber access to the registered topic. |
optionalArgs |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Channel\V1\RegisterSubscriberResponse |
startPaidService
Starts paid service for a trial entitlement.
Starts paid service for a trial entitlement immediately. This method is only applicable if a plan is set up for a trial entitlement but has some trial days remaining.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: Entitlement resource not found.
- FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$name = 'name';
$operationResponse = $cloudChannelServiceClient->startPaidService($name);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$result = $operationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $cloudChannelServiceClient->startPaidService($name);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $cloudChannelServiceClient->resumeOperation($operationName, 'startPaidService');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
$result = $newOperationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
name |
string
Required. The name of the entitlement to start a paid service for. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} |
optionalArgs |
array
Optional. |
↳ requestId |
string
Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
suspendEntitlement
Suspends a previously fulfilled entitlement.
An entitlement suspension is a long-running operation.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: Entitlement resource not found.
- NOT_ACTIVE: Entitlement is not active.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$name = 'name';
$operationResponse = $cloudChannelServiceClient->suspendEntitlement($name);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$result = $operationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $cloudChannelServiceClient->suspendEntitlement($name);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $cloudChannelServiceClient->resumeOperation($operationName, 'suspendEntitlement');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
$result = $newOperationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
name |
string
Required. The resource name of the entitlement to suspend. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} |
optionalArgs |
array
Optional. |
↳ requestId |
string
Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
transferEntitlements
Transfers customer entitlements to new reseller.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The customer or offer resource was not found.
- ALREADY_EXISTS: The SKU was already transferred for the customer.
- CONDITION_NOT_MET or FAILED_PRECONDITION:
- The SKU requires domain verification to transfer, but the domain is not verified.
- An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic).
- (Developer accounts only) Reseller and resold domain must meet the following naming requirements:
- Domain names must start with goog-test.
- Domain names must include the reseller domain.
- Specify all transferring entitlements.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$parent = 'parent';
$entitlements = [];
$operationResponse = $cloudChannelServiceClient->transferEntitlements($parent, $entitlements);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$result = $operationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $cloudChannelServiceClient->transferEntitlements($parent, $entitlements);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $cloudChannelServiceClient->resumeOperation($operationName, 'transferEntitlements');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
$result = $newOperationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
parent |
string
Required. The resource name of the reseller's customer account that will receive transferred entitlements. Parent uses the format: accounts/{account_id}/customers/{customer_id} |
entitlements |
array<Google\Cloud\Channel\V1\Entitlement>
Required. The new entitlements to create or transfer. |
optionalArgs |
array
Optional. |
↳ authToken |
string
The super admin of the resold customer generates this token to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. You can omit this token after authorization. See https://support.google.com/a/answer/7643790 for more details. |
↳ requestId |
string
Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
transferEntitlementsToGoogle
Transfers customer entitlements from their current reseller to Google.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The customer or offer resource was not found.
- ALREADY_EXISTS: The SKU was already transferred for the customer.
- CONDITION_NOT_MET or FAILED_PRECONDITION:
- The SKU requires domain verification to transfer, but the domain is not verified.
- An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic).
- (Developer accounts only) Reseller and resold domain must meet the following naming requirements:
- Domain names must start with goog-test.
- Domain names must include the reseller domain.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$parent = 'parent';
$entitlements = [];
$operationResponse = $cloudChannelServiceClient->transferEntitlementsToGoogle($parent, $entitlements);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $cloudChannelServiceClient->transferEntitlementsToGoogle($parent, $entitlements);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $cloudChannelServiceClient->resumeOperation($operationName, 'transferEntitlementsToGoogle');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
parent |
string
Required. The resource name of the reseller's customer account where the entitlements transfer from. Parent uses the format: accounts/{account_id}/customers/{customer_id} |
entitlements |
array<Google\Cloud\Channel\V1\Entitlement>
Required. The entitlements to transfer to Google. |
optionalArgs |
array
Optional. |
↳ requestId |
string
Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
unregisterSubscriber
Unregisters a service account with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. If there are no service accounts left with subscriber privileges, this deletes the topic.
You can call ListSubscribers to check for these accounts.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The topic resource doesn't exist.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The topic name that unregistered the service email address. Returns a success response if the service email address wasn't registered with the topic.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$account = 'account';
$serviceAccount = 'service_account';
$response = $cloudChannelServiceClient->unregisterSubscriber($account, $serviceAccount);
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
account |
string
Required. Resource name of the account. |
serviceAccount |
string
Required. Service account to unregister from subscriber access to the topic. |
optionalArgs |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Channel\V1\UnregisterSubscriberResponse |
updateChannelPartnerLink
Updates a channel partner link. Distributors call this method to change a link's status. For example, to suspend a partner link.
You must be a distributor to call this method.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT:
- Required request parameters are missing or invalid.
- Link state cannot change from invited to active or suspended.
- Cannot send reseller_cloud_identity_id, invite_url, or name in update mask.
- NOT_FOUND: ChannelPartnerLink resource not found.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The updated ChannelPartnerLink resource.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$name = 'name';
$channelPartnerLink = new ChannelPartnerLink();
$updateMask = new FieldMask();
$response = $cloudChannelServiceClient->updateChannelPartnerLink($name, $channelPartnerLink, $updateMask);
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
name |
string
Required. The resource name of the channel partner link to cancel. Name uses the format: accounts/{account_id}/channelPartnerLinks/{id} where {id} is the Cloud Identity ID of the partner. |
channelPartnerLink |
Google\Cloud\Channel\V1\ChannelPartnerLink
Required. The channel partner link to update. Only channel_partner_link.link_state is allowed for updates. |
updateMask |
Google\Protobuf\FieldMask
Required. The update mask that applies to the resource. The only allowable value for an update mask is channel_partner_link.link_state. |
optionalArgs |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Channel\V1\ChannelPartnerLink |
updateCustomer
Updates an existing Customer resource for the reseller or distributor.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: No Customer resource found for the name in the request.
Return value: The updated Customer resource.
Sample code:
$cloudChannelServiceClient = new CloudChannelServiceClient();
try {
$customer = new Customer();
$response = $cloudChannelServiceClient->updateCustomer($customer);
} finally {
$cloudChannelServiceClient->close();
}
Parameters | |
---|---|
Name | Description |
customer |
Google\Cloud\Channel\V1\Customer
Required. New contents of the customer. |
optionalArgs |
array
Optional. |
↳ updateMask |
FieldMask
The update mask that applies to the resource. Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Channel\V1\Customer |
Constants
SERVICE_NAME
Value: 'google.cloud.channel.v1.CloudChannelService'
The name of the service.
SERVICE_ADDRESS
Value: 'cloudchannel.googleapis.com'
The default address of the service.
DEFAULT_SERVICE_PORT
Value: 443
The default port of the service.
CODEGEN_NAME
Value: 'gapic'
The name of the code generator, to be included in the agent header.