0.0.20240507 • Published 1 day ago

@maxim_mazurok/gapi.client.servicenetworking-v1 v0.0.20240507

Weekly downloads
-
License
MIT
Repository
github
Last release
1 day ago

TypeScript typings for Service Networking API v1

Provides automatic management of network configurations necessary for certain services. For detailed description please check documentation.

Installing

Install typings for Service Networking API:

npm install @types/gapi.client.servicenetworking-v1 --save-dev

Usage

You need to initialize Google API client in your code:

gapi.load('client', () => {
  // now we can use gapi.client
  // ...
});

Then load api client wrapper:

gapi.client.load(
  'https://servicenetworking.googleapis.com/$discovery/rest?version=v1',
  () => {
    // now we can use:
    // gapi.client.servicenetworking
  }
);
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
gapi.client.load('servicenetworking', 'v1', () => {
  // now we can use:
  // gapi.client.servicenetworking
});

Don't forget to authenticate your client before sending any request to resources:

// declare client_id registered in Google Developers Console
var client_id = '',
  scope = [
    // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
    'https://www.googleapis.com/auth/cloud-platform',

    // Manage your Google API service configuration
    'https://www.googleapis.com/auth/service.management',
  ],
  immediate = true;
// ...

gapi.auth.authorize(
  {client_id: client_id, scope: scope, immediate: immediate},
  authResult => {
    if (authResult && !authResult.error) {
      /* handle successful authorization */
    } else {
      /* handle authorization error */
    }
  }
);

After that you can use Service Networking API resources:

/*
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
*/
await gapi.client.servicenetworking.operations.cancel({name: 'name'});

/*
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
*/
await gapi.client.servicenetworking.operations.delete({name: 'name'});

/*
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
*/
await gapi.client.servicenetworking.operations.get({name: 'name'});

/*
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
*/
await gapi.client.servicenetworking.operations.list({name: 'name'});

/*
For service producers, provisions a new subnet in a peered service's shared VPC network in the requested region and with the requested size that's expressed as a CIDR range (number of leading bits of ipV4 network mask). The method checks against the assigned allocated ranges to find a non-conflicting IP address range. The method will reuse a subnet if subsequent calls contain the same subnet name, region, and prefix length. This method will make producer's tenant project to be a shared VPC service project as needed.
*/
await gapi.client.servicenetworking.services.addSubnetwork({parent: 'parent'});

/*
Disables VPC service controls for a connection.
*/
await gapi.client.servicenetworking.services.disableVpcServiceControls({
  parent: 'parent',
});

/*
Enables VPC service controls for a connection.
*/
await gapi.client.servicenetworking.services.enableVpcServiceControls({
  parent: 'parent',
});

/*
Service producers can use this method to find a currently unused range within consumer allocated ranges. This returned range is not reserved, and not guaranteed to remain unused. It will validate previously provided allocated ranges, find non-conflicting sub-range of requested size (expressed in number of leading bits of ipv4 network mask, as in CIDR range notation).
*/
await gapi.client.servicenetworking.services.searchRange({parent: 'parent'});

/*
Service producers use this method to validate if the consumer provided network, project and requested range are valid. This allows them to use a fail-fast mechanism for consumer requests, and not have to wait for AddSubnetwork operation completion to determine if user request is invalid.
*/
await gapi.client.servicenetworking.services.validate({parent: 'parent'});
0.0.20240507

1 day ago

0.0.20240505

3 days ago

0.0.20240501

6 days ago

0.0.20240430

9 days ago

0.0.20240428

10 days ago

0.0.20240424

14 days ago

0.0.20240423

15 days ago

0.0.20240422

16 days ago

0.0.20240421

17 days ago

0.0.20240417

21 days ago

0.0.20240414

24 days ago

0.0.20240409

27 days ago

0.0.20240407

1 month ago

0.0.20240403

1 month ago

0.0.20240401

1 month ago

0.0.20240402

1 month ago

0.0.20240331

1 month ago

0.0.20240328

1 month ago

0.0.20240320

2 months ago

0.0.20240319

2 months ago

0.0.20240318

2 months ago

0.0.20240317

2 months ago

0.0.20240306

2 months ago

0.0.20240305

2 months ago

0.0.20240304

2 months ago

0.0.20240303

2 months ago

0.0.20240226

2 months ago

0.0.20240227

2 months ago

0.0.20240221

3 months ago

0.0.20240220

3 months ago

0.0.20240218

3 months ago

0.0.20240215

3 months ago

0.0.20240213

3 months ago

0.0.20240211

3 months ago

0.0.20240207

3 months ago

0.0.20240206

3 months ago

0.0.20240205

3 months ago

0.0.20240204

3 months ago

0.0.20240131

3 months ago

0.0.20240129

3 months ago

0.0.20240128

3 months ago

0.0.20240123

3 months ago

0.0.20240120

4 months ago

0.0.20240116

4 months ago

0.0.20240115

4 months ago

0.0.20240114

4 months ago

0.0.20240110

4 months ago

0.0.20240109

4 months ago

0.0.20240107

4 months ago

0.0.20240102

4 months ago

0.0.20231220

4 months ago

0.0.20240101

4 months ago

0.0.20231214

5 months ago

0.0.20231212

5 months ago

0.0.20231211

5 months ago

0.0.20231210

5 months ago

0.0.20231205

5 months ago

0.0.20231204

5 months ago

0.0.20231203

5 months ago

0.0.20231128

5 months ago

0.0.20230816

9 months ago

0.0.20230817

9 months ago

0.0.20231106

6 months ago

0.0.20231105

6 months ago

0.0.20231108

6 months ago

0.0.20231113

6 months ago

0.0.20231112

6 months ago

0.0.20231115

6 months ago

0.0.20231114

6 months ago

0.0.20230807

9 months ago

0.0.20230926

8 months ago

0.0.20230806

9 months ago

0.0.20230809

9 months ago

0.0.20230803

9 months ago

0.0.20230925

8 months ago

0.0.20230804

9 months ago

0.0.20230801

9 months ago

0.0.20230923

8 months ago

0.0.20230802

9 months ago

0.0.20231101

6 months ago

0.0.20230719

10 months ago

0.0.20230717

10 months ago

0.0.20230718

10 months ago

0.0.20230711

10 months ago

0.0.20230712

10 months ago

0.0.20230710

10 months ago

0.0.20230716

10 months ago

0.0.20231015

6 months ago

0.0.20230708

10 months ago

0.0.20231119

6 months ago

0.0.20230820

9 months ago

0.0.20230704

10 months ago

0.0.20230705

10 months ago

0.0.20230823

9 months ago

0.0.20230702

10 months ago

0.0.20230703

10 months ago

0.0.20231001

7 months ago

0.0.20231003

7 months ago

0.0.20231002

7 months ago

0.0.20231004

7 months ago

0.0.20231029

6 months ago

0.0.20231031

6 months ago

0.0.20230723

10 months ago

0.0.20230726

10 months ago

0.0.20230724

10 months ago

0.0.20230725

10 months ago

0.0.20230917

8 months ago

0.0.20230918

8 months ago

0.0.20230910

8 months ago

0.0.20230913

8 months ago

0.0.20230912

8 months ago

0.0.20230906

8 months ago

0.0.20230905

8 months ago

0.0.20230627

11 months ago

0.0.20230903

8 months ago

0.0.20230628

11 months ago

0.0.20230625

11 months ago

0.0.20230626

11 months ago

0.0.20230528

12 months ago

0.0.20230531

11 months ago

0.0.20230530

11 months ago

0.0.20230429

1 year ago

0.0.20230618

11 months ago

0.0.20230619

11 months ago

0.0.20230612

11 months ago

0.0.20230613

11 months ago

0.0.20230611

11 months ago

0.0.20230614

11 months ago

0.0.20230620

11 months ago

0.0.20230607

11 months ago

0.0.20230603

11 months ago

0.0.20230514

12 months ago

0.0.20230515

12 months ago

0.0.20230516

12 months ago

0.0.20230508

1 year ago

0.0.20230509

1 year ago

0.0.20230502

1 year ago

0.0.20230503

1 year ago

0.0.20230621

11 months ago

0.0.20230501

1 year ago

0.0.20230507

1 year ago

0.0.20230510

12 months ago

0.0.20230419

1 year ago

0.0.20230301

1 year ago

0.0.20230409

1 year ago

0.0.20230402

1 year ago

0.0.20230405

1 year ago

0.0.20230410

1 year ago

0.0.20230315

1 year ago

0.0.20230323

1 year ago

0.0.20230321

1 year ago

0.0.20230304

1 year ago

0.0.20230426

1 year ago

0.0.20230308

1 year ago

0.0.20230309

1 year ago

0.0.20230312

1 year ago

0.0.20230328

1 year ago

0.0.20230329

1 year ago

0.0.20230226

1 year ago

0.0.20230216

1 year ago

0.0.20230214

1 year ago

0.0.20230215

1 year ago

0.0.20230219

1 year ago

0.0.20230220

1 year ago

0.0.20230221

1 year ago

0.0.20230206

1 year ago

0.0.20230209

1 year ago

0.0.20230208

1 year ago

0.0.20230212

1 year ago

0.0.20230125

1 year ago

0.0.20221115

1 year ago

0.0.20221114

1 year ago

0.0.20221112

1 year ago

0.0.20230102

1 year ago

0.0.20221109

1 year ago

0.0.20230103

1 year ago

0.0.20221108

1 year ago

0.0.20221107

2 years ago

0.0.20221106

2 years ago

0.0.20221221

1 year ago

0.0.20221220

1 year ago

0.0.20221218

1 year ago

0.0.20230117

1 year ago

0.0.20230118

1 year ago

0.0.20221214

1 year ago

0.0.20230115

1 year ago

0.0.20230116

1 year ago

0.0.20221212

1 year ago

0.0.20221210

1 year ago

0.0.20230124

1 year ago

0.0.20221207

1 year ago

0.0.20230122

1 year ago

0.0.20230123

1 year ago

0.0.20230104

1 year ago

0.0.20230105

1 year ago

0.0.20230108

1 year ago

0.0.20230109

1 year ago

0.0.20230110

1 year ago

0.0.20230111

1 year ago

0.0.20221031

2 years ago

0.0.20221017

2 years ago

0.0.20221013

2 years ago

0.0.20221011

2 years ago

0.0.20221009

2 years ago

0.0.20221029

2 years ago

0.0.20221006

2 years ago

0.0.20221005

2 years ago

0.0.20221026

2 years ago

0.0.20221004

2 years ago

0.0.20221102

2 years ago

0.0.20221025

2 years ago

0.0.20221101

2 years ago

0.0.20221024

2 years ago

0.0.20221023

2 years ago

0.0.20221001

2 years ago

0.0.20220927

2 years ago

0.0.20220928

2 years ago

0.0.20220929

2 years ago

0.0.20221018

2 years ago

0.0.20220916

2 years ago

0.0.20220906

2 years ago

0.0.20220829

2 years ago

0.0.20220819

2 years ago

0.0.20220919

2 years ago

0.0.20220831

2 years ago

0.0.20220920

2 years ago

0.0.20220921

2 years ago

0.0.20220910

2 years ago

0.0.20220822

2 years ago

0.0.20220823

2 years ago

0.0.20220912

2 years ago

0.0.20220824

2 years ago

0.0.20220913

2 years ago

0.0.20220914

2 years ago

0.0.20220826

2 years ago

0.0.20220926

2 years ago

0.0.20220904

2 years ago

0.0.20220817

2 years ago

0.0.20220816

2 years ago

0.0.20220812

2 years ago

0.0.20220809

2 years ago