1.0.20220806 • Published 2 years ago

@maxim_mazurok/gapi.client.appengine v1.0.20220806

Weekly downloads
35
License
MIT
Repository
github
Last release
2 years ago

TypeScript typings for App Engine Admin API v1

Provisions and manages developers' App Engine applications. For detailed description please check documentation.

Installing

Install typings for App Engine Admin API:

npm install @types/gapi.client.appengine@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('appengine', 'v1', () => {
  // now we can use gapi.client.appengine
  // ...
});

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 = [ 
      // View and manage your applications deployed on Google App Engine
      'https://www.googleapis.com/auth/appengine.admin',

      // 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',

      // View your data across Google Cloud services and see the email address of your Google Account
      'https://www.googleapis.com/auth/cloud-platform.read-only',
    ],
    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 App Engine Admin API resources:

/*
Creates an App Engine application for a Google Cloud Platform project. Required fields: id - The ID of the target Cloud Platform project. location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/standard/python/console/).
*/
await gapi.client.appengine.apps.create({  });

/*
Gets information about an application.
*/
await gapi.client.appengine.apps.get({ appsId: "appsId",  });

/*
Updates the specified Application resource. You can update the following fields: auth_domain - Google authentication domain for controlling user access to the application. default_cookie_expiration - Cookie expiration policy for the application. iap - Identity-Aware Proxy properties for the application.
*/
await gapi.client.appengine.apps.patch({ appsId: "appsId",  });

/*
Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account. If you have deleted your App Engine service account, this will not be able to recreate it. Instead, you should attempt to use the IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity Log.
*/
await gapi.client.appengine.apps.repair({ appsId: "appsId",  });
1.0.20220612

2 years ago

1.0.20220620

2 years ago

1.0.20220625

2 years ago

1.0.20220718

2 years ago

1.0.20220711

2 years ago

1.0.20220806

2 years ago

1.0.20220729

2 years ago

1.0.20220725

2 years ago

1.0.20220509

2 years ago

1.0.20220502

2 years ago

1.0.20220513

2 years ago

1.0.20220522

2 years ago

1.0.20220604

2 years ago

1.0.20220530

2 years ago

1.0.20220415

2 years ago

1.0.20220425

2 years ago

1.0.20220316

2 years ago

1.0.20220409

2 years ago

1.0.20220326

2 years ago

1.0.20220404

2 years ago

1.0.20220226

2 years ago

1.0.20220307

2 years ago

1.0.20220312

2 years ago

1.0.20220218

2 years ago

1.0.20220105

2 years ago

1.0.20220107

2 years ago

1.0.20220116

2 years ago

1.0.20220122

2 years ago

1.0.20220205

2 years ago

1.0.20220214

2 years ago

1.0.20220131

2 years ago

1.0.20211115

3 years ago

1.0.20211208

2 years ago

1.0.20211106

3 years ago

1.0.20211129

2 years ago

1.0.20211022

3 years ago

1.0.20211029

3 years ago

1.0.20211016

3 years ago

1.0.20211002

3 years ago

1.0.20210927

3 years ago

1.0.20210918

3 years ago

1.0.20210911

3 years ago

1.0.20210827

3 years ago

1.0.20210822

3 years ago

1.0.20210816

3 years ago

1.0.20210731

3 years ago

1.0.20210721

3 years ago

1.0.20210715

3 years ago

1.0.20210712

3 years ago

1.0.20210705

3 years ago

1.0.20210629

3 years ago

1.0.20210618

3 years ago

1.0.20210613

3 years ago

1.0.20210608

3 years ago

1.0.20210528

3 years ago

1.0.20210524

3 years ago

1.0.20210514

3 years ago

1.0.20210508

3 years ago

1.0.20210501

3 years ago

1.0.20210424

3 years ago

1.0.20210417

3 years ago

1.0.20210410

3 years ago

1.0.20210402

3 years ago

1.0.20210324

3 years ago

1.0.20210319

3 years ago

1.0.20210315

3 years ago

1.0.20210308

3 years ago

1.0.20210227

3 years ago

1.0.20210219

3 years ago

1.0.20210129

3 years ago

1.0.20210111

3 years ago

1.0.20201214

3 years ago

1.0.20201201

3 years ago

1.0.20201114

4 years ago

1.0.20201107

4 years ago