Interface ParameterManagerOperations
- All Known Implementing Classes:
ParameterManagerTemplate
For some methods you may specify the parameter from GCP Parameter Manager by URI string. The following parameter URI syntax is supported:
1. Long form - specify the project ID, location ID, parameter ID, and version ID pm@projects/{project-id}/locations/{location-id}/parameters/{parameter-id}/versions/{version-id}
2. Long form - specify location ID, parameter ID, and version ID pm@locations/{location-id}/parameters/{parameter-id}/versions/{version-id}
3. Short form - specify project ID, location ID, parameter ID, and version ID pm@{project-id}/{location-id}/{parameter-id}/{version-id}
4. Shortest form - specify locationID, parameter ID and version ID, use default GCP project configured pm@{location-id}/{parameter-id}/{version-id}
-
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.
-
Method Details
-
createParameter
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.- 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
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.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.- 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
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 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.- 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
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.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.- 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
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.- 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
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 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.- 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
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.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.- 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
Enables the specified parameter version under the default-configured project for specifiedlocationId.- 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
void enableParameterVersion(String projectId, String locationId, String parameterId, String versionId) Enables the specified parameter version under the specifiedprojectIdfor specifiedlocationId.- 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
Disables the specified parameter version under the default-configured project for specifiedlocationId.- 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
void disableParameterVersion(String projectId, String locationId, String parameterId, String versionId) Disables the specified parameter version under the specifiedprojectIdfor specifiedlocationId.- 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
Deletes the specifiedparameterIdunder the default-configured project for specifiedlocationId.- Parameters:
parameterId- the parameter ID of the parameter to delete.locationId- the location string where given parameter is present.
-
deleteParameter
Deletes the specifiedparameterIDunder the specifiedprojectIdfor specifiedlocationId.- 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
Deletes the specified parameter version under the default-configured project for specifiedlocationId.- 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
void deleteParameterVersion(String projectId, String locationId, String parameterId, String versionId) Deletes the specified parameter version under the specifiedprojectIdfor specifiedlocationId.- 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
Checks if the specifiedparameterIDexists in the default-configured project for specifiedlocationId.- 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
Checks if the specifiedparameterIDexists in the specified project for specifiedlocationId.- 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
Checks if the specified parameter version exists in the default-configured project for the specifiedlocationId.- 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
boolean parameterVersionExists(String projectId, String locationId, String parameterId, String versionId) Checks if the specified parameter version exists in the specified project for the specifiedlocationId.- 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
Gets 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.
- Parameters:
parameterIdentifier- a pm@ formatted string specifying the parameter version.- Returns:
- The parameter data as a string
-
getParameterBytes
Gets 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.
- Parameters:
parameterIdentifier- a pm@ formatted string specifying the parameter version.- Returns:
- The parameter data as a byte array
-
renderedParameterVersionString
Gets 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.
- Parameters:
parameterIdentifier- a pm@ formatted string specifying the parameter version.- Returns:
- The rendered parameter data as a string
-
renderedParameterVersionBytes
Gets 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.
- Parameters:
parameterIdentifier- a pm@ formatted string specifying the parameter version.- Returns:
- The rendered parameter data as a byte array
-