Skip to content

Commit 232099c

Browse files
fix(parametermanager): update testcases and function arguments
1 parent 6f70d1a commit 232099c

11 files changed

+90
-90
lines changed

parametermanager/regional_samples/createRegionalParam.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@
2323
* @param {string} locationId - The ID of the region where parameter is to be created.
2424
* @param {string} parameterId - The ID of the parameter to create. This ID must be unique within the project location.
2525
*/
26-
async function main(
27-
projectId = 'my-project',
28-
locationId = 'us-central1',
29-
parameterId = 'my-regional-parameter'
30-
) {
26+
async function main(projectId, locationId, parameterId) {
3127
// [START parametermanager_create_regional_param]
3228
/**
3329
* TODO(developer): Uncomment these variables before running the sample.

parametermanager/regional_samples/createRegionalParamVersion.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
* @param {string} payload - The unformatted string payload to be stored in the parameter version.
2727
*/
2828
async function main(
29-
projectId = 'my-project',
30-
locationId = 'us-central1',
31-
parameterId = 'my-parameter',
32-
parameterVersionId = 'v1',
33-
payload = 'This is unstructured data'
29+
projectId,
30+
locationId,
31+
parameterId,
32+
parameterVersionId,
33+
payload
3434
) {
3535
// [START parametermanager_create_regional_param_version]
3636
/**

parametermanager/regional_samples/createRegionalParamVersionWithSecret.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
* @param {string} secretId - The ID of the secret to be referenced.
2727
*/
2828
async function main(
29-
projectId = 'my-project',
30-
locationId = 'us-central1',
31-
parameterId = 'my-parameter',
32-
parameterVersionId = 'v1',
33-
secretId = 'projects/my-project/secrets/application-secret/version/latest'
29+
projectId,
30+
locationId,
31+
parameterId,
32+
parameterVersionId,
33+
secretId
3434
) {
3535
// [START parametermanager_create_regional_param_version_with_secret]
3636
/**

parametermanager/regional_samples/createStructuredRegionalParam.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
'use strict';
1616

17-
const {protos} = require('@google-cloud/parametermanager');
18-
1917
/**
2018
* Creates a parameter in the specified region of the specified project using the Google Cloud Parameter Manager SDK.
2119
* The parameter is created with the specified format type.
@@ -25,12 +23,7 @@ const {protos} = require('@google-cloud/parametermanager');
2523
* @param {string} parameterId - The ID of the parameter to create.
2624
* @param {string} formatType - The format type of the parameter (UNFORMATTED, YAML, JSON).
2725
*/
28-
async function main(
29-
projectId = 'my-project',
30-
locationId = 'us-central1',
31-
parameterId = 'my-json-parameter',
32-
formatType = protos.google.cloud.parametermanager.v1.ParameterFormat.JSON
33-
) {
26+
async function main(projectId, locationId, parameterId, formatType) {
3427
// [START parametermanager_create_structured_regional_param]
3528
/**
3629
* TODO(developer): Uncomment these variables before running the sample.

parametermanager/regional_samples/createStructuredRegionalParamVersion.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
* @param {Object} payload - The JSON data payload to be stored in the parameter version.
2727
*/
2828
async function main(
29-
projectId = 'my-project',
30-
locationId = 'us-central1',
31-
parameterId = 'my-parameter',
32-
parameterVersionId = 'v1',
33-
payload = {username: 'test-user', host: 'localhost'}
29+
projectId,
30+
locationId,
31+
parameterId,
32+
parameterVersionId,
33+
payload
3434
) {
3535
// [START parametermanager_create_structured_regional_param_version]
3636
/**

parametermanager/regional_samples/getRegionalParam.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@
2222
* @param {string} locationId - The ID of the region where parameter is located.
2323
* @param {string} parameterId - The ID of the parameter to retrieve.
2424
*/
25-
async function main(
26-
projectId = 'my-project',
27-
locationId = 'us-central1',
28-
parameterId = 'my-parameter'
29-
) {
25+
async function main(projectId, locationId, parameterId) {
3026
// [START parametermanager_get_regional_param]
3127
/**
3228
* TODO(developer): Uncomment these variables before running the sample.

parametermanager/regional_samples/getRegionalParamVersion.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,7 @@
2323
* @param {string} parameterId - The ID of the parameter for which version details are to be retrieved.
2424
* @param {string} versionId - The version ID of the parameter to retrieve.
2525
*/
26-
async function main(
27-
projectId = 'my-project',
28-
locationId = 'us-central1',
29-
parameterId = 'my-parameter',
30-
versionId = 'v1'
31-
) {
26+
async function main(projectId, locationId, parameterId, versionId) {
3227
// [START parametermanager_get_regional_param_version]
3328
/**
3429
* TODO(developer): Uncomment these variables before running the sample.

parametermanager/regional_samples/listRegionalParamVersions.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@
2222
* @param {string} locationId - The ID of the region where the parameter is located.
2323
* @param {string} parameterId - The parameter ID for which versions are to be listed.
2424
*/
25-
async function main(
26-
projectId = 'my-project',
27-
locationId = 'us-central1',
28-
parameterId = 'my-parameter'
29-
) {
25+
async function main(projectId, locationId, parameterId) {
3026
// [START parametermanager_list_regional_param_versions]
3127
/**
3228
* TODO(developer): Uncomment these variables before running the sample.

parametermanager/regional_samples/listRegionalParams.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* @param {string} projectId - The Google Cloud project ID where the parameters are located.
2222
* @param {string} locationId - The ID of the region where parameters are located.
2323
*/
24-
async function main(projectId = 'my-project', locationId = 'us-central1') {
24+
async function main(projectId, locationId) {
2525
// [START parametermanager_list_regional_params]
2626
/**
2727
* TODO(developer): Uncomment these variables before running the sample.

parametermanager/regional_samples/renderRegionalParamVersion.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,7 @@
2424
* @param {string} parameterId - The ID of the parameter for which version details are to be rendered.
2525
* @param {string} parameterVersionId - The ID of the parameter version to be rendered.
2626
*/
27-
async function main(
28-
projectId = 'my-project',
29-
locationId = 'us-central1',
30-
parameterId = 'my-parameter',
31-
parameterVersionId = 'v1'
32-
) {
27+
async function main(projectId, locationId, parameterId, parameterVersionId) {
3328
// [START parametermanager_render_regional_param_version]
3429
/**
3530
* TODO(developer): Uncomment these variables before running the sample.

0 commit comments

Comments
 (0)