Summary

The setCapacityGroupForOrganizations() mutation sets the pool capacity for multiple organizations in a specified capacity group in a single operation. Organizations not included in the input are left unchanged, as are other capacity groups. If any part of the input is invalid โ€” for example, a non-existent organization ID โ€” no changes are made.

This mutation is available on a preview basis. It replaces the deprecated setCapacitiesForProductType() mutation, which used a productType argument. The equivalent argument is now named capacityGroup.

Syntax

graphql
setCapacityGroupForOrganizations(
      capacityGroup: String!,
      capacities: [OrganizationCapacityInput!]!
   ): Int!

Provide capacityGroup (required) โ€” a string identifying the capacity group, for example falconComplete or main. Provide capacities (required) โ€” a non-empty list of OrganizationCapacityInput objects, each specifying an organization ID and pool capacity values. If any entry is invalid, nothing is changed.

Returns a non-nullable Int! โ€” the number of organizations whose capacity changed.

Input parameters

Both capacityGroup and capacities are required. Each entry in capacities must include all fields defined by OrganizationCapacityInput. If any entry contains an invalid organization ID or value, the entire mutation is rejected.

Table: Input parameters and datatypes

Parameter Type Required Default Description
This table contains all input parameters for this mutation.
capacities [OrganizationCapacityInput!]! yes ย  A list of capacity entries, one per organization to update. Each entry must supply organizationId, poolName, poolSize, organizationSizeInPool, and summedOrganizationSizesInPool. If any entry is invalid, no changes are made.
capacityGroup String! yes ย  The capacity group whose capacities to set, for example falconComplete or main. Only this capacity group is affected; other capacity groups are left unchanged.

Returned values

Returns a non-nullable Int! โ€” the number of organizations whose capacity changed. Returns 0 if no changes were made, including when the mutation is rejected because of invalid input.