Class ParameterManagerTemplate
- All Implemented Interfaces:
ParameterManagerOperations
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionParameterManagerTemplate
(com.google.cloud.parametermanager.v1.ParameterManagerClient parameterManagerClient, GcpProjectIdProvider projectIdProvider) ParameterManagerTemplate
(ParameterManagerClientFactory clientFactory, GcpProjectIdProvider projectIdProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoid
createParameter
(String locationId, String parameterId, String versionId, byte[] payload) Creates a new parameter or a new version of existing parameter with the providedpayload
.void
createParameter
(String locationId, String parameterId, String versionId, byte[] payload, com.google.cloud.parametermanager.v1.ParameterFormat format) Creates a new parameter or a new version of existing parameter with the providedpayload
in givenformat
.void
createParameter
(String locationId, String parameterId, String versionId, String payload) Creates a new parameter or a new version of existing parameter with the providedpayload
.void
createParameter
(String projectId, String locationId, String parameterId, String versionId, byte[] payload, com.google.cloud.parametermanager.v1.ParameterFormat format) Creates a new parameter or a new version of existing parameter with the providedpayload
.void
createParameter
(String locationId, String parameterId, String versionId, String payload, com.google.cloud.parametermanager.v1.ParameterFormat format) Creates a new parameter or a new version of existing parameter with the providedpayload
in providedformat
.void
createParameter
(String projectId, String locationId, String parameterId, String versionId, String payload) Creates a new parameter or a new version of existing parameter with the providedpayload
.void
createParameter
(String projectId, String locationId, String parameterId, String versionId, String payload, com.google.cloud.parametermanager.v1.ParameterFormat format) Creates a new parameter or a new version of existing parameter with the providedpayload
.void
deleteParameter
(String locationId, String parameterId) Deletes the specifiedparameterId
under the default-configured project for specifiedlocationId
.void
deleteParameter
(String projectId, String locationId, String parameterId) Deletes the specifiedparameterID
under the specifiedprojectId
for specifiedlocationId
.void
deleteParameterVersion
(String locationId, String parameterId, String versionId) Deletes the specified parameter version under the default-configured project for specifiedlocationId
.void
deleteParameterVersion
(String projectId, String locationId, String parameterId, String versionId) Deletes the specified parameter version under the specifiedprojectId
for specifiedlocationId
.void
disableParameterVersion
(String locationId, String parameterId, String versionId) Disables the specified parameter version under the default-configured project for specifiedlocationId
.void
disableParameterVersion
(String projectId, String locationId, String parameterId, String versionId) Disables the specified parameter version under the specifiedprojectId
for specifiedlocationId
.void
enableParameterVersion
(String locationId, String parameterId, String versionId) Enables the specified parameter version under the default-configured project for specifiedlocationId
.void
enableParameterVersion
(String projectId, String locationId, String parameterId, String versionId) Enables the specified parameter version under the specifiedprojectId
for specifiedlocationId
.byte[]
getParameterBytes
(String parameterIdentifier) Gets the parameter data as a byte array from the specifiedparameterIdentifier
.getParameterString
(String parameterIdentifier) Gets the parameter data as a string from the specifiedparameterIdentifier
.boolean
parameterExists
(String locationId, String parameterId) Checks if the specifiedparameterID
exists in the default-configured project for specifiedlocationId
.boolean
parameterExists
(String projectId, String locationId, String parameterId) Checks if the specifiedparameterID
exists in the specified project for specifiedlocationId
.boolean
parameterVersionExists
(String locationId, String parameterId, String versionId) Checks if the specified parameter version exists in the default-configured project for the specifiedlocationId
.boolean
parameterVersionExists
(String projectId, String locationId, String parameterId, String versionId) Checks if the specified parameter version exists in the specified project for the specifiedlocationId
.byte[]
renderedParameterVersionBytes
(String parameterIdentifier) Gets the rendered parameter data as a byte array from the specifiedparameterIdentifier
.renderedParameterVersionString
(String parameterIdentifier) Gets the rendered parameter data as a string from the specifiedparameterIdentifier
.setAllowDefaultParameterValue
(boolean allowDefaultParameterValue)
-
Field Details
-
GLOBAL_LOCATION
Default value for the location ID.- See Also:
-
-
Constructor Details
-
ParameterManagerTemplate
public ParameterManagerTemplate(com.google.cloud.parametermanager.v1.ParameterManagerClient parameterManagerClient, GcpProjectIdProvider projectIdProvider) -
ParameterManagerTemplate
public ParameterManagerTemplate(ParameterManagerClientFactory clientFactory, GcpProjectIdProvider projectIdProvider)
-
-
Method Details
-
setAllowDefaultParameterValue
-
getProjectId
-
createParameter
public void createParameter(String locationId, String parameterId, String versionId, String payload) Description copied from interface:ParameterManagerOperations
Creates a new parameter or a new version of existing parameter with the providedpayload
.If there is already a parameter saved in ParameterManager with the specified
parameterId
, then it simply creates a new version with given id under the parameter with the specifiedpayload
.- Specified by:
createParameter
in interfaceParameterManagerOperations
- Parameters:
locationId
- the parameter location string.parameterId
- the parameter ID of the parameter to create.versionId
- the version ID of the parameter version to create.payload
- the parameter payload as a string.
-
createParameter
public void createParameter(String projectId, String locationId, String parameterId, String versionId, String payload) Description copied from interface:ParameterManagerOperations
Creates a new parameter or a new version of existing parameter with the providedpayload
.If there is already a parameter saved in ParameterManager with the specified
parameterId
, then it simply creates a new version with given id under the parameter with the specifiedpayload
.- Specified by:
createParameter
in interfaceParameterManagerOperations
- Parameters:
projectId
- unique identifier of your GCP project.locationId
- the parameter location string.parameterId
- the parameter ID of the parameter to create.versionId
- the version ID of the parameter version to create.payload
- the parameter payload as a string.
-
createParameter
public void createParameter(String locationId, String parameterId, String versionId, String payload, com.google.cloud.parametermanager.v1.ParameterFormat format) Description copied from interface:ParameterManagerOperations
Creates a new parameter or a new version of existing parameter with the providedpayload
in providedformat
.If there is already a parameter saved in ParameterManager with the specified
parameterId
, then it simply creates a new version with given id under the parameter with the specifiedpayload
.- Specified by:
createParameter
in interfaceParameterManagerOperations
- Parameters:
locationId
- the parameter location string.parameterId
- the parameter ID of the parameter to create.versionId
- the version ID of the parameter version to create.payload
- the parameter payload as a string.format
- the parameter format (JSON or YAML or UNFORMATTED).
-
createParameter
public void createParameter(String projectId, String locationId, String parameterId, String versionId, String payload, com.google.cloud.parametermanager.v1.ParameterFormat format) Description copied from interface:ParameterManagerOperations
Creates a new parameter or a new version of existing parameter with the providedpayload
.If there is already a parameter saved in ParameterManager with the specified
parameterId
, then it simply creates a new version with given id under the parameter with the specifiedpayload
.- Specified by:
createParameter
in interfaceParameterManagerOperations
- Parameters:
projectId
- unique identifier of your GCP project.locationId
- the parameter location string.parameterId
- the parameter ID of the parameter to create.versionId
- the version ID of the parameter version to create.payload
- the parameter payload as a string.format
- the parameter format (JSON or YAML or UNFORMATTED).
-
createParameter
public void createParameter(String locationId, String parameterId, String versionId, byte[] payload) Description copied from interface:ParameterManagerOperations
Creates a new parameter or a new version of existing parameter with the providedpayload
.If there is already a parameter saved in ParameterManager with the specified
parameterId
, then it simply creates a new version with given id under the parameter with the specifiedpayload
.- Specified by:
createParameter
in interfaceParameterManagerOperations
- Parameters:
locationId
- the parameter location string.parameterId
- the parameter ID of the parameter to create.versionId
- the version ID of the parameter version to create.payload
- the parameter payload as a byte array.
-
createParameter
public void createParameter(String locationId, String parameterId, String versionId, byte[] payload, com.google.cloud.parametermanager.v1.ParameterFormat format) Description copied from interface:ParameterManagerOperations
Creates a new parameter or a new version of existing parameter with the providedpayload
in givenformat
.If there is already a parameter saved in ParameterManager with the specified
parameterId
, then it simply creates a new version with given id under the parameter with the specifiedpayload
.- Specified by:
createParameter
in interfaceParameterManagerOperations
- Parameters:
locationId
- the parameter location string.parameterId
- the parameter ID of the parameter to create.versionId
- the version ID of the parameter version to create.payload
- the parameter payload as a byte array.format
- the parameter format (JSON or YAML or UNFORMATTED).
-
createParameter
public void createParameter(String projectId, String locationId, String parameterId, String versionId, byte[] payload, com.google.cloud.parametermanager.v1.ParameterFormat format) Description copied from interface:ParameterManagerOperations
Creates a new parameter or a new version of existing parameter with the providedpayload
.If there is already a parameter saved in ParameterManager with the specified
parameterId
, then it simply creates a new version with given id under the parameter with the specifiedpayload
.- Specified by:
createParameter
in interfaceParameterManagerOperations
- Parameters:
projectId
- unique identifier of your GCP project.locationId
- the parameter location string.parameterId
- the parameter ID of the parameter to create.versionId
- the version ID of the parameter version to create.payload
- the parameter payload as a byte array.format
- the parameter format (JSON or YAML or UNFORMATTED).
-
enableParameterVersion
Description copied from interface:ParameterManagerOperations
Enables the specified parameter version under the default-configured project for specifiedlocationId
.- Specified by:
enableParameterVersion
in interfaceParameterManagerOperations
- Parameters:
locationId
- the location string where given parameter is present.parameterId
- the parameter ID of the parameter to enable.versionId
- the version ID to be enabled.
-
enableParameterVersion
public void enableParameterVersion(String projectId, String locationId, String parameterId, String versionId) Description copied from interface:ParameterManagerOperations
Enables the specified parameter version under the specifiedprojectId
for specifiedlocationId
.- Specified by:
enableParameterVersion
in interfaceParameterManagerOperations
- Parameters:
projectId
- unique identifier of your GCP project.locationId
- the location string where given parameter is present.parameterId
- the parameter ID of the parameter to enable.versionId
- the version ID to be enabled.
-
disableParameterVersion
Description copied from interface:ParameterManagerOperations
Disables the specified parameter version under the default-configured project for specifiedlocationId
.- Specified by:
disableParameterVersion
in interfaceParameterManagerOperations
- Parameters:
locationId
- the location string where given parameter is present.parameterId
- the parameter ID of the parameter to enable.versionId
- the version ID to be enabled.
-
disableParameterVersion
public void disableParameterVersion(String projectId, String locationId, String parameterId, String versionId) Description copied from interface:ParameterManagerOperations
Disables the specified parameter version under the specifiedprojectId
for specifiedlocationId
.- Specified by:
disableParameterVersion
in interfaceParameterManagerOperations
- Parameters:
projectId
- unique identifier of your GCP project.locationId
- the location string where given parameter is present.parameterId
- the parameter ID of the parameter to enable.versionId
- the version ID to be enabled.
-
deleteParameter
Description copied from interface:ParameterManagerOperations
Deletes the specifiedparameterId
under the default-configured project for specifiedlocationId
.- Specified by:
deleteParameter
in interfaceParameterManagerOperations
- Parameters:
locationId
- the location string where given parameter is present.parameterId
- the parameter ID of the parameter to delete.
-
deleteParameter
Description copied from interface:ParameterManagerOperations
Deletes the specifiedparameterID
under the specifiedprojectId
for specifiedlocationId
.- Specified by:
deleteParameter
in interfaceParameterManagerOperations
- Parameters:
projectId
- unique identifier of your GCP project.locationId
- the location string where given parameter is present.parameterId
- the parameter ID of the parameter to delete.
-
deleteParameterVersion
Description copied from interface:ParameterManagerOperations
Deletes the specified parameter version under the default-configured project for specifiedlocationId
.- Specified by:
deleteParameterVersion
in interfaceParameterManagerOperations
- Parameters:
locationId
- the location string where given parameter is present.parameterId
- the parameter ID of the parameter to delete.versionId
- the version ID to be deleted.
-
deleteParameterVersion
public void deleteParameterVersion(String projectId, String locationId, String parameterId, String versionId) Description copied from interface:ParameterManagerOperations
Deletes the specified parameter version under the specifiedprojectId
for specifiedlocationId
.- Specified by:
deleteParameterVersion
in interfaceParameterManagerOperations
- Parameters:
projectId
- unique identifier of your GCP project.locationId
- the location string where given parameter is present.parameterId
- the parameter ID of the parameter to delete.versionId
- the version ID to be deleted.
-
parameterExists
Description copied from interface:ParameterManagerOperations
Checks if the specifiedparameterID
exists in the default-configured project for specifiedlocationId
.- Specified by:
parameterExists
in interfaceParameterManagerOperations
- Parameters:
locationId
- the location string where given parameter is present.parameterId
- the parameter ID of the parameter to check.- Returns:
- true if the parameter exists in Parameter Manager; false otherwise
-
parameterExists
Description copied from interface:ParameterManagerOperations
Checks if the specifiedparameterID
exists in the specified project for specifiedlocationId
.- Specified by:
parameterExists
in interfaceParameterManagerOperations
- Parameters:
projectId
- unique identifier of your GCP project.locationId
- the location string where given parameter is present.parameterId
- the parameter ID of the parameter to check.- Returns:
- true if the parameter exists in Parameter Manager; false otherwise
-
parameterVersionExists
Description copied from interface:ParameterManagerOperations
Checks if the specified parameter version exists in the default-configured project for the specifiedlocationId
.- Specified by:
parameterVersionExists
in interfaceParameterManagerOperations
- Parameters:
locationId
- the location string where the given parameter version is present.parameterId
- the parameter ID of the parameter to check.versionId
- the version ID of the parameter version to check.- Returns:
- true if the parameter version exists in Parameter Manager; false otherwise
-
parameterVersionExists
public boolean parameterVersionExists(String projectId, String locationId, String parameterId, String versionId) Description copied from interface:ParameterManagerOperations
Checks if the specified parameter version exists in the specified project for the specifiedlocationId
.- Specified by:
parameterVersionExists
in interfaceParameterManagerOperations
- Parameters:
projectId
- unique identifier of your GCP project.locationId
- the location string where the given parameter version is present.parameterId
- the parameter ID of the parameter to check.versionId
- the version ID of the parameter version to check.- Returns:
- true if the parameter version exists in Parameter Manager; false otherwise
-
getParameterString
Description copied from interface:ParameterManagerOperations
Gets the parameter data as a string from the specifiedparameterIdentifier
.The
parameterIdentifier
must be a fully qualified `pm@` protocol string which specifies the parameter (see javadocs ofParameterManagerOperations
for the protocol format).If the parameter ID string is passed in, then this will return the data of the parameter for the default project at the latest version.
- Specified by:
getParameterString
in interfaceParameterManagerOperations
- Parameters:
parameterIdentifier
- a pm@ formatted string specifying the parameter version.- Returns:
- The parameter data as a string
-
getParameterBytes
Description copied from interface:ParameterManagerOperations
Gets the parameter data as a byte array from the specifiedparameterIdentifier
.The
parameterIdentifier
must be a fully qualified `pm@` protocol string which specifies the parameter (see javadocs ofParameterManagerOperations
for the protocol format).If the parameter ID string is passed in, then this will return the data of the parameter for the default project at the latest version.
- Specified by:
getParameterBytes
in interfaceParameterManagerOperations
- Parameters:
parameterIdentifier
- a pm@ formatted string specifying the parameter version.- Returns:
- The parameter data as a byte array
-
renderedParameterVersionString
Description copied from interface:ParameterManagerOperations
Gets the rendered parameter data as a string from the specifiedparameterIdentifier
.The
parameterIdentifier
must be a fully qualified `pm@` protocol string which specifies the parameter (see javadocs ofParameterManagerOperations
for the protocol format).If the parameter ID string is passed in, then this will return the rendered data of the parameter for the default project at the latest version.
- Specified by:
renderedParameterVersionString
in interfaceParameterManagerOperations
- Parameters:
parameterIdentifier
- a pm@ formatted string specifying the parameter version.- Returns:
- The rendered parameter data as a string
-
renderedParameterVersionBytes
Description copied from interface:ParameterManagerOperations
Gets the rendered parameter data as a byte array from the specifiedparameterIdentifier
.The
parameterIdentifier
must be a fully qualified `pm@` protocol string which specifies the parameter (see javadocs ofParameterManagerOperations
for the protocol format).If the parameter ID string is passed in, then this will return the rendered data of the parameter for the default project at the latest version.
- Specified by:
renderedParameterVersionBytes
in interfaceParameterManagerOperations
- Parameters:
parameterIdentifier
- a pm@ formatted string specifying the parameter version.- Returns:
- The rendered parameter data as a byte array
-