Reference documentation and code samples for the Google Cloud Design Center V1 Client class DesignCenterClient.
Service Description: Service describing handlers for resources
This class provides the ability to make remote calls to the backing service through method calls that map to API methods.
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.
Namespace
Google \ Cloud \ DesignCenter \ V1 \ ClientMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
options |
array|Google\ApiCore\Options\ClientOptions
Optional. Options for configuring the service API wrapper. |
↳ apiEndpoint |
string
The address of the API remote host. May optionally include the port, formatted as "
|
↳ credentials |
Google\Auth\FetchAuthTokenInterface|Google\ApiCore\CredentialsWrapper
This option should only be used with a pre-constructed Google\Auth\FetchAuthTokenInterface or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. Important: If you are providing a path to a credentials file, or a decoded credentials file as a PHP array, this usage is now DEPRECATED. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. It is recommended to create the credentials explicitly |
↳ credentialsConfig |
array
Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see Google\ApiCore\CredentialsWrapper::build() . |
↳ 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|Google\ApiCore\Transport\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 Google\ApiCore\Transport\GrpcTransport::build() and Google\ApiCore\Transport\RestTransport::build() 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. |
↳ logger |
false|Psr\Log\LoggerInterface
A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the 'GOOGLE_SDK_PHP_LOGGING' environment flag |
↳ universeDomain |
string
The service domain for the client. Defaults to 'googleapis.com'. |
commitApplicationTemplate
Commits an application template to create a new revision.
The async variant is DesignCenterClient::commitApplicationTemplateAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CommitApplicationTemplateRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\ApplicationTemplateRevision |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\ApplicationTemplateRevision;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\CommitApplicationTemplateRequest;
/**
* @param string $formattedName The name of the application template. Please see
* {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
*/
function commit_application_template_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new CommitApplicationTemplateRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var ApplicationTemplateRevision $response */
$response = $designCenterClient->commitApplicationTemplate($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
commit_application_template_sample($formattedName);
}
createApplication
Creates an application.
The async variant is DesignCenterClient::createApplicationAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateApplicationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Application |
|
use Google\ApiCore\ApiException;
use Google\Cloud\AppHub\V1\Scope;
use Google\Cloud\AppHub\V1\Scope\Type;
use Google\Cloud\DesignCenter\V1\Application;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\CreateApplicationRequest;
use Google\Cloud\DesignCenter\V1\DeploymentSource;
/**
* @param string $formattedParent The parent resource in which to create the application.
* Format: `projects/$project/locations/$location/spaces/$space`
* Please see {@see DesignCenterClient::spaceName()} for help formatting this field.
* @param string $applicationId The ID of the application to create.
* @param int $applicationScopeType Scope Type.
*/
function create_application_sample(
string $formattedParent,
string $applicationId,
int $applicationScopeType
): void {
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$applicationSource = new DeploymentSource();
$applicationScope = (new Scope())
->setType($applicationScopeType);
$application = (new Application())
->setSource($applicationSource)
->setScope($applicationScope);
$request = (new CreateApplicationRequest())
->setParent($formattedParent)
->setApplicationId($applicationId)
->setApplication($application);
// Call the API and handle any network failures.
try {
/** @var Application $response */
$response = $designCenterClient->createApplication($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::spaceName('[PROJECT]', '[LOCATION]', '[SPACE]');
$applicationId = '[APPLICATION_ID]';
$applicationScopeType = Type::TYPE_UNSPECIFIED;
create_application_sample($formattedParent, $applicationId, $applicationScopeType);
}
createApplicationTemplate
Creates an application template.
The async variant is DesignCenterClient::createApplicationTemplateAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateApplicationTemplateRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\ApplicationTemplate |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\ApplicationTemplate;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\CreateApplicationTemplateRequest;
/**
* @param string $formattedParent The parent resource in which to create the application template. Please see
* {@see DesignCenterClient::spaceName()} for help formatting this field.
* @param string $applicationTemplateId The ID of the application template to create.
*/
function create_application_template_sample(
string $formattedParent,
string $applicationTemplateId
): void {
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$applicationTemplate = new ApplicationTemplate();
$request = (new CreateApplicationTemplateRequest())
->setParent($formattedParent)
->setApplicationTemplateId($applicationTemplateId)
->setApplicationTemplate($applicationTemplate);
// Call the API and handle any network failures.
try {
/** @var ApplicationTemplate $response */
$response = $designCenterClient->createApplicationTemplate($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::spaceName('[PROJECT]', '[LOCATION]', '[SPACE]');
$applicationTemplateId = '[APPLICATION_TEMPLATE_ID]';
create_application_template_sample($formattedParent, $applicationTemplateId);
}
createCatalog
Creates a catalog.
The async variant is DesignCenterClient::createCatalogAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateCatalogRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Catalog |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Catalog;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\CreateCatalogRequest;
/**
* @param string $formattedParent The parent space in which a catalog is created in the following
* format: `projects/$project/locations/$location/spaces/$space`
* Please see {@see DesignCenterClient::spaceName()} for help formatting this field.
* @param string $catalogId The ID of the catalog to create.
*/
function create_catalog_sample(string $formattedParent, string $catalogId): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$catalog = new Catalog();
$request = (new CreateCatalogRequest())
->setParent($formattedParent)
->setCatalogId($catalogId)
->setCatalog($catalog);
// Call the API and handle any network failures.
try {
/** @var Catalog $response */
$response = $designCenterClient->createCatalog($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::spaceName('[PROJECT]', '[LOCATION]', '[SPACE]');
$catalogId = '[CATALOG_ID]';
create_catalog_sample($formattedParent, $catalogId);
}
createCatalogTemplate
Adds a template to a catalog.
The async variant is DesignCenterClient::createCatalogTemplateAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateCatalogTemplateRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\CatalogTemplate |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\CatalogTemplate;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\CreateCatalogTemplateRequest;
use Google\Cloud\DesignCenter\V1\TemplateCategory;
/**
* @param string $formattedParent The parent resource in which the catalog template is created. Please see
* {@see DesignCenterClient::catalogName()} for help formatting this field.
* @param string $catalogTemplateId The ID of the catalog template to create. The ID is appended to
* the catalog template's name.
* @param int $catalogTemplateTemplateCategory The category of the Application Design Center application
* template.
*/
function create_catalog_template_sample(
string $formattedParent,
string $catalogTemplateId,
int $catalogTemplateTemplateCategory
): void {
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$catalogTemplate = (new CatalogTemplate())
->setTemplateCategory($catalogTemplateTemplateCategory);
$request = (new CreateCatalogTemplateRequest())
->setParent($formattedParent)
->setCatalogTemplateId($catalogTemplateId)
->setCatalogTemplate($catalogTemplate);
// Call the API and handle any network failures.
try {
/** @var CatalogTemplate $response */
$response = $designCenterClient->createCatalogTemplate($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::catalogName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[CATALOG]'
);
$catalogTemplateId = '[CATALOG_TEMPLATE_ID]';
$catalogTemplateTemplateCategory = TemplateCategory::TEMPLATE_CATEGORY_UNSPECIFIED;
create_catalog_template_sample(
$formattedParent,
$catalogTemplateId,
$catalogTemplateTemplateCategory
);
}
createCatalogTemplateRevision
Creates a template revision.
The async variant is DesignCenterClient::createCatalogTemplateRevisionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateCatalogTemplateRevisionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\CatalogTemplateRevision> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\CatalogTemplateRevision;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\CreateCatalogTemplateRevisionRequest;
use Google\Rpc\Status;
/**
* @param string $formattedParent The parent in which the catalog template revisions request is
* created in following format:
* `projects/$project/locations/$location/spaces/$space/templates/$template`
* Please see {@see DesignCenterClient::catalogTemplateName()} for help formatting this field.
* @param string $catalogTemplateRevisionId The ID of the template revision to create.
*/
function create_catalog_template_revision_sample(
string $formattedParent,
string $catalogTemplateRevisionId
): void {
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$catalogTemplateRevision = new CatalogTemplateRevision();
$request = (new CreateCatalogTemplateRevisionRequest())
->setParent($formattedParent)
->setCatalogTemplateRevisionId($catalogTemplateRevisionId)
->setCatalogTemplateRevision($catalogTemplateRevision);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->createCatalogTemplateRevision($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var CatalogTemplateRevision $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::catalogTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[CATALOG]',
'[CATALOG_TEMPLATE]'
);
$catalogTemplateRevisionId = '[CATALOG_TEMPLATE_REVISION_ID]';
create_catalog_template_revision_sample($formattedParent, $catalogTemplateRevisionId);
}
createComponent
Creates a component.
The async variant is DesignCenterClient::createComponentAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateComponentRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Component |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\Component;
use Google\Cloud\DesignCenter\V1\CreateComponentRequest;
/**
* @param string $formattedParent The parent resource in which to create the component. Please see
* {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
* @param string $componentId The ID of the component to create.
* @param string $componentSharedTemplateRevisionUri Immutable. The shared template used to generate the component.
*/
function create_component_sample(
string $formattedParent,
string $componentId,
string $componentSharedTemplateRevisionUri
): void {
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$component = (new Component())
->setSharedTemplateRevisionUri($componentSharedTemplateRevisionUri);
$request = (new CreateComponentRequest())
->setParent($formattedParent)
->setComponentId($componentId)
->setComponent($component);
// Call the API and handle any network failures.
try {
/** @var Component $response */
$response = $designCenterClient->createComponent($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
$componentId = '[COMPONENT_ID]';
$componentSharedTemplateRevisionUri = '[SHARED_TEMPLATE_REVISION_URI]';
create_component_sample($formattedParent, $componentId, $componentSharedTemplateRevisionUri);
}
createConnection
Creates a connection.
The async variant is DesignCenterClient::createConnectionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateConnectionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Connection |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\Connection;
use Google\Cloud\DesignCenter\V1\CreateConnectionRequest;
/**
* @param string $formattedParent The parent resource in which to create a connection. Please see
* {@see DesignCenterClient::componentName()} for help formatting this field.
* @param string $connectionId The ID of the connection to create.
* @param string $formattedConnectionDestinationComponentUri The destination component URI used to generate the connection.
* Format is
* `projects/$project/locations/$location/spaces/$space/applicationTemplates/$application_template/components/$component`
* Please see {@see DesignCenterClient::componentName()} for help formatting this field.
*/
function create_connection_sample(
string $formattedParent,
string $connectionId,
string $formattedConnectionDestinationComponentUri
): void {
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$connection = (new Connection())
->setDestinationComponentUri($formattedConnectionDestinationComponentUri);
$request = (new CreateConnectionRequest())
->setParent($formattedParent)
->setConnectionId($connectionId)
->setConnection($connection);
// Call the API and handle any network failures.
try {
/** @var Connection $response */
$response = $designCenterClient->createConnection($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::componentName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]',
'[COMPONENT]'
);
$connectionId = '[CONNECTION_ID]';
$formattedConnectionDestinationComponentUri = DesignCenterClient::componentName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]',
'[COMPONENT]'
);
create_connection_sample(
$formattedParent,
$connectionId,
$formattedConnectionDestinationComponentUri
);
}
createPolicy
Creates a policy for an application template.
The async variant is DesignCenterClient::createPolicyAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreatePolicyRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Policy |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\CreatePolicyRequest;
use Google\Cloud\DesignCenter\V1\Policy;
use Google\Cloud\DesignCenter\V1\Policy\PolicyType;
/**
* @param string $formattedParent The parent resource in which to create the policy in the
* following format:
* `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate`
* Please see {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
* @param string $policyId The ID of the policy to create.
* @param int $policyPolicyType The policy type.
* Policy type is used to determine the domain of the policy.
*/
function create_policy_sample(
string $formattedParent,
string $policyId,
int $policyPolicyType
): void {
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$policy = (new Policy())
->setPolicyType($policyPolicyType);
$request = (new CreatePolicyRequest())
->setParent($formattedParent)
->setPolicyId($policyId)
->setPolicy($policy);
// Call the API and handle any network failures.
try {
/** @var Policy $response */
$response = $designCenterClient->createPolicy($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
$policyId = '[POLICY_ID]';
$policyPolicyType = PolicyType::POLICY_TYPE_UNSPECIFIED;
create_policy_sample($formattedParent, $policyId, $policyPolicyType);
}
createShare
Shares a catalog from one space to another space.
The async variant is DesignCenterClient::createShareAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateShareRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\Share> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\CreateShareRequest;
use Google\Cloud\DesignCenter\V1\Share;
use Google\Rpc\Status;
/**
* @param string $formattedParent The parent resource in which shares are created. Please see
* {@see DesignCenterClient::catalogName()} for help formatting this field.
* @param string $shareId The ID of the share to create.
* @param string $formattedShareDestinationSpace The space resource path to which the catalog is shared.
* Format is `projects/$project/locations/$location/spaces/$space`
* Please see {@see DesignCenterClient::spaceName()} for help formatting this field.
*/
function create_share_sample(
string $formattedParent,
string $shareId,
string $formattedShareDestinationSpace
): void {
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$share = (new Share())
->setDestinationSpace($formattedShareDestinationSpace);
$request = (new CreateShareRequest())
->setParent($formattedParent)
->setShareId($shareId)
->setShare($share);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->createShare($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var Share $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::catalogName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[CATALOG]'
);
$shareId = '[SHARE_ID]';
$formattedShareDestinationSpace = DesignCenterClient::spaceName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]'
);
create_share_sample($formattedParent, $shareId, $formattedShareDestinationSpace);
}
createSpace
Creates a space.
The async variant is DesignCenterClient::createSpaceAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateSpaceRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Space |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\CreateSpaceRequest;
use Google\Cloud\DesignCenter\V1\Space;
/**
* @param string $formattedParent The parent in which to create a space. Please see
* {@see DesignCenterClient::locationName()} for help formatting this field.
* @param string $spaceId The ID of the space to create.
*/
function create_space_sample(string $formattedParent, string $spaceId): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$space = new Space();
$request = (new CreateSpaceRequest())
->setParent($formattedParent)
->setSpaceId($spaceId)
->setSpace($space);
// Call the API and handle any network failures.
try {
/** @var Space $response */
$response = $designCenterClient->createSpace($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::locationName('[PROJECT]', '[LOCATION]');
$spaceId = '[SPACE_ID]';
create_space_sample($formattedParent, $spaceId);
}
deleteApplication
Deletes an application.
The async variant is DesignCenterClient::deleteApplicationAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteApplicationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<null> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\DeleteApplicationRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The application name.
* Format:
* `projects/$project/locations/$location/spaces/$space/applications/$application`
* Please see {@see DesignCenterClient::applicationName()} for help formatting this field.
*/
function delete_application_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new DeleteApplicationRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->deleteApplication($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
printf('Operation completed successfully.' . PHP_EOL);
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION]'
);
delete_application_sample($formattedName);
}
deleteApplicationTemplate
Deletes an application template.
The async variant is DesignCenterClient::deleteApplicationTemplateAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteApplicationTemplateRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\DeleteApplicationTemplateRequest;
/**
* @param string $formattedName The application template name. Please see
* {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
*/
function delete_application_template_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new DeleteApplicationTemplateRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$designCenterClient->deleteApplicationTemplate($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
delete_application_template_sample($formattedName);
}
deleteApplicationTemplateRevision
Deletes an application template revision.
The async variant is DesignCenterClient::deleteApplicationTemplateRevisionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteApplicationTemplateRevisionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\DeleteApplicationTemplateRevisionRequest;
/**
* @param string $formattedName The application template revision name. Please see
* {@see DesignCenterClient::applicationTemplateRevisionName()} for help formatting this field.
*/
function delete_application_template_revision_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new DeleteApplicationTemplateRevisionRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$designCenterClient->deleteApplicationTemplateRevision($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationTemplateRevisionName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]',
'[REVISION]'
);
delete_application_template_revision_sample($formattedName);
}
deleteCatalog
Deletes a catalog.
The async variant is DesignCenterClient::deleteCatalogAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteCatalogRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<null> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\DeleteCatalogRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The catalog name in the following format:
* `projects/$project/locations/$location/spaces/$space/catalogs/$catalog`
* Please see {@see DesignCenterClient::catalogName()} for help formatting this field.
*/
function delete_catalog_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new DeleteCatalogRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->deleteCatalog($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
printf('Operation completed successfully.' . PHP_EOL);
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::catalogName('[PROJECT]', '[LOCATION]', '[SPACE]', '[CATALOG]');
delete_catalog_sample($formattedName);
}
deleteCatalogTemplate
Deletes a catalog template.
The async variant is DesignCenterClient::deleteCatalogTemplateAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteCatalogTemplateRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<null> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\DeleteCatalogTemplateRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The catalog template name.
* Format:
* `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/templates/$template`
* Please see {@see DesignCenterClient::catalogTemplateName()} for help formatting this field.
*/
function delete_catalog_template_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new DeleteCatalogTemplateRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->deleteCatalogTemplate($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
printf('Operation completed successfully.' . PHP_EOL);
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::catalogTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[CATALOG]',
'[CATALOG_TEMPLATE]'
);
delete_catalog_template_sample($formattedName);
}
deleteCatalogTemplateRevision
Deletes a template revision.
The async variant is DesignCenterClient::deleteCatalogTemplateRevisionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteCatalogTemplateRevisionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<null> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\DeleteCatalogTemplateRevisionRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The template revision name. Please see
* {@see DesignCenterClient::catalogTemplateRevisionName()} for help formatting this field.
*/
function delete_catalog_template_revision_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new DeleteCatalogTemplateRevisionRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->deleteCatalogTemplateRevision($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
printf('Operation completed successfully.' . PHP_EOL);
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::catalogTemplateRevisionName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[CATALOG]',
'[CATALOG_TEMPLATE]',
'[REVISION]'
);
delete_catalog_template_revision_sample($formattedName);
}
deleteComponent
Deletes a component.
The async variant is DesignCenterClient::deleteComponentAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteComponentRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\DeleteComponentRequest;
/**
* @param string $formattedName The component name. Please see
* {@see DesignCenterClient::componentName()} for help formatting this field.
*/
function delete_component_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new DeleteComponentRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$designCenterClient->deleteComponent($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::componentName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]',
'[COMPONENT]'
);
delete_component_sample($formattedName);
}
deleteConnection
Deletes a connection.
The async variant is DesignCenterClient::deleteConnectionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteConnectionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\DeleteConnectionRequest;
/**
* @param string $formattedName The connection name. Please see
* {@see DesignCenterClient::connectionName()} for help formatting this field.
*/
function delete_connection_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new DeleteConnectionRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$designCenterClient->deleteConnection($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::connectionName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]',
'[COMPONENT]',
'[CONNECTION]'
);
delete_connection_sample($formattedName);
}
deletePolicy
Deletes a policy.
The async variant is DesignCenterClient::deletePolicyAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeletePolicyRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\DeletePolicyRequest;
/**
* @param string $formattedName The policy name in the following format:
* `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate/policies/$policy`
* Please see {@see DesignCenterClient::policyName()} for help formatting this field.
*/
function delete_policy_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new DeletePolicyRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$designCenterClient->deletePolicy($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::policyName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]',
'[POLICY]'
);
delete_policy_sample($formattedName);
}
deleteShare
Deletes a catalog share.
The async variant is DesignCenterClient::deleteShareAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteShareRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<null> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\DeleteShareRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The share name in the following format:
* `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/shares/$share`
* Please see {@see DesignCenterClient::shareName()} for help formatting this field.
*/
function delete_share_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new DeleteShareRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->deleteShare($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
printf('Operation completed successfully.' . PHP_EOL);
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::shareName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[CATALOG]',
'[SHARE]'
);
delete_share_sample($formattedName);
}
deleteSpace
Deletes a space.
The async variant is DesignCenterClient::deleteSpaceAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteSpaceRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\DeleteSpaceRequest;
/**
* @param string $formattedName The space name. Please see
* {@see DesignCenterClient::spaceName()} for help formatting this field.
*/
function delete_space_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new DeleteSpaceRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$designCenterClient->deleteSpace($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::spaceName('[PROJECT]', '[LOCATION]', '[SPACE]');
delete_space_sample($formattedName);
}
deployApplication
Deploys an application.
The async variant is DesignCenterClient::deployApplicationAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeployApplicationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\DeployApplicationResponse> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\DeployApplicationRequest;
use Google\Cloud\DesignCenter\V1\DeployApplicationResponse;
use Google\Rpc\Status;
/**
* @param string $formattedName The application name.
* Format:
* `projects/$project/locations/$location/spaces/$space/applications/$application`
* Please see {@see DesignCenterClient::applicationName()} for help formatting this field.
*/
function deploy_application_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new DeployApplicationRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->deployApplication($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var DeployApplicationResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION]'
);
deploy_application_sample($formattedName);
}
exportApplicationIaC
Exports Terraform files for an application asynchronously.
The async variant is DesignCenterClient::exportApplicationIaCAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ExportApplicationIaCRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\ExportApplicationIaCResponse> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ExportApplicationIaCRequest;
use Google\Cloud\DesignCenter\V1\ExportApplicationIaCResponse;
use Google\Rpc\Status;
/**
* @param string $formattedName The name of the application. Please see
* {@see DesignCenterClient::applicationName()} for help formatting this field.
*/
function export_application_ia_c_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ExportApplicationIaCRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->exportApplicationIaC($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var ExportApplicationIaCResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION]'
);
export_application_ia_c_sample($formattedName);
}
exportApplicationTemplateIaC
Exports Terraform files for an application template. The generated modules can have remote sources or local sources downloaded from remote.
This is an ASYNCHRONOUS operation that returns a Long Running Operation.
The async variant is DesignCenterClient::exportApplicationTemplateIaCAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ExportApplicationTemplateIaCRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\ExportApplicationTemplateIaCResponse> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ExportApplicationTemplateIaCRequest;
use Google\Cloud\DesignCenter\V1\ExportApplicationTemplateIaCResponse;
use Google\Rpc\Status;
/**
* @param string $formattedName The name of the application template. Please see
* {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
*/
function export_application_template_ia_c_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ExportApplicationTemplateIaCRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->exportApplicationTemplateIaC($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var ExportApplicationTemplateIaCResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
export_application_template_ia_c_sample($formattedName);
}
exportApplicationTemplateRevisionIaC
Exports Terraform files for an application template revision. The generated modules can have remote sources or local sources downloaded from remote.
This is an ASYNCHRONOUS operation that returns a Long Running Operation.
The async variant is DesignCenterClient::exportApplicationTemplateRevisionIaCAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ExportApplicationTemplateRevisionIaCRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\ExportApplicationTemplateRevisionIaCResponse> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ExportApplicationTemplateRevisionIaCRequest;
use Google\Cloud\DesignCenter\V1\ExportApplicationTemplateRevisionIaCResponse;
use Google\Rpc\Status;
/**
* @param string $formattedName The name of the application template revision. Please see
* {@see DesignCenterClient::applicationTemplateRevisionName()} for help formatting this field.
*/
function export_application_template_revision_ia_c_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ExportApplicationTemplateRevisionIaCRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->exportApplicationTemplateRevisionIaC($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var ExportApplicationTemplateRevisionIaCResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationTemplateRevisionName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]',
'[REVISION]'
);
export_application_template_revision_ia_c_sample($formattedName);
}
fetchApplicationAssessmentReport
Fetches the assessment report of a deployed application if present.
The async variant is DesignCenterClient::fetchApplicationAssessmentReportAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\FetchApplicationAssessmentReportRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\FetchApplicationAssessmentReportResponse |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\FetchApplicationAssessmentReportRequest;
use Google\Cloud\DesignCenter\V1\FetchApplicationAssessmentReportResponse;
/**
* @param string $formattedName The application name in the following format:
* `projects/$project/locations/$location/spaces/$space/applications/$application`
* Please see {@see DesignCenterClient::applicationName()} for help formatting this field.
*/
function fetch_application_assessment_report_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new FetchApplicationAssessmentReportRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var FetchApplicationAssessmentReportResponse $response */
$response = $designCenterClient->fetchApplicationAssessmentReport($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION]'
);
fetch_application_assessment_report_sample($formattedName);
}
fetchFrameworks
Fetches all frameworks for assessment report.
The async variant is DesignCenterClient::fetchFrameworksAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\FetchFrameworksRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\FetchFrameworksRequest;
use Google\Cloud\DesignCenter\V1\Framework;
/**
* @param string $parent The parent resource name.
* Format: projects/{project}/locations/{location}
*/
function fetch_frameworks_sample(string $parent): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new FetchFrameworksRequest())
->setParent($parent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->fetchFrameworks($request);
/** @var Framework $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$parent = '[PARENT]';
fetch_frameworks_sample($parent);
}
generateApplicationAssessmentReport
Generate Assessment Reports of an application.
The async variant is DesignCenterClient::generateApplicationAssessmentReportAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GenerateApplicationAssessmentReportRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\GenerateApplicationAssessmentReportResponse> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GenerateApplicationAssessmentReportRequest;
use Google\Cloud\DesignCenter\V1\GenerateApplicationAssessmentReportResponse;
use Google\Rpc\Status;
/**
* @param string $formattedName The application name in the following format:
* `projects/$project/locations/$location/spaces/$space/applications/$application`
* Please see {@see DesignCenterClient::applicationName()} for help formatting this field.
*/
function generate_application_assessment_report_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GenerateApplicationAssessmentReportRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->generateApplicationAssessmentReport($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var GenerateApplicationAssessmentReportResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION]'
);
generate_application_assessment_report_sample($formattedName);
}
generateApplicationIaC
Generates Terraform files for an application.
The async variant is DesignCenterClient::generateApplicationIaCAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GenerateApplicationIaCRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\GenerateApplicationIaCResponse |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GenerateApplicationIaCRequest;
use Google\Cloud\DesignCenter\V1\GenerateApplicationIaCResponse;
/**
* @param string $formattedName The name of the application. Please see
* {@see DesignCenterClient::applicationName()} for help formatting this field.
*/
function generate_application_ia_c_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GenerateApplicationIaCRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var GenerateApplicationIaCResponse $response */
$response = $designCenterClient->generateApplicationIaC($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION]'
);
generate_application_ia_c_sample($formattedName);
}
generateApplicationTemplateAssessmentReport
Generate Assessment Reports of an application template.
The async variant is DesignCenterClient::generateApplicationTemplateAssessmentReportAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateAssessmentReportRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateAssessmentReportResponse> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateAssessmentReportRequest;
use Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateAssessmentReportResponse;
use Google\Rpc\Status;
/**
* @param string $formattedName The application template name in the following format:
* `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate`
* Please see {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
*/
function generate_application_template_assessment_report_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GenerateApplicationTemplateAssessmentReportRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->generateApplicationTemplateAssessmentReport($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var GenerateApplicationTemplateAssessmentReportResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
generate_application_template_assessment_report_sample($formattedName);
}
generateApplicationTemplateIaC
Generates Terraform files for an application template.
This is a SYNCHRONOUS operation and returns the generated IaC directly in the response. It does NOT download external module sources; it only uses remote sources.
The async variant is DesignCenterClient::generateApplicationTemplateIaCAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateIaCRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateIaCResponse |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateIaCRequest;
use Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateIaCResponse;
/**
* @param string $formattedName The name of the application template. Please see
* {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
*/
function generate_application_template_ia_c_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GenerateApplicationTemplateIaCRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var GenerateApplicationTemplateIaCResponse $response */
$response = $designCenterClient->generateApplicationTemplateIaC($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
generate_application_template_ia_c_sample($formattedName);
}
generateApplicationTemplateRevisionIaC
Generates Terraform files for an application template revision.
This is a SYNCHRONOUS operation and returns the generated IaC directly in the response. It does NOT download external module sources; it only uses remote sources.
The async variant is DesignCenterClient::generateApplicationTemplateRevisionIaCAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateRevisionIaCRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateRevisionIaCResponse |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateRevisionIaCRequest;
use Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateRevisionIaCResponse;
/**
* @param string $formattedName The name of the application template revision. Please see
* {@see DesignCenterClient::applicationTemplateRevisionName()} for help formatting this field.
*/
function generate_application_template_revision_ia_c_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GenerateApplicationTemplateRevisionIaCRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var GenerateApplicationTemplateRevisionIaCResponse $response */
$response = $designCenterClient->generateApplicationTemplateRevisionIaC($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationTemplateRevisionName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]',
'[REVISION]'
);
generate_application_template_revision_ia_c_sample($formattedName);
}
generateAssessmentReport
Deprecated: Use GenerateTerraformPlanAssessmentReport instead.
Generate a best practice report for a given Terraform plan.
The async variant is DesignCenterClient::generateAssessmentReportAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GenerateAssessmentReportRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\GenerateAssessmentReportResponse> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GenerateAssessmentReportRequest;
use Google\Cloud\DesignCenter\V1\GenerateAssessmentReportResponse;
use Google\Rpc\Status;
/**
* @param string $terraformPlan Terraform plan bytes.
* @param string $formattedSpaceName The name of the space at which Generate Assessment Report is
* called. Format: `projects/$project/locations/$location/spaces/$space`
* Please see {@see DesignCenterClient::spaceName()} for help formatting this field.
*/
function generate_assessment_report_sample(
string $terraformPlan,
string $formattedSpaceName
): void {
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GenerateAssessmentReportRequest())
->setTerraformPlan($terraformPlan)
->setSpaceName($formattedSpaceName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->generateAssessmentReport($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var GenerateAssessmentReportResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$terraformPlan = '...';
$formattedSpaceName = DesignCenterClient::spaceName('[PROJECT]', '[LOCATION]', '[SPACE]');
generate_assessment_report_sample($terraformPlan, $formattedSpaceName);
}
generateTerraformPlanAssessmentReport
Generate a Terraform plan assessment report for a given Terraform plan.
The async variant is DesignCenterClient::generateTerraformPlanAssessmentReportAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GenerateTerraformPlanAssessmentReportRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\GenerateTerraformPlanAssessmentReportResponse> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GenerateTerraformPlanAssessmentReportRequest;
use Google\Cloud\DesignCenter\V1\GenerateTerraformPlanAssessmentReportResponse;
use Google\Rpc\Status;
/**
* @param string $formattedName The parent resource in which to generate the assessment report.
* Format: projects/$project/locations/$location/spaces/$space
* Please see {@see DesignCenterClient::spaceName()} for help formatting this field.
* @param string $terraformPlan The raw JSON representation of the generated Terraform plan,
* provided as bytes.
*/
function generate_terraform_plan_assessment_report_sample(
string $formattedName,
string $terraformPlan
): void {
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GenerateTerraformPlanAssessmentReportRequest())
->setName($formattedName)
->setTerraformPlan($terraformPlan);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->generateTerraformPlanAssessmentReport($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var GenerateTerraformPlanAssessmentReportResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::spaceName('[PROJECT]', '[LOCATION]', '[SPACE]');
$terraformPlan = '...';
generate_terraform_plan_assessment_report_sample($formattedName, $terraformPlan);
}
getApplication
Gets details about an application.
The async variant is DesignCenterClient::getApplicationAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetApplicationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Application |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Application;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GetApplicationRequest;
/**
* @param string $formattedName The application name.
* Format:
* `projects/$project/locations/$location/spaces/$space/applications/$application`
* Please see {@see DesignCenterClient::applicationName()} for help formatting this field.
*/
function get_application_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GetApplicationRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Application $response */
$response = $designCenterClient->getApplication($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION]'
);
get_application_sample($formattedName);
}
getApplicationTemplate
Gets details about an application template.
The async variant is DesignCenterClient::getApplicationTemplateAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetApplicationTemplateRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\ApplicationTemplate |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\ApplicationTemplate;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GetApplicationTemplateRequest;
/**
* @param string $formattedName The application template name. Please see
* {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
*/
function get_application_template_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GetApplicationTemplateRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var ApplicationTemplate $response */
$response = $designCenterClient->getApplicationTemplate($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
get_application_template_sample($formattedName);
}
getApplicationTemplateRevision
Gets details about an application template revision.
The async variant is DesignCenterClient::getApplicationTemplateRevisionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetApplicationTemplateRevisionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\ApplicationTemplateRevision |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\ApplicationTemplateRevision;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GetApplicationTemplateRevisionRequest;
/**
* @param string $formattedName The application template revision name. Please see
* {@see DesignCenterClient::applicationTemplateRevisionName()} for help formatting this field.
*/
function get_application_template_revision_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GetApplicationTemplateRevisionRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var ApplicationTemplateRevision $response */
$response = $designCenterClient->getApplicationTemplateRevision($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationTemplateRevisionName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]',
'[REVISION]'
);
get_application_template_revision_sample($formattedName);
}
getApplicationTemplateSystemRevision
Gets the given application template system revision.
The async variant is DesignCenterClient::getApplicationTemplateSystemRevisionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetApplicationTemplateSystemRevisionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\ApplicationTemplateSystemRevision |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\ApplicationTemplateSystemRevision;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GetApplicationTemplateSystemRevisionRequest;
/**
* @param string $formattedName The name of the ApplicationTemplateSystemRevision to retrieve.
* Format:
* projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}/systemRevisions/{system_revision}
* Please see {@see DesignCenterClient::applicationTemplateSystemRevisionName()} for help formatting this field.
*/
function get_application_template_system_revision_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GetApplicationTemplateSystemRevisionRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var ApplicationTemplateSystemRevision $response */
$response = $designCenterClient->getApplicationTemplateSystemRevision($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationTemplateSystemRevisionName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]',
'[SYSTEM_REVISION]'
);
get_application_template_system_revision_sample($formattedName);
}
getCatalog
Gets details about a catalog.
The async variant is DesignCenterClient::getCatalogAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetCatalogRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Catalog |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Catalog;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GetCatalogRequest;
/**
* @param string $formattedName The catalog name in the following format:
* `projects/$project/locations/$location/spaces/$space/catalogs/$catalog`
* Please see {@see DesignCenterClient::catalogName()} for help formatting this field.
*/
function get_catalog_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GetCatalogRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Catalog $response */
$response = $designCenterClient->getCatalog($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::catalogName('[PROJECT]', '[LOCATION]', '[SPACE]', '[CATALOG]');
get_catalog_sample($formattedName);
}
getCatalogTemplate
Gets a catalog template.
The async variant is DesignCenterClient::getCatalogTemplateAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetCatalogTemplateRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\CatalogTemplate |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\CatalogTemplate;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GetCatalogTemplateRequest;
/**
* @param string $formattedName The catalog template name in the following format:
* `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/templates/$template`
* Please see {@see DesignCenterClient::catalogTemplateName()} for help formatting this field.
*/
function get_catalog_template_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GetCatalogTemplateRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var CatalogTemplate $response */
$response = $designCenterClient->getCatalogTemplate($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::catalogTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[CATALOG]',
'[CATALOG_TEMPLATE]'
);
get_catalog_template_sample($formattedName);
}
getCatalogTemplateRevision
Gets details about a template revision.
The async variant is DesignCenterClient::getCatalogTemplateRevisionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetCatalogTemplateRevisionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\CatalogTemplateRevision |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\CatalogTemplateRevision;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GetCatalogTemplateRevisionRequest;
/**
* @param string $formattedName The catalog template revisions name. Please see
* {@see DesignCenterClient::catalogTemplateRevisionName()} for help formatting this field.
*/
function get_catalog_template_revision_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GetCatalogTemplateRevisionRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var CatalogTemplateRevision $response */
$response = $designCenterClient->getCatalogTemplateRevision($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::catalogTemplateRevisionName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[CATALOG]',
'[CATALOG_TEMPLATE]',
'[REVISION]'
);
get_catalog_template_revision_sample($formattedName);
}
getComponent
Gets details about a Component.
The async variant is DesignCenterClient::getComponentAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetComponentRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Component |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\Component;
use Google\Cloud\DesignCenter\V1\GetComponentRequest;
/**
* @param string $formattedName The component name. Please see
* {@see DesignCenterClient::componentName()} for help formatting this field.
*/
function get_component_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GetComponentRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Component $response */
$response = $designCenterClient->getComponent($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::componentName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]',
'[COMPONENT]'
);
get_component_sample($formattedName);
}
getConnection
Gets details about a connection.
The async variant is DesignCenterClient::getConnectionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetConnectionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Connection |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\Connection;
use Google\Cloud\DesignCenter\V1\GetConnectionRequest;
/**
* @param string $formattedName Name of the resource
* Please see {@see DesignCenterClient::connectionName()} for help formatting this field.
*/
function get_connection_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GetConnectionRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Connection $response */
$response = $designCenterClient->getConnection($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::connectionName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]',
'[COMPONENT]',
'[CONNECTION]'
);
get_connection_sample($formattedName);
}
getPolicy
Policy related APIs.
Get a policy for an application template.
The async variant is DesignCenterClient::getPolicyAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetPolicyRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Policy |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GetPolicyRequest;
use Google\Cloud\DesignCenter\V1\Policy;
/**
* @param string $formattedName The policy name in the following format:
* `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate/policies/$policy`
* Please see {@see DesignCenterClient::policyName()} for help formatting this field.
*/
function get_policy_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GetPolicyRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Policy $response */
$response = $designCenterClient->getPolicy($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::policyName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]',
'[POLICY]'
);
get_policy_sample($formattedName);
}
getShare
Get catalog share object for the space.
The async variant is DesignCenterClient::getShareAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetShareRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Share |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GetShareRequest;
use Google\Cloud\DesignCenter\V1\Share;
/**
* @param string $formattedName The share name in the following format:
* `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/shares/$share`
* Please see {@see DesignCenterClient::shareName()} for help formatting this field.
*/
function get_share_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GetShareRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Share $response */
$response = $designCenterClient->getShare($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::shareName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[CATALOG]',
'[SHARE]'
);
get_share_sample($formattedName);
}
getSharedTemplate
Gets details about a shared template.
The async variant is DesignCenterClient::getSharedTemplateAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetSharedTemplateRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\SharedTemplate |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GetSharedTemplateRequest;
use Google\Cloud\DesignCenter\V1\SharedTemplate;
/**
* @param string $formattedName The shared template name.
* Format:
* `projects/$project/locations/$location/spaces/$space/sharedTemplates/$sharedTemplate`
* Please see {@see DesignCenterClient::sharedTemplateName()} for help formatting this field.
*/
function get_shared_template_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GetSharedTemplateRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var SharedTemplate $response */
$response = $designCenterClient->getSharedTemplate($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::sharedTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[SHARED_TEMPLATE]'
);
get_shared_template_sample($formattedName);
}
getSharedTemplateRevision
Gets details about a shared template revision.
The async variant is DesignCenterClient::getSharedTemplateRevisionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetSharedTemplateRevisionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\SharedTemplateRevision |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GetSharedTemplateRevisionRequest;
use Google\Cloud\DesignCenter\V1\SharedTemplateRevision;
/**
* @param string $formattedName The shared template revision name, in the following format:
* `projects/$project/locations/$location/spaces/$space/sharedTemplates/$sharedTemplate/revisions/$revision`
* Please see {@see DesignCenterClient::sharedTemplateRevisionName()} for help formatting this field.
*/
function get_shared_template_revision_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GetSharedTemplateRevisionRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var SharedTemplateRevision $response */
$response = $designCenterClient->getSharedTemplateRevision($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::sharedTemplateRevisionName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[SHARED_TEMPLATE]',
'[REVISION]'
);
get_shared_template_revision_sample($formattedName);
}
getSpace
Gets details about a space.
The async variant is DesignCenterClient::getSpaceAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetSpaceRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Space |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\GetSpaceRequest;
use Google\Cloud\DesignCenter\V1\Space;
/**
* @param string $formattedName The space name. Please see
* {@see DesignCenterClient::spaceName()} for help formatting this field.
*/
function get_space_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GetSpaceRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Space $response */
$response = $designCenterClient->getSpace($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::spaceName('[PROJECT]', '[LOCATION]', '[SPACE]');
get_space_sample($formattedName);
}
importApplicationIaC
Imports IaC for an application resource.
The async variant is DesignCenterClient::importApplicationIaCAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ImportApplicationIaCRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\ImportApplicationIaCResponse |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ImportApplicationIaCRequest;
use Google\Cloud\DesignCenter\V1\ImportApplicationIaCResponse;
/**
* @param string $formattedName The name of the application. Please see
* {@see DesignCenterClient::applicationName()} for help formatting this field.
*/
function import_application_ia_c_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ImportApplicationIaCRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var ImportApplicationIaCResponse $response */
$response = $designCenterClient->importApplicationIaC($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION]'
);
import_application_ia_c_sample($formattedName);
}
importApplicationTemplate
Imports to an existing application template from a given shared template.
The async variant is DesignCenterClient::importApplicationTemplateAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ImportApplicationTemplateRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\ApplicationTemplate |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\ApplicationTemplate;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ImportApplicationTemplateRequest;
/**
* @param string $formattedName The name of the application template. Please see
* {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
*/
function import_application_template_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ImportApplicationTemplateRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var ApplicationTemplate $response */
$response = $designCenterClient->importApplicationTemplate($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
import_application_template_sample($formattedName);
}
importApplicationTemplateIaC
Imports IaC for an application template.
The async variant is DesignCenterClient::importApplicationTemplateIaCAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ImportApplicationTemplateIaCRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\ImportApplicationTemplateIaCResponse |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ImportApplicationTemplateIaCRequest;
use Google\Cloud\DesignCenter\V1\ImportApplicationTemplateIaCResponse;
/**
* @param string $formattedName The name of the application template. Please see
* {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
*/
function import_application_template_ia_c_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ImportApplicationTemplateIaCRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var ImportApplicationTemplateIaCResponse $response */
$response = $designCenterClient->importApplicationTemplateIaC($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
import_application_template_ia_c_sample($formattedName);
}
ingestApplicationTemplateIaC
Ingests IaC for an application template asynchronously.
The async variant is DesignCenterClient::ingestApplicationTemplateIaCAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\IngestApplicationTemplateIaCRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\IngestApplicationTemplateIaCResponse> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\IngestApplicationTemplateIaCRequest;
use Google\Cloud\DesignCenter\V1\IngestApplicationTemplateIaCResponse;
use Google\Rpc\Status;
/**
* @param string $formattedName The name of the application template. Please see
* {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
*/
function ingest_application_template_ia_c_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new IngestApplicationTemplateIaCRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->ingestApplicationTemplateIaC($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var IngestApplicationTemplateIaCResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
ingest_application_template_ia_c_sample($formattedName);
}
listApplicationTemplateRevisions
Lists application template revisions in a given application template.
The async variant is DesignCenterClient::listApplicationTemplateRevisionsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListApplicationTemplateRevisionsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\ApplicationTemplateRevision;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ListApplicationTemplateRevisionsRequest;
/**
* @param string $formattedParent The parent from which to list application template revisions. Please see
* {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
*/
function list_application_template_revisions_sample(string $formattedParent): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ListApplicationTemplateRevisionsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->listApplicationTemplateRevisions($request);
/** @var ApplicationTemplateRevision $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
list_application_template_revisions_sample($formattedParent);
}
listApplicationTemplateSystemRevisions
Lists application template system revisions in a given application template.
The async variant is DesignCenterClient::listApplicationTemplateSystemRevisionsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListApplicationTemplateSystemRevisionsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\ApplicationTemplateSystemRevision;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ListApplicationTemplateSystemRevisionsRequest;
/**
* @param string $formattedParent The parent Application Template from which to list the system
* revisions. Format:
* projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}
* Please see {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
*/
function list_application_template_system_revisions_sample(string $formattedParent): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ListApplicationTemplateSystemRevisionsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->listApplicationTemplateSystemRevisions($request);
/** @var ApplicationTemplateSystemRevision $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
list_application_template_system_revisions_sample($formattedParent);
}
listApplicationTemplates
Lists application templates in a given space.
The async variant is DesignCenterClient::listApplicationTemplatesAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListApplicationTemplatesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\ApplicationTemplate;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ListApplicationTemplatesRequest;
/**
* @param string $formattedParent The parent resource from which to list application templates. Please see
* {@see DesignCenterClient::spaceName()} for help formatting this field.
*/
function list_application_templates_sample(string $formattedParent): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ListApplicationTemplatesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->listApplicationTemplates($request);
/** @var ApplicationTemplate $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::spaceName('[PROJECT]', '[LOCATION]', '[SPACE]');
list_application_templates_sample($formattedParent);
}
listApplications
Lists applications in a given space.
The async variant is DesignCenterClient::listApplicationsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListApplicationsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\Application;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ListApplicationsRequest;
/**
* @param string $formattedParent The parent resource from which to request a list of applications. Please see
* {@see DesignCenterClient::spaceName()} for help formatting this field.
*/
function list_applications_sample(string $formattedParent): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ListApplicationsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->listApplications($request);
/** @var Application $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::spaceName('[PROJECT]', '[LOCATION]', '[SPACE]');
list_applications_sample($formattedParent);
}
listCatalogTemplateRevisions
Lists template revisions.
The async variant is DesignCenterClient::listCatalogTemplateRevisionsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListCatalogTemplateRevisionsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\CatalogTemplateRevision;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ListCatalogTemplateRevisionsRequest;
/**
* @param string $formattedParent The parent resource from which a list of catalog template
* revisions is requested. Please see
* {@see DesignCenterClient::catalogTemplateName()} for help formatting this field.
*/
function list_catalog_template_revisions_sample(string $formattedParent): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ListCatalogTemplateRevisionsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->listCatalogTemplateRevisions($request);
/** @var CatalogTemplateRevision $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::catalogTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[CATALOG]',
'[CATALOG_TEMPLATE]'
);
list_catalog_template_revisions_sample($formattedParent);
}
listCatalogTemplates
Lists catalog templates.
The async variant is DesignCenterClient::listCatalogTemplatesAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListCatalogTemplatesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\CatalogTemplate;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ListCatalogTemplatesRequest;
/**
* @param string $formattedParent The parent from which the catalog templates are listed in the
* following format:
* `projects/$project/locations/$location/spaces/$space/catalogs/$catalog`
* Please see {@see DesignCenterClient::catalogName()} for help formatting this field.
*/
function list_catalog_templates_sample(string $formattedParent): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ListCatalogTemplatesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->listCatalogTemplates($request);
/** @var CatalogTemplate $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::catalogName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[CATALOG]'
);
list_catalog_templates_sample($formattedParent);
}
listCatalogs
Lists catalogs in a given space.
The async variant is DesignCenterClient::listCatalogsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListCatalogsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\Catalog;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ListCatalogsRequest;
/**
* @param string $formattedParent The parent space from which catalogs are listed.
* Format: `projects/$project/locations/$location/spaces/$space`
* Please see {@see DesignCenterClient::spaceName()} for help formatting this field.
*/
function list_catalogs_sample(string $formattedParent): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ListCatalogsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->listCatalogs($request);
/** @var Catalog $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::spaceName('[PROJECT]', '[LOCATION]', '[SPACE]');
list_catalogs_sample($formattedParent);
}
listComponents
Lists components in an application template.
The async variant is DesignCenterClient::listComponentsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListComponentsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\Component;
use Google\Cloud\DesignCenter\V1\ListComponentsRequest;
/**
* @param string $formattedParent The parent resource from which the list of components is
* requested. Please see
* {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
*/
function list_components_sample(string $formattedParent): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ListComponentsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->listComponents($request);
/** @var Component $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
list_components_sample($formattedParent);
}
listConnections
Lists connections in an application template.
The async variant is DesignCenterClient::listConnectionsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListConnectionsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\Connection;
use Google\Cloud\DesignCenter\V1\ListConnectionsRequest;
/**
* @param string $formattedParent The parent resource from which to request a list of connections. Please see
* {@see DesignCenterClient::componentName()} for help formatting this field.
*/
function list_connections_sample(string $formattedParent): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ListConnectionsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->listConnections($request);
/** @var Connection $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::componentName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]',
'[COMPONENT]'
);
list_connections_sample($formattedParent);
}
listPolicies
Lists policies for an application template.
The async variant is DesignCenterClient::listPoliciesAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListPoliciesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ListPoliciesRequest;
use Google\Cloud\DesignCenter\V1\Policy;
/**
* @param string $formattedParent The parent application template from which policies are listed in
* the following format:
* `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate`
* Please see {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
*/
function list_policies_sample(string $formattedParent): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ListPoliciesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->listPolicies($request);
/** @var Policy $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
list_policies_sample($formattedParent);
}
listSharedTemplateRevisions
Lists shared template revisions in a given space.
The async variant is DesignCenterClient::listSharedTemplateRevisionsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListSharedTemplateRevisionsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ListSharedTemplateRevisionsRequest;
use Google\Cloud\DesignCenter\V1\SharedTemplateRevision;
/**
* @param string $formattedParent The parent resource from which to list shared template revisions,
* in the following format:
* `projects/$project/locations/$location/spaces/$space/sharedTemplates/$sharedTemplate`
* Please see {@see DesignCenterClient::sharedTemplateName()} for help formatting this field.
*/
function list_shared_template_revisions_sample(string $formattedParent): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ListSharedTemplateRevisionsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->listSharedTemplateRevisions($request);
/** @var SharedTemplateRevision $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::sharedTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[SHARED_TEMPLATE]'
);
list_shared_template_revisions_sample($formattedParent);
}
listSharedTemplates
Lists shared templates in a given space.
The async variant is DesignCenterClient::listSharedTemplatesAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListSharedTemplatesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ListSharedTemplatesRequest;
use Google\Cloud\DesignCenter\V1\SharedTemplate;
/**
* @param string $formattedParent The parent space for which shared templates are listed in the
* following format: `projects/$project/locations/$location/spaces/$space`
* Please see {@see DesignCenterClient::spaceName()} for help formatting this field.
*/
function list_shared_templates_sample(string $formattedParent): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ListSharedTemplatesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->listSharedTemplates($request);
/** @var SharedTemplate $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::spaceName('[PROJECT]', '[LOCATION]', '[SPACE]');
list_shared_templates_sample($formattedParent);
}
listShares
Lists catalog share objects for the space.
The async variant is DesignCenterClient::listSharesAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListSharesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ListSharesRequest;
use Google\Cloud\DesignCenter\V1\Share;
/**
* @param string $formattedParent The parent resource from which a list of shares is requested. Please see
* {@see DesignCenterClient::catalogName()} for help formatting this field.
*/
function list_shares_sample(string $formattedParent): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ListSharesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->listShares($request);
/** @var Share $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::catalogName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[CATALOG]'
);
list_shares_sample($formattedParent);
}
listSpaces
Lists spaces in a given project and location.
The async variant is DesignCenterClient::listSpacesAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListSpacesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\ListSpacesRequest;
use Google\Cloud\DesignCenter\V1\Space;
/**
* @param string $formattedParent The name of the parent resource, for which spaces are listed. Please see
* {@see DesignCenterClient::locationName()} for help formatting this field.
*/
function list_spaces_sample(string $formattedParent): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new ListSpacesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->listSpaces($request);
/** @var Space $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::locationName('[PROJECT]', '[LOCATION]');
list_spaces_sample($formattedParent);
}
previewApplication
Previews deployment of an application.
The async variant is DesignCenterClient::previewApplicationAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\PreviewApplicationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\PreviewApplicationResponse> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\PreviewApplicationRequest;
use Google\Cloud\DesignCenter\V1\PreviewApplicationResponse;
use Google\Rpc\Status;
/**
* @param string $formattedName The application name in the following format:
* `projects/$project/locations/$location/spaces/$space/applications/$application`
* Please see {@see DesignCenterClient::applicationName()} for help formatting this field.
*/
function preview_application_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new PreviewApplicationRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->previewApplication($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var PreviewApplicationResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION]'
);
preview_application_sample($formattedName);
}
recommendIAMRoles
Gets recommended IAM roles for an application.
Evaluates the infrastructure resources defined by an application (including its template configuration and parameters) to determine the set of IAM roles and Google Cloud APIs that you must configure before you deploy across target projects.
The operation is asynchronous and returns a google.longrunning.Operation.
Upon completion, the operation result contains a
RecommendIAMRolesResponse with project-level IAM role and API
recommendations.
The async variant is DesignCenterClient::recommendIAMRolesAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\RecommendIAMRolesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\RecommendIAMRolesResponse> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\RecommendIAMRolesRequest;
use Google\Cloud\DesignCenter\V1\RecommendIAMRolesResponse;
use Google\Rpc\Status;
/**
* @param string $formattedName The name of the application resource for which to recommend IAM
* roles. Format:
* projects/$project/locations/$location/spaces/$space/applications/$application
* Please see {@see DesignCenterClient::applicationName()} for help formatting this field.
*/
function recommend_iam_roles_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new RecommendIAMRolesRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->recommendIAMRoles($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var RecommendIAMRolesResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION]'
);
recommend_iam_roles_sample($formattedName);
}
registerAppHubApplicationResources
Register deployed resources from terraform state file with App Hub without needing a space.
The async variant is DesignCenterClient::registerAppHubApplicationResourcesAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\RegisterAppHubApplicationResourcesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\RegisterAppHubApplicationResourcesResponse> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\RegisterAppHubApplicationResourcesRequest;
use Google\Cloud\DesignCenter\V1\RegisterAppHubApplicationResourcesResponse;
use Google\Rpc\Status;
/**
* @param string $formattedParent The parent location.
* Format: projects/{project}/locations/{location}
* Please see {@see DesignCenterClient::locationName()} for help formatting this field.
* @param string $apphubApplication The name of the AppHub Application.
* Format:
* projects/{project}/locations/{location}/applications/{application}
*/
function register_app_hub_application_resources_sample(
string $formattedParent,
string $apphubApplication
): void {
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new RegisterAppHubApplicationResourcesRequest())
->setParent($formattedParent)
->setApphubApplication($apphubApplication);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->registerAppHubApplicationResources($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var RegisterAppHubApplicationResourcesResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DesignCenterClient::locationName('[PROJECT]', '[LOCATION]');
$apphubApplication = '[APPHUB_APPLICATION]';
register_app_hub_application_resources_sample($formattedParent, $apphubApplication);
}
snapshotApplicationTemplate
Snapshots an application template to create a new revision asynchronously.
The async variant is DesignCenterClient::snapshotApplicationTemplateAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\SnapshotApplicationTemplateRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\SnapshotApplicationTemplateResponse> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\SnapshotApplicationTemplateRequest;
use Google\Cloud\DesignCenter\V1\SnapshotApplicationTemplateResponse;
use Google\Rpc\Status;
/**
* @param string $formattedName The name of the application template. Please see
* {@see DesignCenterClient::applicationTemplateName()} for help formatting this field.
*/
function snapshot_application_template_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new SnapshotApplicationTemplateRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->snapshotApplicationTemplate($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var SnapshotApplicationTemplateResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::applicationTemplateName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]'
);
snapshot_application_template_sample($formattedName);
}
syncShare
Synchronizes a share and updates the destination workspace to reflect.
reflect the most recent changes to the catalog.
The async variant is DesignCenterClient::syncShareAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\SyncShareRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\OperationResponse<Google\Cloud\DesignCenter\V1\Share> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\Share;
use Google\Cloud\DesignCenter\V1\SyncShareRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The share name in the following format:
* `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/shares/$share`
* Please see {@see DesignCenterClient::shareName()} for help formatting this field.
*/
function sync_share_sample(string $formattedName): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new SyncShareRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $designCenterClient->syncShare($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var Share $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DesignCenterClient::shareName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[CATALOG]',
'[SHARE]'
);
sync_share_sample($formattedName);
}
updateApplication
Updates an application.
The async variant is DesignCenterClient::updateApplicationAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdateApplicationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Application |
|
use Google\ApiCore\ApiException;
use Google\Cloud\AppHub\V1\Scope;
use Google\Cloud\AppHub\V1\Scope\Type;
use Google\Cloud\DesignCenter\V1\Application;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\DeploymentSource;
use Google\Cloud\DesignCenter\V1\UpdateApplicationRequest;
/**
* @param int $applicationScopeType Scope Type.
*/
function update_application_sample(int $applicationScopeType): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$applicationSource = new DeploymentSource();
$applicationScope = (new Scope())
->setType($applicationScopeType);
$application = (new Application())
->setSource($applicationSource)
->setScope($applicationScope);
$request = (new UpdateApplicationRequest())
->setApplication($application);
// Call the API and handle any network failures.
try {
/** @var Application $response */
$response = $designCenterClient->updateApplication($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$applicationScopeType = Type::TYPE_UNSPECIFIED;
update_application_sample($applicationScopeType);
}
updateApplicationTemplate
Updates an application template.
The async variant is DesignCenterClient::updateApplicationTemplateAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdateApplicationTemplateRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\ApplicationTemplate |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\ApplicationTemplate;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\UpdateApplicationTemplateRequest;
/**
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function update_application_template_sample(): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$applicationTemplate = new ApplicationTemplate();
$request = (new UpdateApplicationTemplateRequest())
->setApplicationTemplate($applicationTemplate);
// Call the API and handle any network failures.
try {
/** @var ApplicationTemplate $response */
$response = $designCenterClient->updateApplicationTemplate($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
updateCatalog
Updates a catalog.
The async variant is DesignCenterClient::updateCatalogAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdateCatalogRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Catalog |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Catalog;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\UpdateCatalogRequest;
/**
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function update_catalog_sample(): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$catalog = new Catalog();
$request = (new UpdateCatalogRequest())
->setCatalog($catalog);
// Call the API and handle any network failures.
try {
/** @var Catalog $response */
$response = $designCenterClient->updateCatalog($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
updateCatalogTemplate
Updates a catalog template resource.
The async variant is DesignCenterClient::updateCatalogTemplateAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdateCatalogTemplateRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\CatalogTemplate |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\CatalogTemplate;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\TemplateCategory;
use Google\Cloud\DesignCenter\V1\UpdateCatalogTemplateRequest;
/**
* @param int $catalogTemplateTemplateCategory The category of the Application Design Center application
* template.
*/
function update_catalog_template_sample(int $catalogTemplateTemplateCategory): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$catalogTemplate = (new CatalogTemplate())
->setTemplateCategory($catalogTemplateTemplateCategory);
$request = (new UpdateCatalogTemplateRequest())
->setCatalogTemplate($catalogTemplate);
// Call the API and handle any network failures.
try {
/** @var CatalogTemplate $response */
$response = $designCenterClient->updateCatalogTemplate($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$catalogTemplateTemplateCategory = TemplateCategory::TEMPLATE_CATEGORY_UNSPECIFIED;
update_catalog_template_sample($catalogTemplateTemplateCategory);
}
updateComponent
Updates a component.
The async variant is DesignCenterClient::updateComponentAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdateComponentRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Component |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\Component;
use Google\Cloud\DesignCenter\V1\UpdateComponentRequest;
/**
* @param string $componentSharedTemplateRevisionUri Immutable. The shared template used to generate the component.
*/
function update_component_sample(string $componentSharedTemplateRevisionUri): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$component = (new Component())
->setSharedTemplateRevisionUri($componentSharedTemplateRevisionUri);
$request = (new UpdateComponentRequest())
->setComponent($component);
// Call the API and handle any network failures.
try {
/** @var Component $response */
$response = $designCenterClient->updateComponent($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$componentSharedTemplateRevisionUri = '[SHARED_TEMPLATE_REVISION_URI]';
update_component_sample($componentSharedTemplateRevisionUri);
}
updateConnection
Updates a connection.
The async variant is DesignCenterClient::updateConnectionAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdateConnectionRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Connection |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\Connection;
use Google\Cloud\DesignCenter\V1\UpdateConnectionRequest;
/**
* @param string $formattedConnectionDestinationComponentUri The destination component URI used to generate the connection.
* Format is
* `projects/$project/locations/$location/spaces/$space/applicationTemplates/$application_template/components/$component`
* Please see {@see DesignCenterClient::componentName()} for help formatting this field.
*/
function update_connection_sample(string $formattedConnectionDestinationComponentUri): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$connection = (new Connection())
->setDestinationComponentUri($formattedConnectionDestinationComponentUri);
$request = (new UpdateConnectionRequest())
->setConnection($connection);
// Call the API and handle any network failures.
try {
/** @var Connection $response */
$response = $designCenterClient->updateConnection($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedConnectionDestinationComponentUri = DesignCenterClient::componentName(
'[PROJECT]',
'[LOCATION]',
'[SPACE]',
'[APPLICATION_TEMPLATE]',
'[COMPONENT]'
);
update_connection_sample($formattedConnectionDestinationComponentUri);
}
updatePolicy
Updates a policy.
The async variant is DesignCenterClient::updatePolicyAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdatePolicyRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Policy |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\Policy;
use Google\Cloud\DesignCenter\V1\Policy\PolicyType;
use Google\Cloud\DesignCenter\V1\UpdatePolicyRequest;
/**
* @param int $policyPolicyType The policy type.
* Policy type is used to determine the domain of the policy.
*/
function update_policy_sample(int $policyPolicyType): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$policy = (new Policy())
->setPolicyType($policyPolicyType);
$request = (new UpdatePolicyRequest())
->setPolicy($policy);
// Call the API and handle any network failures.
try {
/** @var Policy $response */
$response = $designCenterClient->updatePolicy($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$policyPolicyType = PolicyType::POLICY_TYPE_UNSPECIFIED;
update_policy_sample($policyPolicyType);
}
updateSpace
Updates a space.
The async variant is DesignCenterClient::updateSpaceAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdateSpaceRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\DesignCenter\V1\Space |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\DesignCenter\V1\Space;
use Google\Cloud\DesignCenter\V1\UpdateSpaceRequest;
/**
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function update_space_sample(): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$space = new Space();
$request = (new UpdateSpaceRequest())
->setSpace($space);
// Call the API and handle any network failures.
try {
/** @var Space $response */
$response = $designCenterClient->updateSpace($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
getLocation
Gets information about a location.
The async variant is DesignCenterClient::getLocationAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\GetLocationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Location\Location |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\Location\GetLocationRequest;
use Google\Cloud\Location\Location;
/**
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function get_location_sample(): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = new GetLocationRequest();
// Call the API and handle any network failures.
try {
/** @var Location $response */
$response = $designCenterClient->getLocation($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
listLocations
Lists information about the supported locations for this service.
This method lists locations based on the resource scope provided in
the ListLocationsRequest.name field: *
Global locations: If name is empty, the method lists the
public locations available to all projects. * Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.
For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.
The async variant is DesignCenterClient::listLocationsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\ListLocationsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\Location\ListLocationsRequest;
use Google\Cloud\Location\Location;
/**
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function list_locations_sample(): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = new ListLocationsRequest();
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $designCenterClient->listLocations($request);
/** @var Location $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
getIamPolicy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
The async variant is DesignCenterClient::getIamPolicyAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\GetIamPolicyRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Iam\V1\Policy |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\Iam\V1\GetIamPolicyRequest;
use Google\Cloud\Iam\V1\Policy;
/**
* @param string $resource REQUIRED: The resource for which the policy is being requested.
* See the operation documentation for the appropriate value for this field.
*/
function get_iam_policy_sample(string $resource): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$request = (new GetIamPolicyRequest())
->setResource($resource);
// Call the API and handle any network failures.
try {
/** @var Policy $response */
$response = $designCenterClient->getIamPolicy($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$resource = '[RESOURCE]';
get_iam_policy_sample($resource);
}
setIamPolicy
Sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
errors.
The async variant is DesignCenterClient::setIamPolicyAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\SetIamPolicyRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Iam\V1\Policy |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\Iam\V1\Policy;
use Google\Cloud\Iam\V1\SetIamPolicyRequest;
/**
* @param string $resource REQUIRED: The resource for which the policy is being specified.
* See the operation documentation for the appropriate value for this field.
*/
function set_iam_policy_sample(string $resource): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$policy = new Policy();
$request = (new SetIamPolicyRequest())
->setResource($resource)
->setPolicy($policy);
// Call the API and handle any network failures.
try {
/** @var Policy $response */
$response = $designCenterClient->setIamPolicy($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$resource = '[RESOURCE]';
set_iam_policy_sample($resource);
}
testIamPermissions
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
The async variant is DesignCenterClient::testIamPermissionsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\TestIamPermissionsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Iam\V1\TestIamPermissionsResponse |
|
use Google\ApiCore\ApiException;
use Google\Cloud\DesignCenter\V1\Client\DesignCenterClient;
use Google\Cloud\Iam\V1\TestIamPermissionsRequest;
use Google\Cloud\Iam\V1\TestIamPermissionsResponse;
/**
* @param string $resource REQUIRED: The resource for which the policy detail is being requested.
* See the operation documentation for the appropriate value for this field.
* @param string $permissionsElement The set of permissions to check for the `resource`. Permissions with
* wildcards (such as '*' or 'storage.*') are not allowed. For more
* information see
* [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
*/
function test_iam_permissions_sample(string $resource, string $permissionsElement): void
{
// Create a client.
$designCenterClient = new DesignCenterClient();
// Prepare the request message.
$permissions = [$permissionsElement];
$request = (new TestIamPermissionsRequest())
->setResource($resource)
->setPermissions($permissions);
// Call the API and handle any network failures.
try {
/** @var TestIamPermissionsResponse $response */
$response = $designCenterClient->testIamPermissions($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$resource = '[RESOURCE]';
$permissionsElement = '[PERMISSIONS]';
test_iam_permissions_sample($resource, $permissionsElement);
}
commitApplicationTemplateAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CommitApplicationTemplateRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\ApplicationTemplateRevision> |
|
createApplicationAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateApplicationRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Application> |
|
createApplicationTemplateAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateApplicationTemplateRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\ApplicationTemplate> |
|
createCatalogAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateCatalogRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Catalog> |
|
createCatalogTemplateAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateCatalogTemplateRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\CatalogTemplate> |
|
createCatalogTemplateRevisionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateCatalogTemplateRevisionRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
createComponentAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateComponentRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Component> |
|
createConnectionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateConnectionRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Connection> |
|
createPolicyAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreatePolicyRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Policy> |
|
createShareAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateShareRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
createSpaceAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\CreateSpaceRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Space> |
|
deleteApplicationAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteApplicationRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
deleteApplicationTemplateAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteApplicationTemplateRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
|
deleteApplicationTemplateRevisionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteApplicationTemplateRevisionRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
|
deleteCatalogAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteCatalogRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
deleteCatalogTemplateAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteCatalogTemplateRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
deleteCatalogTemplateRevisionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteCatalogTemplateRevisionRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
deleteComponentAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteComponentRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
|
deleteConnectionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteConnectionRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
|
deletePolicyAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeletePolicyRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
|
deleteShareAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteShareRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
deleteSpaceAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeleteSpaceRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
|
deployApplicationAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\DeployApplicationRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
exportApplicationIaCAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ExportApplicationIaCRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
exportApplicationTemplateIaCAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ExportApplicationTemplateIaCRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
exportApplicationTemplateRevisionIaCAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ExportApplicationTemplateRevisionIaCRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
fetchApplicationAssessmentReportAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\FetchApplicationAssessmentReportRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\FetchApplicationAssessmentReportResponse> |
|
fetchFrameworksAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\FetchFrameworksRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
generateApplicationAssessmentReportAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GenerateApplicationAssessmentReportRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
generateApplicationIaCAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GenerateApplicationIaCRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\GenerateApplicationIaCResponse> |
|
generateApplicationTemplateAssessmentReportAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateAssessmentReportRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
generateApplicationTemplateIaCAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateIaCRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateIaCResponse> |
|
generateApplicationTemplateRevisionIaCAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateRevisionIaCRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\GenerateApplicationTemplateRevisionIaCResponse> |
|
generateAssessmentReportAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GenerateAssessmentReportRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
generateTerraformPlanAssessmentReportAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GenerateTerraformPlanAssessmentReportRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
getApplicationAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetApplicationRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Application> |
|
getApplicationTemplateAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetApplicationTemplateRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\ApplicationTemplate> |
|
getApplicationTemplateRevisionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetApplicationTemplateRevisionRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\ApplicationTemplateRevision> |
|
getApplicationTemplateSystemRevisionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetApplicationTemplateSystemRevisionRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\ApplicationTemplateSystemRevision> |
|
getCatalogAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetCatalogRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Catalog> |
|
getCatalogTemplateAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetCatalogTemplateRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\CatalogTemplate> |
|
getCatalogTemplateRevisionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetCatalogTemplateRevisionRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\CatalogTemplateRevision> |
|
getComponentAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetComponentRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Component> |
|
getConnectionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetConnectionRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Connection> |
|
getPolicyAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetPolicyRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Policy> |
|
getShareAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetShareRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Share> |
|
getSharedTemplateAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetSharedTemplateRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\SharedTemplate> |
|
getSharedTemplateRevisionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetSharedTemplateRevisionRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\SharedTemplateRevision> |
|
getSpaceAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\GetSpaceRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Space> |
|
importApplicationIaCAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ImportApplicationIaCRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\ImportApplicationIaCResponse> |
|
importApplicationTemplateAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ImportApplicationTemplateRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\ApplicationTemplate> |
|
importApplicationTemplateIaCAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ImportApplicationTemplateIaCRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\ImportApplicationTemplateIaCResponse> |
|
ingestApplicationTemplateIaCAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\IngestApplicationTemplateIaCRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
listApplicationTemplateRevisionsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListApplicationTemplateRevisionsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listApplicationTemplateSystemRevisionsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListApplicationTemplateSystemRevisionsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listApplicationTemplatesAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListApplicationTemplatesRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listApplicationsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListApplicationsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listCatalogTemplateRevisionsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListCatalogTemplateRevisionsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listCatalogTemplatesAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListCatalogTemplatesRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listCatalogsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListCatalogsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listComponentsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListComponentsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listConnectionsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListConnectionsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listPoliciesAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListPoliciesRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listSharedTemplateRevisionsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListSharedTemplateRevisionsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listSharedTemplatesAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListSharedTemplatesRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listSharesAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListSharesRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listSpacesAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\ListSpacesRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
previewApplicationAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\PreviewApplicationRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
recommendIAMRolesAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\RecommendIAMRolesRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
registerAppHubApplicationResourcesAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\RegisterAppHubApplicationResourcesRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
snapshotApplicationTemplateAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\SnapshotApplicationTemplateRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
syncShareAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\SyncShareRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
updateApplicationAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdateApplicationRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Application> |
|
updateApplicationTemplateAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdateApplicationTemplateRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\ApplicationTemplate> |
|
updateCatalogAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdateCatalogRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Catalog> |
|
updateCatalogTemplateAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdateCatalogTemplateRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\CatalogTemplate> |
|
updateComponentAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdateComponentRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Component> |
|
updateConnectionAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdateConnectionRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Connection> |
|
updatePolicyAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdatePolicyRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Policy> |
|
updateSpaceAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\DesignCenter\V1\UpdateSpaceRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Space> |
|
getLocationAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\GetLocationRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Location\Location> |
|
listLocationsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\ListLocationsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
getIamPolicyAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\GetIamPolicyRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Policy> |
|
setIamPolicyAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\SetIamPolicyRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\DesignCenter\V1\Policy> |
|
testIamPermissionsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\TestIamPermissionsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Iam\V1\TestIamPermissionsResponse> |
|
getOperationsClient
Return an OperationsClient object with the same endpoint as $this.
| Returns | |
|---|---|
| Type | Description |
Google\LongRunning\Client\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 |
|
static::applicationName
Formats a string containing the fully-qualified path to represent a application resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
space |
string
|
application |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted application resource. |
static::applicationTemplateName
Formats a string containing the fully-qualified path to represent a application_template resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
space |
string
|
applicationTemplate |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted application_template resource. |
static::applicationTemplateRevisionName
Formats a string containing the fully-qualified path to represent a application_template_revision resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
space |
string
|
applicationTemplate |
string
|
revision |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted application_template_revision resource. |
static::applicationTemplateSystemRevisionName
Formats a string containing the fully-qualified path to represent a application_template_system_revision resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
space |
string
|
applicationTemplate |
string
|
systemRevision |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted application_template_system_revision resource. |
static::catalogName
Formats a string containing the fully-qualified path to represent a catalog resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
space |
string
|
catalog |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted catalog resource. |
static::catalogTemplateName
Formats a string containing the fully-qualified path to represent a catalog_template resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
space |
string
|
catalog |
string
|
catalogTemplate |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted catalog_template resource. |
static::catalogTemplateRevisionName
Formats a string containing the fully-qualified path to represent a catalog_template_revision resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
space |
string
|
catalog |
string
|
catalogTemplate |
string
|
revision |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted catalog_template_revision resource. |
static::cloudControlName
Formats a string containing the fully-qualified path to represent a cloud_control resource.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
location |
string
|
cloudControl |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted cloud_control resource. |
static::componentName
Formats a string containing the fully-qualified path to represent a component resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
space |
string
|
applicationTemplate |
string
|
component |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted component resource. |
static::connectionName
Formats a string containing the fully-qualified path to represent a connection resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
space |
string
|
applicationTemplate |
string
|
component |
string
|
connection |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted connection resource. |
static::gitRepositoryLinkName
Formats a string containing the fully-qualified path to represent a git_repository_link resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
connection |
string
|
gitRepositoryLink |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted git_repository_link resource. |
static::locationName
Formats a string containing the fully-qualified path to represent a location resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted location resource. |
static::organizationLocationCloudControlName
Formats a string containing the fully-qualified path to represent a organization_location_cloud_control resource.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
location |
string
|
cloudControl |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted organization_location_cloud_control resource. |
static::organizationRoleName
Formats a string containing the fully-qualified path to represent a organization_role resource.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
role |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted organization_role resource. |
static::policyName
Formats a string containing the fully-qualified path to represent a policy resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
space |
string
|
applicationTemplate |
string
|
policy |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted policy resource. |
static::projectLocationCloudControlName
Formats a string containing the fully-qualified path to represent a project_location_cloud_control resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
cloudControl |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted project_location_cloud_control resource. |
static::projectRoleName
Formats a string containing the fully-qualified path to represent a project_role resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
role |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted project_role resource. |
static::roleName
Formats a string containing the fully-qualified path to represent a role resource.
| Parameters | |
|---|---|
| Name | Description |
organization |
string
|
role |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted role resource. |
static::shareName
Formats a string containing the fully-qualified path to represent a share resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
space |
string
|
catalog |
string
|
share |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted share resource. |
static::sharedTemplateName
Formats a string containing the fully-qualified path to represent a shared_template resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
space |
string
|
sharedTemplate |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted shared_template resource. |
static::sharedTemplateRevisionName
Formats a string containing the fully-qualified path to represent a shared_template_revision resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
space |
string
|
sharedTemplate |
string
|
revision |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted shared_template_revision resource. |
static::spaceName
Formats a string containing the fully-qualified path to represent a space resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
space |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted space resource. |
static::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
- application: projects/{project}/locations/{location}/spaces/{space}/applications/{application}
- applicationTemplate: projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}
- applicationTemplateRevision: projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}/revisions/{revision}
- applicationTemplateSystemRevision: projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}/systemRevisions/{system_revision}
- catalog: projects/{project}/locations/{location}/spaces/{space}/catalogs/{catalog}
- catalogTemplate: projects/{project}/locations/{location}/spaces/{space}/catalogs/{catalog}/templates/{catalog_template}
- catalogTemplateRevision: projects/{project}/locations/{location}/spaces/{space}/catalogs/{catalog}/templates/{catalog_template}/revisions/{revision}
- cloudControl: organizations/{organization}/locations/{location}/cloudControls/{cloud_control}
- component: projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}/components/{component}
- connection: projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}/components/{component}/connections/{connection}
- gitRepositoryLink: projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}
- location: projects/{project}/locations/{location}
- organizationLocationCloudControl: organizations/{organization}/locations/{location}/cloudControls/{cloud_control}
- organizationRole: organizations/{organization}/roles/{role}
- policy: projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}/policies/{policy}
- projectLocationCloudControl: projects/{project}/locations/{location}/cloudControls/{cloud_control}
- projectRole: projects/{project}/roles/{role}
- role: organizations/{organization}/roles/{role}
- share: projects/{project}/locations/{location}/spaces/{space}/catalogs/{catalog}/shares/{share}
- sharedTemplate: projects/{project}/locations/{location}/spaces/{space}/sharedTemplates/{shared_template}
- sharedTemplateRevision: projects/{project}/locations/{location}/spaces/{space}/sharedTemplates/{shared_template}/revisions/{revision}
- space: projects/{project}/locations/{location}/spaces/{space}
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. |