Detalhes do pacote

@google-cloud/resource-manager

googleapis979.6kApache-2.06.1.0

Cloud Resource Manager Client Library for Node.js

google apis client, google api client, google apis, google api

readme (leia-me)

Google Cloud Platform logo

Google Cloud Resource Manager API: Node.js Client

release level npm version

Cloud Resource Manager Client Library for Node.js

A comprehensive list of changes in each version may be found in the CHANGELOG.

Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in Client Libraries Explained.

Table of contents:

Quickstart

Before you begin

  1. Select or create a Cloud Platform project.
  2. Enable billing for your project.
  3. Enable the Google Cloud Resource Manager API API.
  4. Set up authentication so you can access the API from your local workstation.

Installing the client library

npm install @google-cloud/resource-manager

Using the client library

// Imports the Google Cloud client library
const {ProjectsClient} = require('@google-cloud/resource-manager');

// Creates a client
const client = new ProjectsClient();

async function quickstart() {
  // Lists current projects
  const projects = client.searchProjectsAsync();
  console.log('Projects:');
  for await (const project of projects) {
    console.info(project);
  }
}
quickstart();

Samples

Samples are in the samples/ directory. Each sample's README.md has instructions for running its sample.

Sample Source Code Try it
Folders.create_folder source code Open in Cloud Shell
Folders.delete_folder source code Open in Cloud Shell
Folders.get_folder source code Open in Cloud Shell
Folders.get_iam_policy source code Open in Cloud Shell
Folders.list_folders source code Open in Cloud Shell
Folders.move_folder source code Open in Cloud Shell
Folders.search_folders source code Open in Cloud Shell
Folders.set_iam_policy source code Open in Cloud Shell
Folders.test_iam_permissions source code Open in Cloud Shell
Folders.undelete_folder source code Open in Cloud Shell
Folders.update_folder source code Open in Cloud Shell
Organizations.get_iam_policy source code Open in Cloud Shell
Organizations.get_organization source code Open in Cloud Shell
Organizations.search_organizations source code Open in Cloud Shell
Organizations.set_iam_policy source code Open in Cloud Shell
Organizations.test_iam_permissions source code Open in Cloud Shell
Projects.create_project source code Open in Cloud Shell
Projects.delete_project source code Open in Cloud Shell
Projects.get_iam_policy source code Open in Cloud Shell
Projects.get_project source code Open in Cloud Shell
Projects.list_projects source code Open in Cloud Shell
Projects.move_project source code Open in Cloud Shell
Projects.search_projects source code Open in Cloud Shell
Projects.set_iam_policy source code Open in Cloud Shell
Projects.test_iam_permissions source code Open in Cloud Shell
Projects.undelete_project source code Open in Cloud Shell
Projects.update_project source code Open in Cloud Shell
Tag_bindings.create_tag_binding source code Open in Cloud Shell
Tag_bindings.delete_tag_binding source code Open in Cloud Shell
Tag_bindings.list_effective_tags source code Open in Cloud Shell
Tag_bindings.list_tag_bindings source code Open in Cloud Shell
Tag_holds.create_tag_hold source code Open in Cloud Shell
Tag_holds.delete_tag_hold source code Open in Cloud Shell
Tag_holds.list_tag_holds source code Open in Cloud Shell
Tag_keys.create_tag_key source code Open in Cloud Shell
Tag_keys.delete_tag_key source code Open in Cloud Shell
Tag_keys.get_iam_policy source code Open in Cloud Shell
Tag_keys.get_namespaced_tag_key source code Open in Cloud Shell
Tag_keys.get_tag_key source code Open in Cloud Shell
Tag_keys.list_tag_keys source code Open in Cloud Shell
Tag_keys.set_iam_policy source code Open in Cloud Shell
Tag_keys.test_iam_permissions source code Open in Cloud Shell
Tag_keys.update_tag_key source code Open in Cloud Shell
Tag_values.create_tag_value source code Open in Cloud Shell
Tag_values.delete_tag_value source code Open in Cloud Shell
Tag_values.get_iam_policy source code Open in Cloud Shell
Tag_values.get_namespaced_tag_value source code Open in Cloud Shell
Tag_values.get_tag_value source code Open in Cloud Shell
Tag_values.list_tag_values source code Open in Cloud Shell
Tag_values.set_iam_policy source code Open in Cloud Shell
Tag_values.test_iam_permissions source code Open in Cloud Shell
Tag_values.update_tag_value source code Open in Cloud Shell
Quickstart source code Open in Cloud Shell

The Google Cloud Resource Manager API Node.js Client API Reference documentation also contains samples.

Supported Node.js Versions

Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js. If you are using an end-of-life version of Node.js, we recommend that you update as soon as possible to an actively supported LTS version.

Google's client libraries support legacy versions of Node.js runtimes on a best-efforts basis with the following warnings:

  • Legacy versions are not tested in continuous integration.
  • Some security patches and features cannot be backported.
  • Dependencies cannot be kept up-to-date.

Client libraries targeting some end-of-life versions of Node.js are available, and can be installed through npm dist-tags. The dist-tags follow the naming convention legacy-(version). For example, npm install @google-cloud/resource-manager@legacy-8 installs client libraries for versions compatible with Node.js 8.

Versioning

This library follows Semantic Versioning.

This library is considered to be stable. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against stable libraries are addressed with the highest priority.

More Information: Google Cloud Platform Launch Stages

Contributing

Contributions welcome! See the Contributing Guide.

Please note that this README.md, the samples/README.md, and a variety of configuration files in this repository (including .nycrc and tsconfig.json) are generated from a central template. To edit one of these files, make an edit to its templates in directory.

License

Apache Version 2.0

See LICENSE

changelog (log de mudanças)

Changelog

npm history

6.1.0 (2025-06-03)

Features

6.0.1 (2025-03-19)

Bug Fixes

  • [Many APIs] await/catch promises, and update listOperationsAsync return type (#6188) (a73cdbf)

6.0.0 (2025-03-18)

⚠ BREAKING CHANGES

  • upgrade to Node 18 (#6096)

Features

  • [Many APIs] add request/response debug logging to gapics (b99c5f8)

Miscellaneous Chores

5.3.1 (2025-02-12)

Bug Fixes

  • [Many APIs] finalize fixing typings for headers in generator (#6018) (9dc5856)

5.3.0 (2024-05-21)

Features

  • [Many APIs] update Nodejs generator to send API versions in headers for GAPICs (#5351) (01f48fc)
  • [Many APIs] update Nodejs generator to send API versions in headers for GAPICs (#5354) (a9784ed)

5.2.0 (2024-04-05)

Features

  • [Many APIs] add several fields to manage state of database encryption update (#5190) (b569fbe)

5.1.0 (2024-02-09)

Features

  • Trusted Private Cloud support, use the universeDomain parameter (#5027) (88763bb)

5.0.1 (2023-09-06)

Bug Fixes

  • [Many APIs] simplify logic for HTTP/1.1 REST fallback option (#4587) (e3b1e7e)

5.0.0 (2023-08-06)

⚠ BREAKING CHANGES

  • migrate to Node 14 (#4443)

Bug Fixes

Miscellaneous Chores

4.3.0 (2023-04-24)

Features

  • [resourcemanager] add TagHolds, GetNamespacedTagKey, and GetNamespacedTagValue APIs. Adds support for project parented tags (#4191) (a742949)

4.2.2 (2023-04-13)

Bug Fixes

4.2.1 (2023-02-15)

Bug Fixes

  • [Many APIs] changing format of the jsdoc links (#3989) (95399f7)

4.2.0 (2023-01-28)

Features

4.1.3 (2022-11-10)

Bug Fixes

  • Regenerated proto JS and TS definitions (generator update) (#3472) (5e2230d)

4.1.2 (2022-11-03)

Bug Fixes

4.1.1 (2022-09-22)

Bug Fixes

4.1.0 (2022-06-30)

Features

4.0.0 (2022-05-17)

⚠ BREAKING CHANGES

  • update library to use Node 12 (#452)

Build System

3.2.0 (2022-04-06)

Features

3.1.0 (2022-03-23)

Features

3.0.0 (2021-09-14)

⚠ BREAKING CHANGES

Features

2.0.1 (2021-09-09)

Bug Fixes

  • build: switch primary branch to main (#393) (3e9c0a9)

2.0.0 (2021-06-01)

⚠ BREAKING CHANGES

  • rename package to @google-cloud/resource-manager (#376)

Features

  • rename package to @google-cloud/resource-manager (#376) (f9feeb2)

1.3.0 (2021-05-25)

Features

1.2.1 (2020-07-10)

Bug Fixes

1.2.0 (2020-05-20)

Features

  • Expose getIamPolicy support for project (#302) (85f136d)

Bug Fixes

  • apache license URL (#468) (#308) (3fdebd3)
  • deps: update dependency @google-cloud/common to v3 (#301) (0ee3bf1)
  • deps: update dependency @google-cloud/paginator to v3 (#299) (3cffb9f)
  • deps: update dependency @google-cloud/promisify to v2 (#298) (1e8965f)

1.1.5 (2019-12-05)

Bug Fixes

  • deps: pin TypeScript below 3.7.0 (6e6c60d)

1.1.4 (2019-11-14)

Bug Fixes

  • docs: snippets are now replaced in jsdoc comments (#258) (d81b8ae)

1.1.3 (2019-07-26)

Bug Fixes

  • deps: update dependency @google-cloud/paginator to v2 (#238) (42c35d2)

1.1.2 (2019-06-26)

Bug Fixes

  • docs: link to reference docs section on googleapis.dev (#234) (342c506)

1.1.1 (2019-06-15)

Bug Fixes

1.1.0 (2019-06-05)

Features

1.0.1 (2019-05-24)

Bug Fixes

  • types: use Metadata for api response type (#222) (2032590)

1.0.0 (2019-05-14)

Bug Fixes

  • deps: remove teeny-request as dependency (#199) (385b400)
  • deps: update dependency @google-cloud/common to ^0.32.0 (4707eb9), closes #8203
  • deps: update dependency @google-cloud/common to v1 (#215) (ab7cb12)
  • deps: update dependency @google-cloud/paginator to v1 (#209) (14b6523)
  • deps: update dependency @google-cloud/promisify to v1 (#208) (3a71dcb)

Build System

BREAKING CHANGES

  • upgrade engines field to >=8.10.0 (#204)

v0.9.1

03-12-2019 12:22 PDT

Greetings folks! This is a patch release that just bumps a few dependencies. Enjoy!

Dependencies

  • fix(deps): update dependency @google-cloud/paginator to ^0.2.0
  • fix(deps): update dependency @google-cloud/promisify to ^0.4.0 (#179)
  • fix(deps): update dependency @google-cloud/common to ^0.31.0 (#171)

Documentation

  • docs: update links in contrib guide (#180)
  • docs: update contributing path in README (#174)
  • docs: move CONTRIBUTING.md to root (#173)
  • docs: add lint/fix example to contributing guide (#170)

Internal / Testing Changes

  • build: Add docuploader credentials to node publish jobs (#184)
  • build: use node10 to run samples-test, system-test etc (#183)
  • build: update release configuration
  • chore(deps): update dependency mocha to v6
  • build: use linkinator for docs test (#178)
  • fix(deps): update dependency yargs to v13 (#177)
  • build: create docs test npm scripts (#176)
  • build: test using @grpc/grpc-js in CI (#175)
  • chore(deps): update dependency eslint-config-prettier to v4 (#168)
  • build: ignore googleapis.com in doc link check (#166)
  • build: check broken links in generated docs (#164)
  • refactor: modernize the sample tests (#162)
  • chore(build): inject yoshi automation key (#160)
  • chore: update nyc and eslint configs (#159)
  • chore: fix publish.sh permission +x (#157)
  • fix(build): fix Kokoro release script (#156)
  • build: add Kokoro configs for autorelease (#155)

v0.9.0

12-06-2018 15:54 PST

This release has breaking changes. Please update with care.

Breaking changes

Dropped support for non-LTS versions of node.js

Node.js versions 4.x and 9.x are explicitly not supported.

Support for es modules

The import syntax for this library has changed to support es modules.

old code

const Resource = require('@google-cloud/resource-manager');
const resource = Resource({...});

new code

const {Resource} = require('@google-cloud/resource-manager');
const resource = Resource({...});

Features

  • feat: convert to typescript (#64)

Documentation

  • docs: update readme badges (#146)
  • docs(samples): updated samples code to use async await (#139)

Fixes

  • fix: improve types and fix sample tests (#141)
  • fix(typo): LifecylceState => LifecycleState interface (#124)
  • fix: improve types, enable noImplicitThis (#90)
  • fix: use small HTTP dependency (#80)
  • fix: drop support for node.js 4.x and 9.x (#50)

Internal / Testing Changes

  • test: disable lifecycle project system test (#142)
  • chore: always nyc report before calling codecov (#151)
  • chore: nyc ignore build/test by default (#150)
  • chore: update license file (#148)
  • fix(build): fix system key decryption (#144)
  • chore(deps): update dependency typescript to ~3.2.0 (#143)
  • chore: add a synth.metadata
  • refactor(samples): convert sample tests from ava to mocha (#135)
  • chore(deps): update dependency gts to ^0.9.0 (#134)
  • chore: update eslintignore config (#133)
  • chore(deps): update dependency @google-cloud/nodejs-repo-tools to v3 (#130)
  • refactor: drop dependency on extend (#128)
  • chore: drop contributors from multiple places (#129)
  • fix(deps): update dependency @google-cloud/common to ^0.26.0 (#113)
  • chore: use latest npm on Windows (#127)
  • chore: update CircleCI config (#126)
  • chore: include build in eslintignore (#122)
  • chore(deps): update dependency eslint-plugin-node to v8 (#118)
  • chore: update issue templates (#117)
  • chore: remove old issue template (#115)
  • build: run tests on node11 (#114)
  • chores(build): do not collect sponge.xml from windows builds (#112)
  • chores(build): run codecov on continuous builds (#110)
  • chore: update new issue template (#109)
  • chore(deps): update dependency sinon to v7 (#105)
  • build: fix codecov uploading on Kokoro (#106)
  • Update kokoro config (#103)
  • chore(deps): update dependency eslint-plugin-prettier to v3 (#102)
  • chore(deps): update dependency typescript to ~3.1.0 (#100)
  • Update CI config (#99)
  • Don't publish sourcemaps (#97)
  • Update the kokoro config (#94)
  • test: remove appveyor config (#93)
  • test: simplify and fix the system tests (#92)
  • Update the CI config (#89)
  • Enable prefer-const in the eslint config (#88)
  • Enable no-var in eslint (#86)
  • fix(deps): update dependency @google-cloud/common to ^0.25.0 (#87)
  • Update CI config (#83)
  • Fix code coverage (#81)
  • fix(deps): update dependency @google-cloud/common to ^0.24.0 (#71)
  • Update CI config (#78)
  • Retry npm install in CI (#79)
  • Re-generate library using /synth.py (#77)
  • chore(deps): update dependency nyc to v13 (#76)
  • Update the CI config (#75)
  • chore: update CircleCI config
  • chore: enable gts fix (#73)
  • chore: convert to es6 (#72)
  • chore(deps): update dependency eslint-config-prettier to v3 (#70)
  • fix(deps): update dependency @google-cloud/common to ^0.21.0 (#66)
  • chore: split the common module (#69)
  • chore: ignore package-lock.json (#67)
  • chore: update renovate config (#63)
  • chore: assert.deelEqual => assert.deepStrictEqual (#60)
  • chore(deps): lock file maintenance (#61)
  • chore: move mocha options to mocha.opts (#58)
  • chore: require node 8 for samples (#59)
  • chore(deps): lock file maintenance (#57)
  • chore(deps): update dependency eslint-plugin-node to v7 (#55)
  • test: use strictEqual in tests (#56)
  • fix(deps): update dependency yargs to v12 (#46)
  • fix(deps): update dependency @google-cloud/common to ^0.20.0 (#41)
  • chore(deps): update dependency sinon to v6 (#44)
  • fix(deps): update dependency yargs to v11 (#45)
  • chore(deps): update dependency proxyquire to v2 (#43)
  • chore(deps): update dependency ava to v0.25.0 (#39)
  • Configure Renovate (#33)
  • chore(package): update eslint to version 5.0.0 (#34)
  • refactor: drop repo-tool as an exec wrapper (#37)
  • fix: update linking for samples (#35)
  • chore: update sample lockfiles (#36)
  • chore(package): update nyc to version 12.0.2 (#32)
  • chore: lock files maintenance (#30)
  • chore: timeout for system test (#28)
  • chore: lock files maintenance (#27)
  • chore: test on node10 (#26)
  • chore: lock files maintenance (#25)
  • chore: one more workaround for repo-tools EPERM (#23)
  • chore: workaround for repo-tools EPERM (#22)
  • Update @google-cloud/common to the latest version 🚀 (#21)
  • Update google-auto-auth (#20)
  • chore: setup nighty build in CircleCI (#19)
  • Upgrade repo-tools and regenerate scaffolding. (#16)
  • Update proxyquire to the latest version 🚀 (#15)
  • chore: removing node7 job from CircleCI (#14)