Skip to content

Commit

Permalink
build: update mismatched quickstart sample tag (#3816)
Browse files Browse the repository at this point in the history
Fixes #3344
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Benjamin E. Coe <[email protected]>
  • Loading branch information
sofisl authored Jan 12, 2023
1 parent 7ac180a commit e24f633
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 52 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-security-publicca/.mocharc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-security-publicca/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
84 changes: 38 additions & 46 deletions packages/google-cloud-security-publicca/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,54 +57,46 @@ npm install @google-cloud/publicca
### Using the client library

```javascript
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource where this external_account_key will be created.
* Format: projects/[project_quickstart].
* At present only the "global" location is supported.
*/
// const parent = 'abc123'
/**
* Required. The external account key to create. This field only exists to future-proof
* the API. At present, all fields in ExternalAccountKey are output only and
* all values are ignored. For the purpose of the
* CreateExternalAccountKeyRequest, set it to a default/empty value.
*/
// const externalAccountKey = {}

// Imports the Publicca library
const {PublicCertificateAuthorityServiceClient} =
require('@google-cloud/publicca').v1beta1;

// Instantiates a client
const publiccaClient = new PublicCertificateAuthorityServiceClient();

async function callCreateExternalAccountKey() {
// Construct request
const request = {
parent,
externalAccountKey,
};

// Run request
const response = await publiccaClient.createExternalAccountKey(request);
console.log(response);
}

callCreateExternalAccountKey();
// [END publicca_v1beta1_generated_PublicCertificateAuthorityService_CreateExternalAccountKey_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource where this external_account_key will be created.
* Format: projects/[project_quickstart].
* At present only the "global" location is supported.
*/
// const parent = 'abc123'
/**
* Required. The external account key to create. This field only exists to future-proof
* the API. At present, all fields in ExternalAccountKey are output only and
* all values are ignored. For the purpose of the
* CreateExternalAccountKeyRequest, set it to a default/empty value.
*/
// const externalAccountKey = {}

// Imports the Publicca library
const {PublicCertificateAuthorityServiceClient} =
require('@google-cloud/publicca').v1beta1;

// Instantiates a client
const publiccaClient = new PublicCertificateAuthorityServiceClient();

async function callCreateExternalAccountKey() {
// Construct request
const request = {
parent,
externalAccountKey,
};

// Run request
const response = await publiccaClient.createExternalAccountKey(request);
console.log(response);
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
callCreateExternalAccountKey();

```

Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-security-publicca/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/google-cloud-security-publicca/protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function main(parent, externalAccountKey) {
}

callCreateExternalAccountKey();
// [END publicca_v1beta1_generated_PublicCertificateAuthorityService_CreateExternalAccountKey_async]
// [END publicca_quickstart]
}

process.on('unhandledRejection', err => {
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-security-publicca/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down

0 comments on commit e24f633

Please sign in to comment.