class MachineImages extends Resource (View source)

The "machineImages" collection of methods.

Typical usage is:

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

Methods

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

Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone. (machineImages.delete)

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

Returns the specified machine image. (machineImages.get)

getIamPolicy(string $project, string $resource, array $optParams = [])

Gets the access control policy for a resource. May be empty if no such policy or resource exists. (machineImages.getIamPolicy)

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

Creates a machine image in the specified project using the data that is included in the request. If you are creating a new machine image to update an existing instance, your new machine image should use the same network or, if applicable, the same subnetwork as the original instance.

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

Retrieves a list of machine images that are contained within the specified project. (machineImages.listMachineImages)

setIamPolicy(string $project, string $resource, GlobalSetPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. (machineImages.setIamPolicy)

testIamPermissions(string $project, string $resource, TestPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource.

Details

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

Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone. (machineImages.delete)

Parameters

string $project

Project ID for this request.

string $machineImage

The name of the machine image to delete.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

MachineImage get(string $project, string $machineImage, array $optParams = [])

Returns the specified machine image. (machineImages.get)

Parameters

string $project

Project ID for this request.

string $machineImage

The name of the machine image.

array $optParams

Optional parameters.

Return Value

MachineImage

Exceptions

Exception

Policy getIamPolicy(string $project, string $resource, array $optParams = [])

Gets the access control policy for a resource. May be empty if no such policy or resource exists. (machineImages.getIamPolicy)

Parameters

string $project

Project ID for this request.

string $resource

Name or id of the resource for this request.

array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

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

Creates a machine image in the specified project using the data that is included in the request. If you are creating a new machine image to update an existing instance, your new machine image should use the same network or, if applicable, the same subnetwork as the original instance.

(machineImages.insert)

Parameters

string $project

Project ID for this request.

MachineImage $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

MachineImageList listMachineImages(string $project, array $optParams = [])

Retrieves a list of machine images that are contained within the specified project. (machineImages.listMachineImages)

Parameters

string $project

Project ID for this request.

array $optParams

Optional parameters.

Return Value

MachineImageList

Exceptions

Exception

Policy setIamPolicy(string $project, string $resource, GlobalSetPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. (machineImages.setIamPolicy)

Parameters

string $project

Project ID for this request.

string $resource

Name or id of the resource for this request.

GlobalSetPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

TestPermissionsResponse testIamPermissions(string $project, string $resource, TestPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource.

(machineImages.testIamPermissions)

Parameters

string $project

Project ID for this request.

string $resource

Name or id of the resource for this request.

TestPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestPermissionsResponse

Exceptions

Exception