How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/managedidentities.googleapis.com
    // - Login into gcloud by running:
    //   `$ gcloud auth application-default login`
    // - Install the npm module by running:
    //   `$ npm install googleapis`
    
    const {google} = require('googleapis');
    const managedidentities = google.managedidentities('v1alpha1');
    
    async function main() {
      const auth = new google.auth.GoogleAuth({
        // Scopes can be specified either as an array or as a single, space-delimited string.
        scopes: ['https://www.googleapis.com/auth/cloud-platform'],
      });
    
      // Acquire an auth client, and bind it to all future calls
      const authClient = await auth.getClient();
      google.options({auth: authClient});
    
      // Do the magic
      const res = await managedidentities.projects.locations.global.domains.delete({
        // Domain resource name using the form: `projects/{project_id\}/locations/global/domains/{domain_name\}`
        name: 'projects/my-project/locations/global/domains/my-domain',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "done": false,
      //   "error": {},
      //   "metadata": {},
      //   "name": "my_name",
      //   "response": {}
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/domains.googleapis.com
    // - Login into gcloud by running:
    //   `$ gcloud auth application-default login`
    // - Install the npm module by running:
    //   `$ npm install googleapis`
    
    const {google} = require('googleapis');
    const domains = google.domains('v1beta1');
    
    async function main() {
      const auth = new google.auth.GoogleAuth({
        // Scopes can be specified either as an array or as a single, space-delimited string.
        scopes: ['https://www.googleapis.com/auth/cloud-platform'],
      });
    
      // Acquire an auth client, and bind it to all future calls
      const authClient = await auth.getClient();
      google.options({auth: authClient});
    
      // Do the magic
      const res = await domains.projects.locations.registrations.get({
        // Required. The name of the `Registration` to get, in the format `projects/x/locations/x/registrations/x`.
        name: 'projects/my-project/locations/my-location/registrations/my-registration',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "contactSettings": {},
      //   "createTime": "my_createTime",
      //   "dnsSettings": {},
      //   "domainName": "my_domainName",
      //   "expireTime": "my_expireTime",
      //   "issues": [],
      //   "labels": {},
      //   "managementSettings": {},
      //   "name": "my_name",
      //   "pendingContactSettings": {},
      //   "state": "my_state",
      //   "supportedPrivacy": []
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/managedidentities.googleapis.com
    // - Login into gcloud by running:
    //   `$ gcloud auth application-default login`
    // - Install the npm module by running:
    //   `$ npm install googleapis`
    
    const {google} = require('googleapis');
    const managedidentities = google.managedidentities('v1alpha1');
    
    async function main() {
      const auth = new google.auth.GoogleAuth({
        // Scopes can be specified either as an array or as a single, space-delimited string.
        scopes: ['https://www.googleapis.com/auth/cloud-platform'],
      });
    
      // Acquire an auth client, and bind it to all future calls
      const authClient = await auth.getClient();
      google.options({auth: authClient});
    
      // Do the magic
      const res =
        await managedidentities.projects.locations.global.domains.detachTrust({
          // The resource domain name, project name, and location using the form: `projects/{project_id\}/locations/global/domains/{domain_name\}`
          name: 'projects/my-project/locations/global/domains/my-domain',
    
          // Request body metadata
          requestBody: {
            // request body parameters
            // {
            //   "trust": {}
            // }
          },
        });
      console.log(res.data);
    
      // Example response
      // {
      //   "done": false,
      //   "error": {},
      //   "metadata": {},
      //   "name": "my_name",
      //   "response": {}
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/domains.googleapis.com
    // - Login into gcloud by running:
    //   `$ gcloud auth application-default login`
    // - Install the npm module by running:
    //   `$ npm install googleapis`
    
    const {google} = require('googleapis');
    const domains = google.domains('v1alpha2');
    
    async function main() {
      const auth = new google.auth.GoogleAuth({
        // Scopes can be specified either as an array or as a single, space-delimited string.
        scopes: ['https://www.googleapis.com/auth/cloud-platform'],
      });
    
      // Acquire an auth client, and bind it to all future calls
      const authClient = await auth.getClient();
      google.options({auth: authClient});
    
      // Do the magic
      const res = await domains.projects.locations.registrations.get({
        // Required. The name of the `Registration` to get, in the format `projects/x/locations/x/registrations/x`.
        name: 'projects/my-project/locations/my-location/registrations/my-registration',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "contactSettings": {},
      //   "createTime": "my_createTime",
      //   "dnsSettings": {},
      //   "domainName": "my_domainName",
      //   "expireTime": "my_expireTime",
      //   "issues": [],
      //   "labels": {},
      //   "managementSettings": {},
      //   "name": "my_name",
      //   "pendingContactSettings": {},
      //   "state": "my_state",
      //   "supportedPrivacy": []
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/managedidentities.googleapis.com
    // - Login into gcloud by running:
    //   `$ gcloud auth application-default login`
    // - Install the npm module by running:
    //   `$ npm install googleapis`
    
    const {google} = require('googleapis');
    const managedidentities = google.managedidentities('v1alpha1');
    
    async function main() {
      const auth = new google.auth.GoogleAuth({
        // Scopes can be specified either as an array or as a single, space-delimited string.
        scopes: ['https://www.googleapis.com/auth/cloud-platform'],
      });
    
      // Acquire an auth client, and bind it to all future calls
      const authClient = await auth.getClient();
      google.options({auth: authClient});
    
      // Do the magic
      const res =
        await managedidentities.projects.locations.global.domains.validateTrust({
          // The resource domain name, project name, and location using the form: `projects/{project_id\}/locations/global/domains/{domain_name\}`
          name: 'projects/my-project/locations/global/domains/my-domain',
    
          // Request body metadata
          requestBody: {
            // request body parameters
            // {
            //   "trust": {}
            // }
          },
        });
      console.log(res.data);
    
      // Example response
      // {
      //   "done": false,
      //   "error": {},
      //   "metadata": {},
      //   "name": "my_name",
      //   "response": {}
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples