Reference documentation and code samples for the Google Cloud Network Security V1 Client class InterceptClient.
Service Description: Service for Third-Party Packet Intercept (TPPI).
TPPI is the "in-band" flavor of the Network Security Integrations product.
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 \ NetworkSecurity \ 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 |
FetchAuthTokenInterface|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|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|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'. |
createInterceptDeployment
Creates a deployment in a given project and location.
See https://google.aip.dev/133.
The async variant is InterceptClient::createInterceptDeploymentAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\CreateInterceptDeploymentRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\InterceptDeployment> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\CreateInterceptDeploymentRequest;
use Google\Cloud\NetworkSecurity\V1\InterceptDeployment;
use Google\Rpc\Status;
/**
* @param string $formattedParent The parent resource where this deployment will be created.
* Format: projects/{project}/locations/{location}
* Please see {@see InterceptClient::locationName()} for help formatting this field.
* @param string $interceptDeploymentId The ID to use for the new deployment, which will become the final
* component of the deployment's resource name.
* @param string $formattedInterceptDeploymentForwardingRule Immutable. The regional forwarding rule that fronts the
* interceptors, for example:
* `projects/123456789/regions/us-central1/forwardingRules/my-rule`.
* See https://google.aip.dev/124. Please see
* {@see InterceptClient::forwardingRuleName()} for help formatting this field.
* @param string $formattedInterceptDeploymentInterceptDeploymentGroup Immutable. The deployment group that this deployment is a part
* of, for example:
* `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`.
* See https://google.aip.dev/124. Please see
* {@see InterceptClient::interceptDeploymentGroupName()} for help formatting this field.
*/
function create_intercept_deployment_sample(
string $formattedParent,
string $interceptDeploymentId,
string $formattedInterceptDeploymentForwardingRule,
string $formattedInterceptDeploymentInterceptDeploymentGroup
): void {
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$interceptDeployment = (new InterceptDeployment())
->setForwardingRule($formattedInterceptDeploymentForwardingRule)
->setInterceptDeploymentGroup($formattedInterceptDeploymentInterceptDeploymentGroup);
$request = (new CreateInterceptDeploymentRequest())
->setParent($formattedParent)
->setInterceptDeploymentId($interceptDeploymentId)
->setInterceptDeployment($interceptDeployment);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $interceptClient->createInterceptDeployment($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var InterceptDeployment $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');
$interceptDeploymentId = '[INTERCEPT_DEPLOYMENT_ID]';
$formattedInterceptDeploymentForwardingRule = InterceptClient::forwardingRuleName(
'[PROJECT]',
'[FORWARDING_RULE]'
);
$formattedInterceptDeploymentInterceptDeploymentGroup = InterceptClient::interceptDeploymentGroupName(
'[PROJECT]',
'[LOCATION]',
'[INTERCEPT_DEPLOYMENT_GROUP]'
);
create_intercept_deployment_sample(
$formattedParent,
$interceptDeploymentId,
$formattedInterceptDeploymentForwardingRule,
$formattedInterceptDeploymentInterceptDeploymentGroup
);
}
createInterceptDeploymentGroup
Creates a deployment group in a given project and location.
See https://google.aip.dev/133.
The async variant is InterceptClient::createInterceptDeploymentGroupAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\CreateInterceptDeploymentGroupRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\InterceptDeploymentGroup> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\CreateInterceptDeploymentGroupRequest;
use Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup;
use Google\Rpc\Status;
/**
* @param string $formattedParent The parent resource where this deployment group will be created.
* Format: projects/{project}/locations/{location}
* Please see {@see InterceptClient::locationName()} for help formatting this field.
* @param string $interceptDeploymentGroupId The ID to use for the new deployment group, which will become the
* final component of the deployment group's resource name.
* @param string $formattedInterceptDeploymentGroupNetwork Immutable. The network that will be used for all child
* deployments, for example: `projects/{project}/global/networks/{network}`.
* See https://google.aip.dev/124. Please see
* {@see InterceptClient::networkName()} for help formatting this field.
*/
function create_intercept_deployment_group_sample(
string $formattedParent,
string $interceptDeploymentGroupId,
string $formattedInterceptDeploymentGroupNetwork
): void {
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$interceptDeploymentGroup = (new InterceptDeploymentGroup())
->setNetwork($formattedInterceptDeploymentGroupNetwork);
$request = (new CreateInterceptDeploymentGroupRequest())
->setParent($formattedParent)
->setInterceptDeploymentGroupId($interceptDeploymentGroupId)
->setInterceptDeploymentGroup($interceptDeploymentGroup);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $interceptClient->createInterceptDeploymentGroup($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var InterceptDeploymentGroup $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');
$interceptDeploymentGroupId = '[INTERCEPT_DEPLOYMENT_GROUP_ID]';
$formattedInterceptDeploymentGroupNetwork = InterceptClient::networkName('[PROJECT]', '[NETWORK]');
create_intercept_deployment_group_sample(
$formattedParent,
$interceptDeploymentGroupId,
$formattedInterceptDeploymentGroupNetwork
);
}
createInterceptEndpointGroup
Creates an endpoint group in a given project and location.
See https://google.aip.dev/133.
The async variant is InterceptClient::createInterceptEndpointGroupAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\CreateInterceptEndpointGroupRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\InterceptEndpointGroup> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\CreateInterceptEndpointGroupRequest;
use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup;
use Google\Rpc\Status;
/**
* @param string $formattedParent The parent resource where this endpoint group will be created.
* Format: projects/{project}/locations/{location}
* Please see {@see InterceptClient::locationName()} for help formatting this field.
* @param string $interceptEndpointGroupId The ID to use for the endpoint group, which will become the final
* component of the endpoint group's resource name.
* @param string $formattedInterceptEndpointGroupInterceptDeploymentGroup Immutable. The deployment group that this endpoint group is
* connected to, for example:
* `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`.
* See https://google.aip.dev/124. Please see
* {@see InterceptClient::interceptDeploymentGroupName()} for help formatting this field.
*/
function create_intercept_endpoint_group_sample(
string $formattedParent,
string $interceptEndpointGroupId,
string $formattedInterceptEndpointGroupInterceptDeploymentGroup
): void {
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$interceptEndpointGroup = (new InterceptEndpointGroup())
->setInterceptDeploymentGroup($formattedInterceptEndpointGroupInterceptDeploymentGroup);
$request = (new CreateInterceptEndpointGroupRequest())
->setParent($formattedParent)
->setInterceptEndpointGroupId($interceptEndpointGroupId)
->setInterceptEndpointGroup($interceptEndpointGroup);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $interceptClient->createInterceptEndpointGroup($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var InterceptEndpointGroup $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');
$interceptEndpointGroupId = '[INTERCEPT_ENDPOINT_GROUP_ID]';
$formattedInterceptEndpointGroupInterceptDeploymentGroup = InterceptClient::interceptDeploymentGroupName(
'[PROJECT]',
'[LOCATION]',
'[INTERCEPT_DEPLOYMENT_GROUP]'
);
create_intercept_endpoint_group_sample(
$formattedParent,
$interceptEndpointGroupId,
$formattedInterceptEndpointGroupInterceptDeploymentGroup
);
}
createInterceptEndpointGroupAssociation
Creates an association in a given project and location.
See https://google.aip.dev/133.
The async variant is InterceptClient::createInterceptEndpointGroupAssociationAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\CreateInterceptEndpointGroupAssociationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\InterceptEndpointGroupAssociation> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\CreateInterceptEndpointGroupAssociationRequest;
use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation;
use Google\Rpc\Status;
/**
* @param string $formattedParent The parent resource where this association will be created.
* Format: projects/{project}/locations/{location}
* Please see {@see InterceptClient::locationName()} for help formatting this field.
* @param string $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup Immutable. The endpoint group that this association is connected
* to, for example:
* `projects/123456789/locations/global/interceptEndpointGroups/my-eg`.
* See https://google.aip.dev/124. Please see
* {@see InterceptClient::interceptEndpointGroupName()} for help formatting this field.
* @param string $formattedInterceptEndpointGroupAssociationNetwork Immutable. The VPC network that is associated. for example:
* `projects/123456789/global/networks/my-network`.
* See https://google.aip.dev/124. Please see
* {@see InterceptClient::networkName()} for help formatting this field.
*/
function create_intercept_endpoint_group_association_sample(
string $formattedParent,
string $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup,
string $formattedInterceptEndpointGroupAssociationNetwork
): void {
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$interceptEndpointGroupAssociation = (new InterceptEndpointGroupAssociation())
->setInterceptEndpointGroup($formattedInterceptEndpointGroupAssociationInterceptEndpointGroup)
->setNetwork($formattedInterceptEndpointGroupAssociationNetwork);
$request = (new CreateInterceptEndpointGroupAssociationRequest())
->setParent($formattedParent)
->setInterceptEndpointGroupAssociation($interceptEndpointGroupAssociation);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $interceptClient->createInterceptEndpointGroupAssociation($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var InterceptEndpointGroupAssociation $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');
$formattedInterceptEndpointGroupAssociationInterceptEndpointGroup = InterceptClient::interceptEndpointGroupName(
'[PROJECT]',
'[LOCATION]',
'[INTERCEPT_ENDPOINT_GROUP]'
);
$formattedInterceptEndpointGroupAssociationNetwork = InterceptClient::networkName(
'[PROJECT]',
'[NETWORK]'
);
create_intercept_endpoint_group_association_sample(
$formattedParent,
$formattedInterceptEndpointGroupAssociationInterceptEndpointGroup,
$formattedInterceptEndpointGroupAssociationNetwork
);
}
deleteInterceptDeployment
Deletes a deployment.
See https://google.aip.dev/135.
The async variant is InterceptClient::deleteInterceptDeploymentAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\DeleteInterceptDeploymentRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\DeleteInterceptDeploymentRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName Name of the resource
* Please see {@see InterceptClient::interceptDeploymentName()} for help formatting this field.
*/
function delete_intercept_deployment_sample(string $formattedName): void
{
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$request = (new DeleteInterceptDeploymentRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $interceptClient->deleteInterceptDeployment($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 = InterceptClient::interceptDeploymentName(
'[PROJECT]',
'[LOCATION]',
'[INTERCEPT_DEPLOYMENT]'
);
delete_intercept_deployment_sample($formattedName);
}
deleteInterceptDeploymentGroup
Deletes a deployment group.
See https://google.aip.dev/135.
The async variant is InterceptClient::deleteInterceptDeploymentGroupAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\DeleteInterceptDeploymentGroupRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\DeleteInterceptDeploymentGroupRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The deployment group to delete. Please see
* {@see InterceptClient::interceptDeploymentGroupName()} for help formatting this field.
*/
function delete_intercept_deployment_group_sample(string $formattedName): void
{
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$request = (new DeleteInterceptDeploymentGroupRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $interceptClient->deleteInterceptDeploymentGroup($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 = InterceptClient::interceptDeploymentGroupName(
'[PROJECT]',
'[LOCATION]',
'[INTERCEPT_DEPLOYMENT_GROUP]'
);
delete_intercept_deployment_group_sample($formattedName);
}
deleteInterceptEndpointGroup
Deletes an endpoint group.
See https://google.aip.dev/135.
The async variant is InterceptClient::deleteInterceptEndpointGroupAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\DeleteInterceptEndpointGroupRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\DeleteInterceptEndpointGroupRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The endpoint group to delete. Please see
* {@see InterceptClient::interceptEndpointGroupName()} for help formatting this field.
*/
function delete_intercept_endpoint_group_sample(string $formattedName): void
{
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$request = (new DeleteInterceptEndpointGroupRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $interceptClient->deleteInterceptEndpointGroup($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 = InterceptClient::interceptEndpointGroupName(
'[PROJECT]',
'[LOCATION]',
'[INTERCEPT_ENDPOINT_GROUP]'
);
delete_intercept_endpoint_group_sample($formattedName);
}
deleteInterceptEndpointGroupAssociation
Deletes an association.
See https://google.aip.dev/135.
The async variant is InterceptClient::deleteInterceptEndpointGroupAssociationAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\DeleteInterceptEndpointGroupAssociationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\DeleteInterceptEndpointGroupAssociationRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The association to delete. Please see
* {@see InterceptClient::interceptEndpointGroupAssociationName()} for help formatting this field.
*/
function delete_intercept_endpoint_group_association_sample(string $formattedName): void
{
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$request = (new DeleteInterceptEndpointGroupAssociationRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $interceptClient->deleteInterceptEndpointGroupAssociation($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 = InterceptClient::interceptEndpointGroupAssociationName(
'[PROJECT]',
'[LOCATION]',
'[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]'
);
delete_intercept_endpoint_group_association_sample($formattedName);
}
getInterceptDeployment
Gets a specific deployment.
See https://google.aip.dev/131.
The async variant is InterceptClient::getInterceptDeploymentAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\GetInterceptDeploymentRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\InterceptDeployment |
|
use Google\ApiCore\ApiException;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\GetInterceptDeploymentRequest;
use Google\Cloud\NetworkSecurity\V1\InterceptDeployment;
/**
* @param string $formattedName The name of the deployment to retrieve.
* Format:
* projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment}
* Please see {@see InterceptClient::interceptDeploymentName()} for help formatting this field.
*/
function get_intercept_deployment_sample(string $formattedName): void
{
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$request = (new GetInterceptDeploymentRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var InterceptDeployment $response */
$response = $interceptClient->getInterceptDeployment($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 = InterceptClient::interceptDeploymentName(
'[PROJECT]',
'[LOCATION]',
'[INTERCEPT_DEPLOYMENT]'
);
get_intercept_deployment_sample($formattedName);
}
getInterceptDeploymentGroup
Gets a specific deployment group.
See https://google.aip.dev/131.
The async variant is InterceptClient::getInterceptDeploymentGroupAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\GetInterceptDeploymentGroupRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\InterceptDeploymentGroup |
|
use Google\ApiCore\ApiException;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\GetInterceptDeploymentGroupRequest;
use Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup;
/**
* @param string $formattedName The name of the deployment group to retrieve.
* Format:
* projects/{project}/locations/{location}/interceptDeploymentGroups/{intercept_deployment_group}
* Please see {@see InterceptClient::interceptDeploymentGroupName()} for help formatting this field.
*/
function get_intercept_deployment_group_sample(string $formattedName): void
{
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$request = (new GetInterceptDeploymentGroupRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var InterceptDeploymentGroup $response */
$response = $interceptClient->getInterceptDeploymentGroup($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 = InterceptClient::interceptDeploymentGroupName(
'[PROJECT]',
'[LOCATION]',
'[INTERCEPT_DEPLOYMENT_GROUP]'
);
get_intercept_deployment_group_sample($formattedName);
}
getInterceptEndpointGroup
Gets a specific endpoint group.
See https://google.aip.dev/131.
The async variant is InterceptClient::getInterceptEndpointGroupAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\GetInterceptEndpointGroupRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\InterceptEndpointGroup |
|
use Google\ApiCore\ApiException;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\GetInterceptEndpointGroupRequest;
use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup;
/**
* @param string $formattedName The name of the endpoint group to retrieve.
* Format:
* projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group}
* Please see {@see InterceptClient::interceptEndpointGroupName()} for help formatting this field.
*/
function get_intercept_endpoint_group_sample(string $formattedName): void
{
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$request = (new GetInterceptEndpointGroupRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var InterceptEndpointGroup $response */
$response = $interceptClient->getInterceptEndpointGroup($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 = InterceptClient::interceptEndpointGroupName(
'[PROJECT]',
'[LOCATION]',
'[INTERCEPT_ENDPOINT_GROUP]'
);
get_intercept_endpoint_group_sample($formattedName);
}
getInterceptEndpointGroupAssociation
Gets a specific association.
See https://google.aip.dev/131.
The async variant is InterceptClient::getInterceptEndpointGroupAssociationAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\GetInterceptEndpointGroupAssociationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\InterceptEndpointGroupAssociation |
|
use Google\ApiCore\ApiException;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\GetInterceptEndpointGroupAssociationRequest;
use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation;
/**
* @param string $formattedName The name of the association to retrieve.
* Format:
* projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{intercept_endpoint_group_association}
* Please see {@see InterceptClient::interceptEndpointGroupAssociationName()} for help formatting this field.
*/
function get_intercept_endpoint_group_association_sample(string $formattedName): void
{
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$request = (new GetInterceptEndpointGroupAssociationRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var InterceptEndpointGroupAssociation $response */
$response = $interceptClient->getInterceptEndpointGroupAssociation($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 = InterceptClient::interceptEndpointGroupAssociationName(
'[PROJECT]',
'[LOCATION]',
'[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]'
);
get_intercept_endpoint_group_association_sample($formattedName);
}
listInterceptDeploymentGroups
Lists deployment groups in a given project and location.
See https://google.aip.dev/132.
The async variant is InterceptClient::listInterceptDeploymentGroupsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\ListInterceptDeploymentGroupsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup;
use Google\Cloud\NetworkSecurity\V1\ListInterceptDeploymentGroupsRequest;
/**
* @param string $formattedParent The parent, which owns this collection of deployment groups.
* Example: `projects/123456789/locations/global`.
* See https://google.aip.dev/132 for more details. Please see
* {@see InterceptClient::locationName()} for help formatting this field.
*/
function list_intercept_deployment_groups_sample(string $formattedParent): void
{
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$request = (new ListInterceptDeploymentGroupsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $interceptClient->listInterceptDeploymentGroups($request);
/** @var InterceptDeploymentGroup $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');
list_intercept_deployment_groups_sample($formattedParent);
}
listInterceptDeployments
Lists deployments in a given project and location.
See https://google.aip.dev/132.
The async variant is InterceptClient::listInterceptDeploymentsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\ListInterceptDeploymentsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\InterceptDeployment;
use Google\Cloud\NetworkSecurity\V1\ListInterceptDeploymentsRequest;
/**
* @param string $formattedParent The parent, which owns this collection of deployments.
* Example: `projects/123456789/locations/us-central1-a`.
* See https://google.aip.dev/132 for more details. Please see
* {@see InterceptClient::locationName()} for help formatting this field.
*/
function list_intercept_deployments_sample(string $formattedParent): void
{
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$request = (new ListInterceptDeploymentsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $interceptClient->listInterceptDeployments($request);
/** @var InterceptDeployment $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');
list_intercept_deployments_sample($formattedParent);
}
listInterceptEndpointGroupAssociations
Lists associations in a given project and location.
See https://google.aip.dev/132.
The async variant is InterceptClient::listInterceptEndpointGroupAssociationsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\ListInterceptEndpointGroupAssociationsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation;
use Google\Cloud\NetworkSecurity\V1\ListInterceptEndpointGroupAssociationsRequest;
/**
* @param string $formattedParent The parent, which owns this collection of associations.
* Example: `projects/123456789/locations/global`.
* See https://google.aip.dev/132 for more details. Please see
* {@see InterceptClient::locationName()} for help formatting this field.
*/
function list_intercept_endpoint_group_associations_sample(string $formattedParent): void
{
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$request = (new ListInterceptEndpointGroupAssociationsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $interceptClient->listInterceptEndpointGroupAssociations($request);
/** @var InterceptEndpointGroupAssociation $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');
list_intercept_endpoint_group_associations_sample($formattedParent);
}
listInterceptEndpointGroups
Lists endpoint groups in a given project and location.
See https://google.aip.dev/132.
The async variant is InterceptClient::listInterceptEndpointGroupsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\ListInterceptEndpointGroupsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup;
use Google\Cloud\NetworkSecurity\V1\ListInterceptEndpointGroupsRequest;
/**
* @param string $formattedParent The parent, which owns this collection of endpoint groups.
* Example: `projects/123456789/locations/global`.
* See https://google.aip.dev/132 for more details. Please see
* {@see InterceptClient::locationName()} for help formatting this field.
*/
function list_intercept_endpoint_groups_sample(string $formattedParent): void
{
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$request = (new ListInterceptEndpointGroupsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $interceptClient->listInterceptEndpointGroups($request);
/** @var InterceptEndpointGroup $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');
list_intercept_endpoint_groups_sample($formattedParent);
}
updateInterceptDeployment
Updates a deployment.
See https://google.aip.dev/134.
The async variant is InterceptClient::updateInterceptDeploymentAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\UpdateInterceptDeploymentRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\InterceptDeployment> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\InterceptDeployment;
use Google\Cloud\NetworkSecurity\V1\UpdateInterceptDeploymentRequest;
use Google\Rpc\Status;
/**
* @param string $formattedInterceptDeploymentForwardingRule Immutable. The regional forwarding rule that fronts the
* interceptors, for example:
* `projects/123456789/regions/us-central1/forwardingRules/my-rule`.
* See https://google.aip.dev/124. Please see
* {@see InterceptClient::forwardingRuleName()} for help formatting this field.
* @param string $formattedInterceptDeploymentInterceptDeploymentGroup Immutable. The deployment group that this deployment is a part
* of, for example:
* `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`.
* See https://google.aip.dev/124. Please see
* {@see InterceptClient::interceptDeploymentGroupName()} for help formatting this field.
*/
function update_intercept_deployment_sample(
string $formattedInterceptDeploymentForwardingRule,
string $formattedInterceptDeploymentInterceptDeploymentGroup
): void {
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$interceptDeployment = (new InterceptDeployment())
->setForwardingRule($formattedInterceptDeploymentForwardingRule)
->setInterceptDeploymentGroup($formattedInterceptDeploymentInterceptDeploymentGroup);
$request = (new UpdateInterceptDeploymentRequest())
->setInterceptDeployment($interceptDeployment);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $interceptClient->updateInterceptDeployment($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var InterceptDeployment $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
{
$formattedInterceptDeploymentForwardingRule = InterceptClient::forwardingRuleName(
'[PROJECT]',
'[FORWARDING_RULE]'
);
$formattedInterceptDeploymentInterceptDeploymentGroup = InterceptClient::interceptDeploymentGroupName(
'[PROJECT]',
'[LOCATION]',
'[INTERCEPT_DEPLOYMENT_GROUP]'
);
update_intercept_deployment_sample(
$formattedInterceptDeploymentForwardingRule,
$formattedInterceptDeploymentInterceptDeploymentGroup
);
}
updateInterceptDeploymentGroup
Updates a deployment group.
See https://google.aip.dev/134.
The async variant is InterceptClient::updateInterceptDeploymentGroupAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\UpdateInterceptDeploymentGroupRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\InterceptDeploymentGroup> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup;
use Google\Cloud\NetworkSecurity\V1\UpdateInterceptDeploymentGroupRequest;
use Google\Rpc\Status;
/**
* @param string $formattedInterceptDeploymentGroupNetwork Immutable. The network that will be used for all child
* deployments, for example: `projects/{project}/global/networks/{network}`.
* See https://google.aip.dev/124. Please see
* {@see InterceptClient::networkName()} for help formatting this field.
*/
function update_intercept_deployment_group_sample(
string $formattedInterceptDeploymentGroupNetwork
): void {
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$interceptDeploymentGroup = (new InterceptDeploymentGroup())
->setNetwork($formattedInterceptDeploymentGroupNetwork);
$request = (new UpdateInterceptDeploymentGroupRequest())
->setInterceptDeploymentGroup($interceptDeploymentGroup);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $interceptClient->updateInterceptDeploymentGroup($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var InterceptDeploymentGroup $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
{
$formattedInterceptDeploymentGroupNetwork = InterceptClient::networkName('[PROJECT]', '[NETWORK]');
update_intercept_deployment_group_sample($formattedInterceptDeploymentGroupNetwork);
}
updateInterceptEndpointGroup
Updates an endpoint group.
See https://google.aip.dev/134.
The async variant is InterceptClient::updateInterceptEndpointGroupAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\UpdateInterceptEndpointGroupRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\InterceptEndpointGroup> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup;
use Google\Cloud\NetworkSecurity\V1\UpdateInterceptEndpointGroupRequest;
use Google\Rpc\Status;
/**
* @param string $formattedInterceptEndpointGroupInterceptDeploymentGroup Immutable. The deployment group that this endpoint group is
* connected to, for example:
* `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`.
* See https://google.aip.dev/124. Please see
* {@see InterceptClient::interceptDeploymentGroupName()} for help formatting this field.
*/
function update_intercept_endpoint_group_sample(
string $formattedInterceptEndpointGroupInterceptDeploymentGroup
): void {
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$interceptEndpointGroup = (new InterceptEndpointGroup())
->setInterceptDeploymentGroup($formattedInterceptEndpointGroupInterceptDeploymentGroup);
$request = (new UpdateInterceptEndpointGroupRequest())
->setInterceptEndpointGroup($interceptEndpointGroup);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $interceptClient->updateInterceptEndpointGroup($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var InterceptEndpointGroup $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
{
$formattedInterceptEndpointGroupInterceptDeploymentGroup = InterceptClient::interceptDeploymentGroupName(
'[PROJECT]',
'[LOCATION]',
'[INTERCEPT_DEPLOYMENT_GROUP]'
);
update_intercept_endpoint_group_sample($formattedInterceptEndpointGroupInterceptDeploymentGroup);
}
updateInterceptEndpointGroupAssociation
Updates an association.
See https://google.aip.dev/134.
The async variant is InterceptClient::updateInterceptEndpointGroupAssociationAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\UpdateInterceptEndpointGroupAssociationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\NetworkSecurity\V1\InterceptEndpointGroupAssociation> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation;
use Google\Cloud\NetworkSecurity\V1\UpdateInterceptEndpointGroupAssociationRequest;
use Google\Rpc\Status;
/**
* @param string $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup Immutable. The endpoint group that this association is connected
* to, for example:
* `projects/123456789/locations/global/interceptEndpointGroups/my-eg`.
* See https://google.aip.dev/124. Please see
* {@see InterceptClient::interceptEndpointGroupName()} for help formatting this field.
* @param string $formattedInterceptEndpointGroupAssociationNetwork Immutable. The VPC network that is associated. for example:
* `projects/123456789/global/networks/my-network`.
* See https://google.aip.dev/124. Please see
* {@see InterceptClient::networkName()} for help formatting this field.
*/
function update_intercept_endpoint_group_association_sample(
string $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup,
string $formattedInterceptEndpointGroupAssociationNetwork
): void {
// Create a client.
$interceptClient = new InterceptClient();
// Prepare the request message.
$interceptEndpointGroupAssociation = (new InterceptEndpointGroupAssociation())
->setInterceptEndpointGroup($formattedInterceptEndpointGroupAssociationInterceptEndpointGroup)
->setNetwork($formattedInterceptEndpointGroupAssociationNetwork);
$request = (new UpdateInterceptEndpointGroupAssociationRequest())
->setInterceptEndpointGroupAssociation($interceptEndpointGroupAssociation);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $interceptClient->updateInterceptEndpointGroupAssociation($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var InterceptEndpointGroupAssociation $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
{
$formattedInterceptEndpointGroupAssociationInterceptEndpointGroup = InterceptClient::interceptEndpointGroupName(
'[PROJECT]',
'[LOCATION]',
'[INTERCEPT_ENDPOINT_GROUP]'
);
$formattedInterceptEndpointGroupAssociationNetwork = InterceptClient::networkName(
'[PROJECT]',
'[NETWORK]'
);
update_intercept_endpoint_group_association_sample(
$formattedInterceptEndpointGroupAssociationInterceptEndpointGroup,
$formattedInterceptEndpointGroupAssociationNetwork
);
}
getLocation
Gets information about a location.
The async variant is InterceptClient::getLocationAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\GetLocationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\Location\GetLocationRequest;
use Google\Cloud\Location\Location;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
/**
* 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.
$interceptClient = new InterceptClient();
// Prepare the request message.
$request = new GetLocationRequest();
// Call the API and handle any network failures.
try {
/** @var Location $response */
$response = $interceptClient->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 InterceptClient::listLocationsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\ListLocationsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\Location\ListLocationsRequest;
use Google\Cloud\Location\Location;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
/**
* 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.
$interceptClient = new InterceptClient();
// Prepare the request message.
$request = new ListLocationsRequest();
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $interceptClient->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 InterceptClient::getIamPolicyAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\GetIamPolicyRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\Iam\V1\GetIamPolicyRequest;
use Google\Cloud\Iam\V1\Policy;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
/**
* @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.
$interceptClient = new InterceptClient();
// Prepare the request message.
$request = (new GetIamPolicyRequest())
->setResource($resource);
// Call the API and handle any network failures.
try {
/** @var Policy $response */
$response = $interceptClient->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 InterceptClient::setIamPolicyAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\SetIamPolicyRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\Iam\V1\Policy;
use Google\Cloud\Iam\V1\SetIamPolicyRequest;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
/**
* @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.
$interceptClient = new InterceptClient();
// 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 = $interceptClient->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 InterceptClient::testIamPermissionsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\TestIamPermissionsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
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\Iam\V1\TestIamPermissionsRequest;
use Google\Cloud\Iam\V1\TestIamPermissionsResponse;
use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
/**
* @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.
$interceptClient = new InterceptClient();
// 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 = $interceptClient->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);
}
createInterceptDeploymentAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\CreateInterceptDeploymentRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
createInterceptDeploymentGroupAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\CreateInterceptDeploymentGroupRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
createInterceptEndpointGroupAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\CreateInterceptEndpointGroupRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
createInterceptEndpointGroupAssociationAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\CreateInterceptEndpointGroupAssociationRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
deleteInterceptDeploymentAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\DeleteInterceptDeploymentRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
deleteInterceptDeploymentGroupAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\DeleteInterceptDeploymentGroupRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
deleteInterceptEndpointGroupAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\DeleteInterceptEndpointGroupRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
deleteInterceptEndpointGroupAssociationAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\DeleteInterceptEndpointGroupAssociationRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
getInterceptDeploymentAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\GetInterceptDeploymentRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\NetworkSecurity\V1\InterceptDeployment> |
|
getInterceptDeploymentGroupAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\GetInterceptDeploymentGroupRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup> |
|
getInterceptEndpointGroupAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\GetInterceptEndpointGroupRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup> |
|
getInterceptEndpointGroupAssociationAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\GetInterceptEndpointGroupAssociationRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation> |
|
listInterceptDeploymentGroupsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\ListInterceptDeploymentGroupsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listInterceptDeploymentsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\ListInterceptDeploymentsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listInterceptEndpointGroupAssociationsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\ListInterceptEndpointGroupAssociationsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listInterceptEndpointGroupsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\ListInterceptEndpointGroupsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
updateInterceptDeploymentAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\UpdateInterceptDeploymentRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
updateInterceptDeploymentGroupAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\UpdateInterceptDeploymentGroupRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
updateInterceptEndpointGroupAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\UpdateInterceptEndpointGroupRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
updateInterceptEndpointGroupAssociationAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\NetworkSecurity\V1\UpdateInterceptEndpointGroupAssociationRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
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\Iam\V1\Policy> |
|
setIamPolicyAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Iam\V1\SetIamPolicyRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Iam\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::forwardingRuleName
Formats a string containing the fully-qualified path to represent a forwarding_rule resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
forwardingRule |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted forwarding_rule resource. |
static::interceptDeploymentName
Formats a string containing the fully-qualified path to represent a intercept_deployment resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
interceptDeployment |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted intercept_deployment resource. |
static::interceptDeploymentGroupName
Formats a string containing the fully-qualified path to represent a intercept_deployment_group resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
interceptDeploymentGroup |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted intercept_deployment_group resource. |
static::interceptEndpointGroupName
Formats a string containing the fully-qualified path to represent a intercept_endpoint_group resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
interceptEndpointGroup |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted intercept_endpoint_group resource. |
static::interceptEndpointGroupAssociationName
Formats a string containing the fully-qualified path to represent a intercept_endpoint_group_association resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
interceptEndpointGroupAssociation |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted intercept_endpoint_group_association 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::networkName
Formats a string containing the fully-qualified path to represent a network resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
network |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted network 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
- forwardingRule: projects/{project}/global/forwardingRules/{forwarding_rule}
- interceptDeployment: projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment}
- interceptDeploymentGroup: projects/{project}/locations/{location}/interceptDeploymentGroups/{intercept_deployment_group}
- interceptEndpointGroup: projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group}
- interceptEndpointGroupAssociation: projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{intercept_endpoint_group_association}
- location: projects/{project}/locations/{location}
- network: projects/{project}/global/networks/{network}
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. |