class ProjectsLocationsApisVersionsSpecs extends Resource (View source)

The "specs" collection of methods.

Typical usage is:

 $apigeeregistryService = new Google\Service\ApigeeRegistry(...);
 $specs = $apigeeregistryService->projects_locations_apis_versions_specs;

Methods

create(string $parent, ApiSpec $postBody, array $optParams = [])

Creates a specified spec. (specs.create)

delete(string $name, array $optParams = [])

Removes a specified spec, all revisions, and all child resources (e.g., artifacts). (specs.delete)

deleteRevision(string $name, array $optParams = [])

Deletes a revision of a spec. (specs.deleteRevision)

get(string $name, array $optParams = [])

Returns a specified spec. (specs.get)

getContents(string $name, array $optParams = [])

Returns the contents of a specified spec. If specs are stored with GZip compression, the default behavior is to return the spec uncompressed (the mime_type response field indicates the exact format returned).

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

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (specs.getIamPolicy)

listProjectsLocationsApisVersionsSpecs(string $parent, array $optParams = [])

Returns matching specs. (specs.listProjectsLocationsApisVersionsSpecs)

listRevisions(string $name, array $optParams = [])

Lists all revisions of a spec. Revisions are returned in descending order of revision creation time. (specs.listRevisions)

patch(string $name, ApiSpec $postBody, array $optParams = [])

Used to modify a specified spec. (specs.patch)

rollback(string $name, RollbackApiSpecRequest $postBody, array $optParams = [])

Sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID. (specs.rollback)

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

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (specs.setIamPolicy)

tagRevision(string $name, TagApiSpecRevisionRequest $postBody, array $optParams = [])

Adds a tag to a specified revision of a spec. (specs.tagRevision)

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

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.

Details

ApiSpec create(string $parent, ApiSpec $postBody, array $optParams = [])

Creates a specified spec. (specs.create)

Parameters

string $parent

Required. The parent, which owns this collection of specs. Format: projects/locations/apis/versions

ApiSpec $postBody
array $optParams

Optional parameters.

Return Value

ApiSpec

Exceptions

Exception

ApigeeregistryEmpty delete(string $name, array $optParams = [])

Removes a specified spec, all revisions, and all child resources (e.g., artifacts). (specs.delete)

Parameters

string $name

Required. The name of the spec to delete. Format: projects/locations/apis/versions/specs

array $optParams

Optional parameters.

Return Value

ApigeeregistryEmpty

Exceptions

Exception

ApiSpec deleteRevision(string $name, array $optParams = [])

Deletes a revision of a spec. (specs.deleteRevision)

Parameters

string $name

Required. The name of the spec revision to be deleted, with a revision ID explicitly included. Example: projects/sample/locations/g lobal/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8

array $optParams

Optional parameters.

Return Value

ApiSpec

Exceptions

Exception

ApiSpec get(string $name, array $optParams = [])

Returns a specified spec. (specs.get)

Parameters

string $name

Required. The name of the spec to retrieve. Format: projects/locations/apis/versions/specs

array $optParams

Optional parameters.

Return Value

ApiSpec

Exceptions

Exception

HttpBody getContents(string $name, array $optParams = [])

Returns the contents of a specified spec. If specs are stored with GZip compression, the default behavior is to return the spec uncompressed (the mime_type response field indicates the exact format returned).

(specs.getContents)

Parameters

string $name

Required. The name of the spec whose contents should be retrieved. Format: projects/locations/apis/versions/specs

array $optParams

Optional parameters.

Return Value

HttpBody

Exceptions

Exception

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

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (specs.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

ListApiSpecsResponse listProjectsLocationsApisVersionsSpecs(string $parent, array $optParams = [])

Returns matching specs. (specs.listProjectsLocationsApisVersionsSpecs)

Parameters

string $parent

Required. The parent, which owns this collection of specs. Format: projects/locations/apis/versions

array $optParams

Optional parameters.

Return Value

ListApiSpecsResponse

Exceptions

Exception

ListApiSpecRevisionsResponse listRevisions(string $name, array $optParams = [])

Lists all revisions of a spec. Revisions are returned in descending order of revision creation time. (specs.listRevisions)

Parameters

string $name

Required. The name of the spec to list revisions for.

array $optParams

Optional parameters.

Return Value

ListApiSpecRevisionsResponse

Exceptions

Exception

ApiSpec patch(string $name, ApiSpec $postBody, array $optParams = [])

Used to modify a specified spec. (specs.patch)

Parameters

string $name

Resource name.

ApiSpec $postBody
array $optParams

Optional parameters.

Return Value

ApiSpec

Exceptions

Exception

ApiSpec rollback(string $name, RollbackApiSpecRequest $postBody, array $optParams = [])

Sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID. (specs.rollback)

Parameters

string $name

Required. The spec being rolled back.

RollbackApiSpecRequest $postBody
array $optParams

Optional parameters.

Return Value

ApiSpec

Exceptions

Exception

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

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (specs.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

ApiSpec tagRevision(string $name, TagApiSpecRevisionRequest $postBody, array $optParams = [])

Adds a tag to a specified revision of a spec. (specs.tagRevision)

Parameters

string $name

Required. The name of the spec to be tagged, including the revision ID is optional. If a revision is not specified, it will tag the latest revision.

TagApiSpecRevisionRequest $postBody
array $optParams

Optional parameters.

Return Value

ApiSpec

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

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. (specs.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception