Skip to main content

aliases

Creates, updates, deletes, gets or lists an aliases resource.

Overview

Namealiases
TypeResource
Idgoogle.apigee.aliases

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
aliasstringResource ID for this alias. Values must match the regular expression [^/]{1,255}.
certsInfoobjectChain of certificates under this alias. (id: GoogleCloudApigeeV1Certificate)
typestringType of alias.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_environments_keystores_aliases_getselectorganizationsId, environmentsId, keystoresId, aliasesIdGets an alias.
organizations_environments_keystores_aliases_createinsertorganizationsId, environmentsId, keystoresIdalias, format, ignoreExpiryValidation, _password, ignoreNewlineValidationCreates an alias from a key/certificate pair. The structure of the request is controlled by the format query parameter: - keycertfile - Separate PEM-encoded key and certificate files are uploaded. Set Content-Type: multipart/form-data and include the keyFile, certFile, and password (if keys are encrypted) fields in the request body. If uploading to a truststore, omit keyFile. - pkcs12 - A PKCS12 file is uploaded. Set Content-Type: multipart/form-data, provide the file in the file field, and include the password field if the file is encrypted in the request body. - selfsignedcert - A new private key and certificate are generated. Set Content-Type: application/json and include CertificateGenerationSpec in the request body.
organizations_environments_keystores_aliases_updatereplaceorganizationsId, environmentsId, keystoresId, aliasesIdignoreExpiryValidation, ignoreNewlineValidationUpdates the certificate in an alias. The updated certificate must be in PEM- or DER-encoded X.509 format.
organizations_environments_keystores_aliases_deletedeleteorganizationsId, environmentsId, keystoresId, aliasesIdDeletes an alias.
organizations_environments_keystores_aliases_csrexecorganizationsId, environmentsId, keystoresId, aliasesIdGenerates a PKCS #10 Certificate Signing Request for the private key in an alias.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
aliasesIdstring
environmentsIdstring
keystoresIdstring
organizationsIdstring
_passwordstring
aliasstring
formatstring
ignoreExpiryValidationboolean
ignoreNewlineValidationboolean

SELECT examples

Gets an alias.

SELECT
alias,
certsInfo,
type
FROM google.apigee.aliases
WHERE organizationsId = '{{ organizationsId }}' -- required
AND environmentsId = '{{ environmentsId }}' -- required
AND keystoresId = '{{ keystoresId }}' -- required
AND aliasesId = '{{ aliasesId }}' -- required;

INSERT examples

Creates an alias from a key/certificate pair. The structure of the request is controlled by the format query parameter: - keycertfile - Separate PEM-encoded key and certificate files are uploaded. Set Content-Type: multipart/form-data and include the keyFile, certFile, and password (if keys are encrypted) fields in the request body. If uploading to a truststore, omit keyFile. - pkcs12 - A PKCS12 file is uploaded. Set Content-Type: multipart/form-data, provide the file in the file field, and include the password field if the file is encrypted in the request body. - selfsignedcert - A new private key and certificate are generated. Set Content-Type: application/json and include CertificateGenerationSpec in the request body.

INSERT INTO google.apigee.aliases (
data__contentType,
data__data,
data__extensions,
organizationsId,
environmentsId,
keystoresId,
alias,
format,
ignoreExpiryValidation,
_password,
ignoreNewlineValidation
)
SELECT
'{{ contentType }}',
'{{ data }}',
'{{ extensions }}',
'{{ organizationsId }}',
'{{ environmentsId }}',
'{{ keystoresId }}',
'{{ alias }}',
'{{ format }}',
'{{ ignoreExpiryValidation }}',
'{{ _password }}',
'{{ ignoreNewlineValidation }}'
RETURNING
alias,
certsInfo,
type
;

REPLACE examples

Updates the certificate in an alias. The updated certificate must be in PEM- or DER-encoded X.509 format.

REPLACE google.apigee.aliases
SET
data__contentType = '{{ contentType }}',
data__data = '{{ data }}',
data__extensions = '{{ extensions }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND keystoresId = '{{ keystoresId }}' --required
AND aliasesId = '{{ aliasesId }}' --required
AND ignoreExpiryValidation = {{ ignoreExpiryValidation}}
AND ignoreNewlineValidation = {{ ignoreNewlineValidation}}
RETURNING
alias,
certsInfo,
type;

DELETE examples

Deletes an alias.

DELETE FROM google.apigee.aliases
WHERE organizationsId = '{{ organizationsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND keystoresId = '{{ keystoresId }}' --required
AND aliasesId = '{{ aliasesId }}' --required;

Lifecycle Methods

Generates a PKCS #10 Certificate Signing Request for the private key in an alias.

EXEC google.apigee.aliases.organizations_environments_keystores_aliases_csr 
@organizationsId='{{ organizationsId }}' --required,
@environmentsId='{{ environmentsId }}' --required,
@keystoresId='{{ keystoresId }}' --required,
@aliasesId='{{ aliasesId }}' --required;