Gcp/cloudcommerceprocurement
@swamp/gcp/cloudcommerceprocurementv2026.10.13.1
01README
Google Cloud cloudcommerceprocurement infrastructure models
02Release Notes
- Updated: providers_accounts, providers_entitlements
03Behaviors
providers_accounts.tsv2026.10.13.1
Global Arguments
| Argument | Type | Description |
|---|---|---|
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| quotaProject? | string | GCP project ID for quota and billing attribution; sets the x-goog-user-project header. Overrides GOOGLE_CLOUD_QUOTA_PROJECT environment variable. Required for APIs like Cloud Identity when using user credentials. |
| apiEndpoint? | string | Custom API endpoint for emulators; overrides GCP_API_ENDPOINT environment variable. Defaults to the service's production URL. |
| parent? | string | The parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456) |
fn get(identifier: string)
Get a accounts
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the accounts |
fn sync(identifier?: string)
Sync accounts state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific accounts by name (e.g. one discovered by list) |
fn list(pageSize?: number, maxPages?: number)
List accounts resources
| Argument | Type | Description |
|---|---|---|
| pageSize? | number | The maximum number of entries that are requested. The default page size is 25 and the maximum page size is 200. |
| maxPages? | number | Maximum number of pages to fetch (default: 10) |
fn approve(approvalName?: any, properties?: any, reason?: any)
approve
| Argument | Type | Description |
|---|---|---|
| approvalName? | any | |
| properties? | any | |
| reason? | any |
fn reject(approvalName?: any, reason?: any)
reject
| Argument | Type | Description |
|---|---|---|
| approvalName? | any | |
| reason? | any |
fn reset()
reset
Resources
state(infinite)— Represents an account that was established by the customer on the service pro...
providers_entitlements.tsv2026.10.13.1
Global Arguments
| Argument | Type | Description |
|---|---|---|
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| quotaProject? | string | GCP project ID for quota and billing attribution; sets the x-goog-user-project header. Overrides GOOGLE_CLOUD_QUOTA_PROJECT environment variable. Required for APIs like Cloud Identity when using user credentials. |
| apiEndpoint? | string | Custom API endpoint for emulators; overrides GCP_API_ENDPOINT environment variable. Defaults to the service's production URL. |
| account? | string | Output only. The resource name of the account that this entitlement is based on, if any. |
| cancellationReason? | string | Output only. The reason the entitlement was cancelled. If this entitlement wasn\'t cancelled, this field is empty. Possible values include "unknown", "expired", "user-cancelled", "account-closed", "billing-disabled" (if the customer has manually disabled billing to their resources), "user-aborted", and "migrated" (if the entitlement has migrated across products). Values of this field are subject to change, and we recommend that you don\'t build your technical integration to rely on these fields. |
| consumers? | array | A project name with format `projects/`. |
| createTime? | string | Output only. The creation timestamp. |
| entitlementBenefitIds? | array | Output only. The entitlement benefit IDs associated with the purchase. |
| messageToUser? | string | Provider-supplied message that is displayed to the end user. Currently this is used to communicate progress and ETA for provisioning. This field can be updated only when a user is waiting for an action from the provider, i.e. entitlement state is EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED or EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL. This field is cleared automatically when the entitlement state changes. |
| name? | string | Output only. The resource name of the entitlement. Entitlement names have the form `providers/{provider_id}/entitlements/{entitlement_id}`. |
| newOfferEndTime? | string | Output only. The end time of the new offer, determined from the offer's specified end date. If the offer des not have a specified end date then this field is not set. This field is populated even if the entitlement isn't active yet. If there's no upcoming offer, the field is empty. * If the entitlement is in the state ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE, or ENTITLEMENT_PENDING_CANCELLATION, then this field is empty. * If the entitlement is in the state ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE, and the upcoming offer has a specified end date, then this field is populated with the expected end time of the upcoming offer, in the future. Otherwise, this field is empty. * If the entitlement is in the state ENTITLEMENT_CANCELLED, then this field is empty. |
| newOfferStartTime? | string | Output only. The timestamp when the new offer becomes effective. This field is populated even if the entitlement isn't active yet. If there's no upcoming offer, the field is empty. * If the entitlement is in the state ENTITLEMENT_ACTIVATION_REQUESTED, this field isn't populated when the entitlement isn't yet approved. After the entitlement is approved, this field is populated with the effective time of the upcoming offer. * If the entitlement is in the state ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION, this field isn't populated. * If the entitlement is in the state ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL, this field isn't populated, because the entitlement change is waiting on approval. * If the entitlement is in the state ENTITLEMENT_PENDING_PLAN_CHANGE, this field is populated with the expected effective time of the upcoming offer, which is in the future. * If the entitlement is in the state ENTITLEMENT_CANCELLED, then this field is empty. |
| newPendingOffer? | string | Output only. Upon a pending plan change, the name of the offer that the entitlement is switching to. Only exists if the pending plan change is moving to an offer. This field isn't populated for entitlements which aren't active yet. Format: 'projects/{project}/services/{service}/privateOffers/{offer}' OR 'projects/{project}/services/{service}/standardOffers/{offer}', depending on whether the offer is private or public. The {service} in the name is the listing service of the offer. It could be either the product service that the offer is referencing, or a generic private offer parent service. We recommend that you don't build your integration to rely on the meaning of this {service} part. * If the entitlement is in the state ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION, then this field is empty. * If the entitlement is in the state ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE, then this field is populated with the upcoming offer. * If the entitlement is in the state ENTITLEMENT_CANCELLED, then this is empty. |
| newPendingOfferDuration? | string | Output only. The duration of the new offer, in ISO 8601 duration format. This field is populated for pending offer changes. It isn't populated for entitlements which aren't active yet. If the offer has a specified end date instead of a duration, this field is empty. * If the entitlement is in the state ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE, or ENTITLEMENT_PENDING_CANCELLATION, this field is empty. * If the entitlement is in the state ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE, and the upcoming offer doesn't have a specified end date, then this field is populated with the duration of the upcoming offer. Otherwise, this field is empty. * If the entitlement is in the state ENTITLEMENT_CANCELLED, then this field is empty. |
| newPendingPlan? | string | Output only. The identifier of the pending new plan. Required if the product has plans and the entitlement has a pending plan change. |
| offer? | string | Output only. The name of the offer that was procured. Field is empty if order wasn't made using an offer. Format: 'projects/{project}/services/{service}/privateOffers/{offer}' OR 'projects/{project}/services/{service}/standardOffers/{offer}', depending on whether the offer is private or public. The {service} in the name is the listing service of the offer. It could be either the product service that the offer is referencing, or a generic private offer parent service. We recommend that you don't build your integration to rely on the meaning of this {service} part. * If the entitlement is in the state ENTITLEMENT_ACTIVATION_REQUESTED, this field is populated with the upcoming offer. * If the entitlement is in the state ENTITLEMENT_ACTIVE, ENTITLEMENT_PENDING_CANCELLATION, ENTITLEMENT_PENDING_PLAN_CHANGE, or ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL, this field is populated with the current offer. * If the entitlement is in the state ENTITLEMENT_CANCELLED, then this field is populated with the latest offer that the order was associated with. |
| offerDuration? | string | Output only. The offer duration of the current offer, in ISO 8601 duration format. This is empty if the entitlement wasn't made using an offer, or if the offer has a specified end date instead of a duration. * If the entitlement is in the state ENTITLEMENT_ACTIVATION_REQUESTED, and the upcoming offer doesn't have a specified end date, then this field is populated with the duration of the upcoming offer. Otherwise, this field is empty. * If the entitlement is in the state ENTITLEMENT_ACTIVE, ENTITLEMENT_PENDING_CANCELLATION, ENTITLEMENT_PENDING_PLAN_CHANGE, or ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL, and the current offer doesn't have a specified end date, then this field contains the duration of the current offer. Otherwise, this field is empty. * If the entitlement is in the state ENTITLEMENT_CANCELLED, and the offer doesn't have a specified end date, then this field is populated with the duration of the latest offer that the order was associated with. Otherwise, this field is empty. |
| offerEndTime? | string | Output only. End time for the current term of the Offer associated with this entitlement. The value of this field can change naturally over time due to auto-renewal, even if the offer isn't changed. * If the entitlement is in the state ENTITLEMENT_ACTIVATION_REQUESTED, then: * If the entitlement isn't approved yet approved, and the offer has a specified end date, then this field is populated with the expected end time of the upcoming offer, in the future. Otherwise, this field is empty. * If the entitlement is approved, then this field is populated with the expected end time of the upcoming offer, in the future. This means that this field and the field offer_duration can both exist. * If the entitlement is in the state ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION, then this field is populated with the expected end time of the current offer, in the future. This field's value is set regardless of whether the offer has a specific end date or a duration. This means that this field and the field offer_duration can both exist. * If the entitlement is in the state ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE: * If the entitlement's pricing model is usage based and the associated offer is a private offer whose term has ended, then this field reflects the ACTUAL end time of the entitlement's associated offer (in the past), even though the entitlement associated with this private offer does not terminate at the end of that private offer's term. * Otherwise, this is the expected end date of the current offer, in the future. * If the entitlement is in the state ENTITLEMENT_CANCELLED, then this field is populated with the end time, in the past, of the latest offer that the order was associated with. If the entitlement was cancelled before any offer started, then this field is empty. |
| orderId? | string | Output only. The order ID of this entitlement, without any `orders/` resource name prefix. |
| plan? | string | Output only. The identifier of the plan that was procured. Required if the product has plans. |
| productExternalName? | string | Output only. The identifier of the product that was procured. |
| provider? | string | Output only. The identifier of the service provider that this entitlement was created against. Each service provider is assigned a unique provider value when they onboard with Cloud Commerce platform. |
| quoteExternalName? | string | Output only. The identifier of the quote that was used to procure. Empty if the order is not purchased using a quote. |
| state? | enum | Output only. The state of the entitlement. |
| subscriptionEndTime? | string | Output only. End time for the subscription corresponding to this entitlement. |
| updateTime? | string | Output only. The last update timestamp. |
| usageReportingId? | string | Output only. The consumerId to use when reporting usage through the Service Control API. See the consumerId field at [Reporting Metrics](https://cloud.google.com/service-control/reporting-metrics) for more details. This field is present only if the product has usage-based billing configured. |
| parent? | string | The parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456) |
fn get(identifier: string)
Get a entitlements
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the entitlements |
fn update(identifier?: string)
Update entitlements attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific entitlements by name (e.g. one discovered by list) |
fn sync(identifier?: string)
Sync entitlements state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific entitlements by name (e.g. one discovered by list) |
fn list(filter?: string, pageSize?: number, maxPages?: number)
List entitlements resources
| Argument | Type | Description |
|---|---|---|
| filter? | string | The filter that can be used to limit the list request. The filter is a query string that can match a selected set of attributes with string values. For example `account=E-1234-5678-ABCD-EFGH`, `state=pending_cancellation`, and `plan!=foo-plan`. Supported query attributes are * `account` * `customer_billing_account` with value in the format of: `billingAccounts/{id}` * `product_external_name` * `quote_external_name` * `offer` * `new_pending_offer` * `plan` * `newPendingPlan` or `new_pending_plan` * `state` * `services` * `consumers.project` * `change_history.new_offer` Note that the consumers and change_history.new_offer match works on repeated structures, so equality (`consumers.project=projects/123456789`) is not supported. Set membership can be expressed with the `:` operator. For example, `consumers.project:projects/123456789` finds entitlements with at least one consumer with project field equal to `projects/123456789`. `change_history.new_offer` retrieves all entitlements that were once associated or are currently active with the offer. Also note that the state name match is case-insensitive and query can omit the prefix "ENTITLEMENT_". For example, `state=active` is equivalent to `state=ENTITLEMENT_ACTIVE`. If the query contains some special characters other than letters, underscore, or digits, the phrase must be quoted with double quotes. For example, `product="providerId:productId"`, where the product name needs to be quoted because it contains special character colon. Queries can be combined with `AND`, `OR`, and `NOT` to form more complex queries. They can also be grouped to force a desired evaluation order. For example, `state=active AND (account=E-1234 OR account=5678) AND NOT (product=foo-product)`. Connective `AND` can be omitted between two predicates. For example `account=E-1234 state=active` is equivalent to `account=E-1234 AND state=active`. |
| pageSize? | number | The maximum number of entries that are requested. The default page size is 200. |
| maxPages? | number | Maximum number of pages to fetch (default: 10) |
fn approve(entitlementMigrated?: any, properties?: any)
approve
| Argument | Type | Description |
|---|---|---|
| entitlementMigrated? | any | |
| properties? | any |
fn approve_plan_change(pendingPlanName?: any)
approve plan change
| Argument | Type | Description |
|---|---|---|
| pendingPlanName? | any |
fn reject(reason?: any)
reject
| Argument | Type | Description |
|---|---|---|
| reason? | any |
fn reject_plan_change(pendingPlanName?: any, reason?: any)
reject plan change
| Argument | Type | Description |
|---|---|---|
| pendingPlanName? | any | |
| reason? | any |
fn suspend(reason?: any)
suspend
| Argument | Type | Description |
|---|---|---|
| reason? | any |
Resources
state(infinite)— Represents a procured product of a customer.
04Previous Versions
2026.08.12.2
- Updated: providers_accounts, providers_entitlements
Added 1, removed 2 behaviors
2026.07.29.1
- Updated: providers_accounts, providers_entitlements
2026.07.21.2
- Updated: providers_accounts, providers_entitlements
2026.07.20.1
- Updated: providers_accounts, providers_entitlements
2026.07.19.1
- Updated: providers_accounts, providers_entitlements
2026.07.18.2
- Updated: providers_accounts, providers_entitlements
2026.07.17.2
- Updated: providers_entitlements
2026.07.17.1
- Updated: providers_accounts, providers_entitlements
2026.06.08.2
- Updated: providers_accounts, providers_entitlements
2026.06.07.1
- Updated: providers_accounts, providers_entitlements
2026.05.25.1
- Updated: providers_accounts, providers_entitlements
Modified 2 behaviors
2026.05.24.1
- Updated: providers_accounts, providers_entitlements
2026.05.21.2
- Updated: providers_accounts, providers_entitlements
2026.05.21.1
2026.05.19.2
2026.05.19.1
2026.04.23.1
2026.04.03.3
- Updated: providers_accounts, providers_entitlements
2026.04.03.1
- Updated: providers_accounts, providers_entitlements
05Stats
A
93 / 100
Downloads
17
Archive size
35.6 KB
Verified by Swamp
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License1/2partial
no SPDX license declared
- Verified public repository2/2earned
06Platforms
07Labels