class Licenses extends Resource (View source)

The "licenses" collection of methods.

Typical usage is:

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

Methods

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

Deletes the specified license. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

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

Returns the specified License resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. (licenses.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. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

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

Create a License resource in the specified project. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. (licenses.insert)

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

Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.

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

Sets the access control policy on the specified resource. Replaces any existing policy. Caution This resource is intended for use only by third- party partners who are creating Cloud Marketplace images.

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

Returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. (licenses.testIamPermissions)

Details

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

Deletes the specified license. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

(licenses.delete)

Parameters

string $project

Project ID for this request.

string $license

Name of the license resource to delete.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

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

Returns the specified License resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. (licenses.get)

Parameters

string $project

Project ID for this request.

string $license

Name of the License resource to return.

array $optParams

Optional parameters.

Return Value

License

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. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

(licenses.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, License $postBody, array $optParams = [])

Create a License resource in the specified project. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. (licenses.insert)

Parameters

string $project

Project ID for this request.

License $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

LicensesListResponse listLicenses(string $project, array $optParams = [])

Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.

Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. (licenses.listLicenses)

Parameters

string $project

Project ID for this request.

array $optParams

Optional parameters.

Return Value

LicensesListResponse

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. Caution This resource is intended for use only by third- party partners who are creating Cloud Marketplace images.

(licenses.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. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. (licenses.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