-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new APIs added to reflect updates to the filestore service (#93)
* feat: new APIs added to reflect updates to the filestore service - Add ENTERPRISE Tier - Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot - Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare - Add ConnectMode to NetworkConfig (for Private Service Access support) - New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING) - Add SuspensionReason (for KMS related suspension) - Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled PiperOrigin-RevId: 487492758 Source-Link: googleapis/googleapis@5be5981 Source-Link: googleapis/googleapis-gen@ab0e217 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
97087c6
commit 832c765
Showing
25 changed files
with
15,940 additions
and
2,150 deletions.
There are no files selected for viewing
528 changes: 502 additions & 26 deletions
528
...oogle-cloud-filestore/protos/google/cloud/filestore/v1beta1/cloud_filestore_service.proto
Large diffs are not rendered by default.
Oops, something went wrong.
2,476 changes: 2,152 additions & 324 deletions
2,476
packages/google-cloud-filestore/protos/protos.d.ts
Large diffs are not rendered by default.
Oops, something went wrong.
6,457 changes: 5,442 additions & 1,015 deletions
6,457
packages/google-cloud-filestore/protos/protos.js
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
.../google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.create_share.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// ** This file is automatically generated by gapic-generator-typescript. ** | ||
// ** https://github.com/googleapis/gapic-generator-typescript ** | ||
// ** All changes to this file may be overwritten. ** | ||
|
||
|
||
|
||
'use strict'; | ||
|
||
function main(parent, shareId, share) { | ||
// [START file_v1beta1_generated_CloudFilestoreManager_CreateShare_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 Filestore Instance to create the share for, in the format | ||
* `projects/{project_id}/locations/{location}/instances/{instance_id}` | ||
*/ | ||
// const parent = 'abc123' | ||
/** | ||
* Required. The ID to use for the share. | ||
* The ID must be unique within the specified instance. | ||
* This value must start with a lowercase letter followed by up to 62 | ||
* lowercase letters, numbers, or hyphens, and cannot end with a hyphen. | ||
*/ | ||
// const shareId = 'abc123' | ||
/** | ||
* Required. A share resource | ||
*/ | ||
// const share = {} | ||
|
||
// Imports the Filestore library | ||
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1; | ||
|
||
// Instantiates a client | ||
const filestoreClient = new CloudFilestoreManagerClient(); | ||
|
||
async function callCreateShare() { | ||
// Construct request | ||
const request = { | ||
parent, | ||
shareId, | ||
share, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await filestoreClient.createShare(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
callCreateShare(); | ||
// [END file_v1beta1_generated_CloudFilestoreManager_CreateShare_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
76 changes: 76 additions & 0 deletions
76
...ogle-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.create_snapshot.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// ** This file is automatically generated by gapic-generator-typescript. ** | ||
// ** https://github.com/googleapis/gapic-generator-typescript ** | ||
// ** All changes to this file may be overwritten. ** | ||
|
||
|
||
|
||
'use strict'; | ||
|
||
function main(parent, snapshotId, snapshot) { | ||
// [START file_v1beta1_generated_CloudFilestoreManager_CreateSnapshot_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 Filestore Instance to create the snapshots of, in the format | ||
* `projects/{project_id}/locations/{location}/instances/{instance_id}` | ||
*/ | ||
// const parent = 'abc123' | ||
/** | ||
* Required. The ID to use for the snapshot. | ||
* The ID must be unique within the specified instance. | ||
* This value must start with a lowercase letter followed by up to 62 | ||
* lowercase letters, numbers, or hyphens, and cannot end with a hyphen. | ||
*/ | ||
// const snapshotId = 'abc123' | ||
/** | ||
* Required. A snapshot resource | ||
*/ | ||
// const snapshot = {} | ||
|
||
// Imports the Filestore library | ||
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1; | ||
|
||
// Instantiates a client | ||
const filestoreClient = new CloudFilestoreManagerClient(); | ||
|
||
async function callCreateSnapshot() { | ||
// Construct request | ||
const request = { | ||
parent, | ||
snapshotId, | ||
snapshot, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await filestoreClient.createSnapshot(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
callCreateSnapshot(); | ||
// [END file_v1beta1_generated_CloudFilestoreManager_CreateSnapshot_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
.../google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.delete_share.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// ** This file is automatically generated by gapic-generator-typescript. ** | ||
// ** https://github.com/googleapis/gapic-generator-typescript ** | ||
// ** All changes to this file may be overwritten. ** | ||
|
||
|
||
|
||
'use strict'; | ||
|
||
function main(name) { | ||
// [START file_v1beta1_generated_CloudFilestoreManager_DeleteShare_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 share resource name, in the format | ||
* `projects/{project_id}/locations/{location}/instances/{instance_id}/share/{share_id}` | ||
*/ | ||
// const name = 'abc123' | ||
|
||
// Imports the Filestore library | ||
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1; | ||
|
||
// Instantiates a client | ||
const filestoreClient = new CloudFilestoreManagerClient(); | ||
|
||
async function callDeleteShare() { | ||
// Construct request | ||
const request = { | ||
name, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await filestoreClient.deleteShare(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
callDeleteShare(); | ||
// [END file_v1beta1_generated_CloudFilestoreManager_DeleteShare_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
63 changes: 63 additions & 0 deletions
63
...ogle-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.delete_snapshot.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// ** This file is automatically generated by gapic-generator-typescript. ** | ||
// ** https://github.com/googleapis/gapic-generator-typescript ** | ||
// ** All changes to this file may be overwritten. ** | ||
|
||
|
||
|
||
'use strict'; | ||
|
||
function main(name) { | ||
// [START file_v1beta1_generated_CloudFilestoreManager_DeleteSnapshot_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 snapshot resource name, in the format | ||
* `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}` | ||
*/ | ||
// const name = 'abc123' | ||
|
||
// Imports the Filestore library | ||
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1; | ||
|
||
// Instantiates a client | ||
const filestoreClient = new CloudFilestoreManagerClient(); | ||
|
||
async function callDeleteSnapshot() { | ||
// Construct request | ||
const request = { | ||
name, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await filestoreClient.deleteSnapshot(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
callDeleteSnapshot(); | ||
// [END file_v1beta1_generated_CloudFilestoreManager_DeleteSnapshot_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
62 changes: 62 additions & 0 deletions
62
...ges/google-cloud-filestore/samples/generated/v1beta1/cloud_filestore_manager.get_share.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// ** This file is automatically generated by gapic-generator-typescript. ** | ||
// ** https://github.com/googleapis/gapic-generator-typescript ** | ||
// ** All changes to this file may be overwritten. ** | ||
|
||
|
||
|
||
'use strict'; | ||
|
||
function main(name) { | ||
// [START file_v1beta1_generated_CloudFilestoreManager_GetShare_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 share resource name, in the format | ||
* `projects/{project_id}/locations/{location}/instances/{instance_id}/shares/{share_id}` | ||
*/ | ||
// const name = 'abc123' | ||
|
||
// Imports the Filestore library | ||
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1; | ||
|
||
// Instantiates a client | ||
const filestoreClient = new CloudFilestoreManagerClient(); | ||
|
||
async function callGetShare() { | ||
// Construct request | ||
const request = { | ||
name, | ||
}; | ||
|
||
// Run request | ||
const response = await filestoreClient.getShare(request); | ||
console.log(response); | ||
} | ||
|
||
callGetShare(); | ||
// [END file_v1beta1_generated_CloudFilestoreManager_GetShare_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
Oops, something went wrong.