class TargetInstances extends Resource (View source)

The "targetInstances" collection of methods.

Typical usage is:

 $computeService = new Google\Service\Compute(...);
 $targetInstances = $computeService->targetInstances;

Methods

aggregatedList(string $project, array $optParams = [])

Retrieves an aggregated list of target instances. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

delete(string $project, string $zone, string $targetInstance, array $optParams = [])

Deletes the specified TargetInstance resource. (targetInstances.delete)

get(string $project, string $zone, string $targetInstance, array $optParams = [])

Returns the specified TargetInstance resource. (targetInstances.get)

insert(string $project, string $zone, TargetInstance $postBody, array $optParams = [])

Creates a TargetInstance resource in the specified project and zone using the data included in the request. (targetInstances.insert)

listTargetInstances(string $project, string $zone, array $optParams = [])

Retrieves a list of TargetInstance resources available to the specified project and zone. (targetInstances.listTargetInstances)

setSecurityPolicy(string $project, string $zone, string $targetInstance, SecurityPolicyReference $postBody, array $optParams = [])

Sets the Google Cloud Armor security policy for the specified target instance. For more information, see Google Cloud Armor Overview (targetInstances.setSecurityPolicy)

Details

TargetInstanceAggregatedList aggregatedList(string $project, array $optParams = [])

Retrieves an aggregated list of target instances. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

(targetInstances.aggregatedList)

Parameters

string $project

Project ID for this request.

array $optParams

Optional parameters.

Return Value

TargetInstanceAggregatedList

Exceptions

Exception

Operation delete(string $project, string $zone, string $targetInstance, array $optParams = [])

Deletes the specified TargetInstance resource. (targetInstances.delete)

Parameters

string $project

Project ID for this request.

string $zone

Name of the zone scoping this request.

string $targetInstance

Name of the TargetInstance resource to delete.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

TargetInstance get(string $project, string $zone, string $targetInstance, array $optParams = [])

Returns the specified TargetInstance resource. (targetInstances.get)

Parameters

string $project

Project ID for this request.

string $zone

Name of the zone scoping this request.

string $targetInstance

Name of the TargetInstance resource to return.

array $optParams

Optional parameters.

Return Value

TargetInstance

Exceptions

Exception

Operation insert(string $project, string $zone, TargetInstance $postBody, array $optParams = [])

Creates a TargetInstance resource in the specified project and zone using the data included in the request. (targetInstances.insert)

Parameters

string $project

Project ID for this request.

string $zone

Name of the zone scoping this request.

TargetInstance $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

TargetInstanceList listTargetInstances(string $project, string $zone, array $optParams = [])

Retrieves a list of TargetInstance resources available to the specified project and zone. (targetInstances.listTargetInstances)

Parameters

string $project

Project ID for this request.

string $zone

Name of the zone scoping this request.

array $optParams

Optional parameters.

Return Value

TargetInstanceList

Exceptions

Exception

Operation setSecurityPolicy(string $project, string $zone, string $targetInstance, SecurityPolicyReference $postBody, array $optParams = [])

Sets the Google Cloud Armor security policy for the specified target instance. For more information, see Google Cloud Armor Overview (targetInstances.setSecurityPolicy)

Parameters

string $project

Project ID for this request.

string $zone

Name of the zone scoping this request.

string $targetInstance

Name of the TargetInstance resource to which the security policy should be set. The name should conform to RFC1035.

SecurityPolicyReference $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception