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 TypeMethodDescriptionvoidcreateParameter(String locationId, String parameterId, String versionId, byte[] payload) Creates a new parameter or a new version of existing parameter with the providedpayload.voidcreateParameter(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 providedpayloadin givenformat.voidcreateParameter(String locationId, String parameterId, String versionId, String payload) Creates a new parameter or a new version of existing parameter with the providedpayload.voidcreateParameter(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.voidcreateParameter(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 providedpayloadin providedformat.voidcreateParameter(String projectId, String locationId, String parameterId, String versionId, String payload) Creates a new parameter or a new version of existing parameter with the providedpayload.voidcreateParameter(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.voiddeleteParameter(String locationId, String parameterId) Deletes the specifiedparameterIdunder the default-configured project for specifiedlocationId.voiddeleteParameter(String projectId, String locationId, String parameterId) Deletes the specifiedparameterIDunder the specifiedprojectIdfor specifiedlocationId.voiddeleteParameterVersion(String locationId, String parameterId, String versionId) Deletes the specified parameter version under the default-configured project for specifiedlocationId.voiddeleteParameterVersion(String projectId, String locationId, String parameterId, String versionId) Deletes the specified parameter version under the specifiedprojectIdfor specifiedlocationId.voiddisableParameterVersion(String locationId, String parameterId, String versionId) Disables the specified parameter version under the default-configured project for specifiedlocationId.voiddisableParameterVersion(String projectId, String locationId, String parameterId, String versionId) Disables the specified parameter version under the specifiedprojectIdfor specifiedlocationId.voidenableParameterVersion(String locationId, String parameterId, String versionId) Enables the specified parameter version under the default-configured project for specifiedlocationId.voidenableParameterVersion(String projectId, String locationId, String parameterId, String versionId) Enables the specified parameter version under the specifiedprojectIdfor 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.booleanparameterExists(String locationId, String parameterId) Checks if the specifiedparameterIDexists in the default-configured project for specifiedlocationId.booleanparameterExists(String projectId, String locationId, String parameterId) Checks if the specifiedparameterIDexists in the specified project for specifiedlocationId.booleanparameterVersionExists(String locationId, String parameterId, String versionId) Checks if the specified parameter version exists in the default-configured project for the specifiedlocationId.booleanparameterVersionExists(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:ParameterManagerOperationsCreates 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:
createParameterin 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:ParameterManagerOperationsCreates 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:
createParameterin 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:ParameterManagerOperationsCreates a new parameter or a new version of existing parameter with the providedpayloadin 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:
createParameterin 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:ParameterManagerOperationsCreates 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:
createParameterin 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:ParameterManagerOperationsCreates 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:
createParameterin 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:ParameterManagerOperationsCreates a new parameter or a new version of existing parameter with the providedpayloadin 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:
createParameterin 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:ParameterManagerOperationsCreates 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:
createParameterin 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:ParameterManagerOperationsEnables the specified parameter version under the default-configured project for specifiedlocationId.- Specified by:
enableParameterVersionin 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:ParameterManagerOperationsEnables the specified parameter version under the specifiedprojectIdfor specifiedlocationId.- Specified by:
enableParameterVersionin 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:ParameterManagerOperationsDisables the specified parameter version under the default-configured project for specifiedlocationId.- Specified by:
disableParameterVersionin 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:ParameterManagerOperationsDisables the specified parameter version under the specifiedprojectIdfor specifiedlocationId.- Specified by:
disableParameterVersionin 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:ParameterManagerOperationsDeletes the specifiedparameterIdunder the default-configured project for specifiedlocationId.- Specified by:
deleteParameterin 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:ParameterManagerOperationsDeletes the specifiedparameterIDunder the specifiedprojectIdfor specifiedlocationId.- Specified by:
deleteParameterin 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:ParameterManagerOperationsDeletes the specified parameter version under the default-configured project for specifiedlocationId.- Specified by:
deleteParameterVersionin 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:ParameterManagerOperationsDeletes the specified parameter version under the specifiedprojectIdfor specifiedlocationId.- Specified by:
deleteParameterVersionin 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:ParameterManagerOperationsChecks if the specifiedparameterIDexists in the default-configured project for specifiedlocationId.- Specified by:
parameterExistsin 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:ParameterManagerOperationsChecks if the specifiedparameterIDexists in the specified project for specifiedlocationId.- Specified by:
parameterExistsin 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:ParameterManagerOperationsChecks if the specified parameter version exists in the default-configured project for the specifiedlocationId.- Specified by:
parameterVersionExistsin 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:ParameterManagerOperationsChecks if the specified parameter version exists in the specified project for the specifiedlocationId.- Specified by:
parameterVersionExistsin 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:ParameterManagerOperationsGets the parameter data as a string from the specifiedparameterIdentifier.The
parameterIdentifiermust be a fully qualified `pm@` protocol string which specifies the parameter (see javadocs ofParameterManagerOperationsfor 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:
getParameterStringin interfaceParameterManagerOperations- Parameters:
parameterIdentifier- a pm@ formatted string specifying the parameter version.- Returns:
- The parameter data as a string
-
getParameterBytes
Description copied from interface:ParameterManagerOperationsGets the parameter data as a byte array from the specifiedparameterIdentifier.The
parameterIdentifiermust be a fully qualified `pm@` protocol string which specifies the parameter (see javadocs ofParameterManagerOperationsfor 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:
getParameterBytesin interfaceParameterManagerOperations- Parameters:
parameterIdentifier- a pm@ formatted string specifying the parameter version.- Returns:
- The parameter data as a byte array
-
renderedParameterVersionString
Description copied from interface:ParameterManagerOperationsGets the rendered parameter data as a string from the specifiedparameterIdentifier.The
parameterIdentifiermust be a fully qualified `pm@` protocol string which specifies the parameter (see javadocs ofParameterManagerOperationsfor 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:
renderedParameterVersionStringin interfaceParameterManagerOperations- Parameters:
parameterIdentifier- a pm@ formatted string specifying the parameter version.- Returns:
- The rendered parameter data as a string
-
renderedParameterVersionBytes
Description copied from interface:ParameterManagerOperationsGets the rendered parameter data as a byte array from the specifiedparameterIdentifier.The
parameterIdentifiermust be a fully qualified `pm@` protocol string which specifies the parameter (see javadocs ofParameterManagerOperationsfor 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:
renderedParameterVersionBytesin interfaceParameterManagerOperations- Parameters:
parameterIdentifier- a pm@ formatted string specifying the parameter version.- Returns:
- The rendered parameter data as a byte array
-