Policy Packs
List Policy Packs
/api/orgs/{orgName}/policypacksListPolicyPacks returns a list of all complete Policy Packs for the organization.
If the policypack query parameter is set, it will only list the policy
packs with the specified name.
Request Parameters
orgNamestring path requiredThe organization namepolicypackstring query optionalThe policy pack name
Responses
- List of policy packs
- ↳
namestring requiredThe name - ↳
displayNamestring requiredThe display name - ↳
versionsarray[integer] requiredList of versions - ↳
versionTagsarray[string] requiredList of version tags
Create Policy Pack
/api/orgs/{orgName}/policypacksCreates a new Policy Pack for an organization. A Policy Pack is a versioned collection of related policies that validate infrastructure configuration during deployments. Policies can enforce rules such as requiring encryption on storage buckets or prohibiting public access to databases. The pack must contain at least one policy. Once created, the pack can be applied to Policy Groups to enforce rules on specific stacks with configurable enforcement levels (advisory, mandatory, or disabled).
Request Parameters
orgNamestring path requiredThe organization name
Request Body
namestring requiredName is a unique URL-safe identifier (at the org level) for the package. If the name has already been used by the organization, then the request will create a new version of the Policy Pack (incremented by one). This is supplied by the CLI.displayNamestring requiredA pretty name for the Policy Pack that is supplied by the package.versionTagstring optionalVersionTag is the semantic version of the Policy Pack. One a version is published, it cannot never be republished. Older clients will not have a version tag.- The Policies outline the specific Policies in the package, and are derived from the package by the CLI.
- ↳
namestring requiredUnique URL-safe name for the policy. This is unique to a specific version of a Policy Pack. - ↳
displayNamestring requiredThe display name - ↳
descriptionstring requiredDescription is used to provide more context about the purpose of the policy. - ↳
enforcementLevelenum requiredThe enforcement levelValues:advisory,mandatory,remediate,disabled - ↳
messagestring requiredMessage is the message that will be displayed to end users when they violate this policy. - The JSON schema for the Policy’s configuration.
- ↳
severityenum optionalThe severity of the policy.Values:,low,medium,high,critical - The compliance framework that this policy belongs to.
- ↳
tagsarray[string] optionalTags associated with the policy. - ↳
remediationStepsstring optionalA description of the steps to take to remediate a policy violation. - ↳
urlstring optionalA URL to more information about the policy. descriptionstring optionalA brief description of the policy pack.readmestring optionalREADME text about the policy pack.providerstring optionalThe cloud provider/platform this policy pack is associated with, e.g. AWS, Azure, etc.tagsarray[string] optionalTags for this policy pack.repositorystring optionalA URL to the repository where the policy pack is defined.metadatamap[string]string optionalMetadata contains optional data about the environment performing the publish operation, e.g. the current source code control commit information.
Responses
versioninteger requiredThe version numberuploadURIstring requiredThe upload URIrequiredHeadersmap[string]string optionalRequiredHeaders represents headers that the CLI must set in order for the upload to succeed.
Delete Policy Pack
/api/orgs/{orgName}/policypacks/{policyPackName}DeletePolicyPack deletes all versions of a Policy Pack, the associated packs stored in S3, and any applied versions of the Policy Packs.
Request Parameters
orgNamestring path requiredThe organization namepolicyPackNamestring path requiredThe policy pack name
Responses
Get Policy Pack
/api/orgs/{orgName}/policypacks/{policyPackName}/versions/{version}Returns the metadata and list of individual policies for a specific version of a Policy Pack. Each policy includes its name, description, enforcement level (advisory, mandatory, or disabled), and configuration schema. Returns 400 if the Policy Pack version is not yet complete (still being uploaded), or 404 if the organization or pack is not found.
Request Parameters
orgNamestring path requiredThe organization namepolicyPackNamestring path requiredThe policy pack nameversionstring path requiredThe version number
Responses
namestring requiredThe unique name of the policy pack.displayNamestring requiredHuman-readable display name of the policy pack.versioninteger requiredNumeric version of the policy pack, auto-incremented on each publish.versionTagstring requiredSemantic version tag for this policy pack version (e.g. ‘1.2.0’).- The individual policies contained in this policy pack.
- ↳
namestring requiredUnique URL-safe name for the policy. This is unique to a specific version of a Policy Pack. - ↳
displayNamestring requiredThe display name - ↳
descriptionstring requiredDescription is used to provide more context about the purpose of the policy. - ↳
enforcementLevelenum requiredThe enforcement levelValues:advisory,mandatory,remediate,disabled - ↳
messagestring requiredMessage is the message that will be displayed to end users when they violate this policy. - The JSON schema for the Policy’s configuration.
- ↳
severityenum optionalThe severity of the policy.Values:,low,medium,high,critical - The compliance framework that this policy belongs to.
- ↳
tagsarray[string] optionalTags associated with the policy. - ↳
remediationStepsstring optionalA description of the steps to take to remediate a policy violation. - ↳
urlstring optionalA URL to more information about the policy. appliedboolean requiredWhether this policy pack version is currently applied to any policy group.
Delete Policy Pack Version
/api/orgs/{orgName}/policypacks/{policyPackName}/versions/{version}DeletePolicyPackVersion deletes a specific version of a Policy Pack and deletes the associated pack stored in S3. A Policy Pack must be unapplied to be deleted.
Request Parameters
orgNamestring path requiredThe organization namepolicyPackNamestring path requiredThe policy pack nameversionstring path requiredThe version number
Responses
Complete Policy Pack
/api/orgs/{orgName}/policypacks/{policyPackName}/versions/{version}/completeTransitions the publish status of a specific Policy Pack version to ‘complete’, making it available for enforcement. Policy Packs go through a multi-step publish process: first the pack content is uploaded, then this endpoint is called to finalize publication. Returns 400 if the pack is already complete.
Request Parameters
orgNamestring path requiredThe organization namepolicyPackNamestring path requiredThe policy pack nameversionstring path requiredThe version number
Responses
Get Policy Pack Config Schema
/api/orgs/{orgName}/policypacks/{policyPackName}/versions/{version}/schemaReturns the JSON configuration schema for a specific version of a Policy Pack. The schema defines the configurable parameters for each policy in the pack, including allowed values, defaults, and validation rules. Policy Groups use this schema to configure policy behavior when assigning packs to stacks.
Request Parameters
orgNamestring path requiredThe organization namepolicyPackNamestring path requiredThe policy pack nameversionstring path requiredThe version number
Responses
- The JSON schema for each Policy’s configuration.
Get Org Registry Policy Pack
/api/orgs/{orgName}/registry/policypacks/{policyPackName}Retrieves lightweight registry metadata for a policy pack (source/publisher/name) without loading detailed policy definitions.
Request Parameters
orgNamestring path requiredThe organization namepolicyPackNamestring path requiredThe policy pack nametagstring query optionalVersion tag to retrieve (e.g., ’latest')
Responses
- PolicyPack contains the metadata for this specific version.
- ↳
idstring requiredID is the unique identifier for this policy pack in the registry. This is a UUID that corresponds to the policy pack’s database ID. - ↳
sourcestring requiredSource indicates where this policy pack is hosted (e.g., “private”, “pulumi”). Currently, only “private” policy packs are supported. - ↳
publisherstring requiredPublisher is the organization or user that published this policy pack. This corresponds to the Pulumi organization name. - ↳
namestring requiredName is the unique identifier for this policy pack within the publisher’s namespace. Policy pack names must be URL-safe and unique per publisher. - ↳
versionstring requiredVersion is the semantic version of this policy pack. This represents the latest or specific version being referenced. - ↳
displayNamestring requiredDisplayName is a human-readable name for this policy pack. This is typically more descriptive than the technical name. - ↳
accessLevelenum requiredAccessLevel is the client’s level of access to this policy pack.Values:full,view-only,deny - ↳
enforcementLevelsarray[string] requiredEnforcementLevels are the client’s allowed enforcement levels for this policy pack. - Policies contains the individual policy definitions in this version. Each policy includes its configuration schema and enforcement rules. This field is optional and may be omitted for lightweight responses that only provide registry metadata.
- ↳
namestring requiredUnique URL-safe name for the policy. This is unique to a specific version of a Policy Pack. - ↳
displayNamestring requiredThe display name - ↳
descriptionstring requiredDescription is used to provide more context about the purpose of the policy. - ↳
enforcementLevelenum requiredThe enforcement levelValues:advisory,mandatory,remediate,disabled - ↳
messagestring requiredMessage is the message that will be displayed to end users when they violate this policy. - The JSON schema for the Policy’s configuration.
- ↳
severityenum optionalThe severity of the policy.Values:,low,medium,high,critical - The compliance framework that this policy belongs to.
- ↳
tagsarray[string] optionalTags associated with the policy. - ↳
remediationStepsstring optionalA description of the steps to take to remediate a policy violation. - ↳
urlstring optionalA URL to more information about the policy.
List Policy Packs
ListPolicyPacks_preview_registry_post instead./api/preview/registry/policypacksLists all policy packs accessible to the calling user for a given organization. The orgLogin query parameter is required and restricts results to policy packs owned by that organization. Results can optionally be filtered by access level. No authentication is required. Returns 400 if the policy pack access filter value is invalid. This is the deprecated GET variant; prefer the POST ListPolicyPacks endpoint instead.
Request Parameters
accessstring query optionalFilter by access levelorgLoginstring query optionalRequired. Filter by owning organization
Responses
continuationTokenstring optionalContinuationToken can be used to fetch the next page of results. If nil, there are no more results available.- PolicyPacks contains the policy pack metadata for the current page.
- ↳
idstring requiredID is the unique identifier for this policy pack in the registry. This is a UUID that corresponds to the policy pack’s database ID. - ↳
sourcestring requiredSource indicates where this policy pack is hosted (e.g., “private”, “pulumi”). Currently, only “private” policy packs are supported. - ↳
publisherstring requiredPublisher is the organization or user that published this policy pack. This corresponds to the Pulumi organization name. - ↳
namestring requiredName is the unique identifier for this policy pack within the publisher’s namespace. Policy pack names must be URL-safe and unique per publisher. - ↳
versionstring requiredVersion is the semantic version of this policy pack. This represents the latest or specific version being referenced. - ↳
displayNamestring requiredDisplayName is a human-readable name for this policy pack. This is typically more descriptive than the technical name. - ↳
accessLevelenum requiredAccessLevel is the client’s level of access to this policy pack.Values:full,view-only,deny - ↳
enforcementLevelsarray[string] requiredEnforcementLevels are the client’s allowed enforcement levels for this policy pack.
List Policy Packs
/api/preview/registry/policypacksLists all policy packs accessible to the calling user, with support for filtering by access level, organization, and specific policy pack IDs. The request body accepts an optional orgLogin to scope results to a specific organization, an optional access level filter (defaults to ’enabled’), and an optional list of policy pack IDs to restrict the results to specific packs. No authentication is required. Returns 400 if the access filter value is invalid.
Request Body
accessenum optionalThe access of the policy packs to list. Default isenabled.Values:added,available,enabled,privateidsarray[string] optionalA list of policy pack IDs to list. If specified, only the policy packs with the specified IDs will be listed. If not specified, all policy packs will be listed.orgLoginstring optionalThe canonical name of the organization to list policy packs for.
Responses
continuationTokenstring optionalContinuationToken can be used to fetch the next page of results. If nil, there are no more results available.- PolicyPacks contains the policy pack metadata for the current page.
- ↳
idstring requiredID is the unique identifier for this policy pack in the registry. This is a UUID that corresponds to the policy pack’s database ID. - ↳
sourcestring requiredSource indicates where this policy pack is hosted (e.g., “private”, “pulumi”). Currently, only “private” policy packs are supported. - ↳
publisherstring requiredPublisher is the organization or user that published this policy pack. This corresponds to the Pulumi organization name. - ↳
namestring requiredName is the unique identifier for this policy pack within the publisher’s namespace. Policy pack names must be URL-safe and unique per publisher. - ↳
versionstring requiredVersion is the semantic version of this policy pack. This represents the latest or specific version being referenced. - ↳
displayNamestring requiredDisplayName is a human-readable name for this policy pack. This is typically more descriptive than the technical name. - ↳
accessLevelenum requiredAccessLevel is the client’s level of access to this policy pack.Values:full,view-only,deny - ↳
enforcementLevelsarray[string] requiredEnforcementLevels are the client’s allowed enforcement levels for this policy pack.
Delete Policy Pack
/api/preview/registry/policypacks/{source}/{publisher}/{name}Deletes a policy pack and all of its versions from the registry. The policy pack is identified by its source (currently only ‘private’), publisher organization, and name. This is a destructive operation that permanently removes the policy pack and all associated version data. Requires the RegistryPublish permission on the publisher organization. Returns 404 if the policy pack does not exist.
Request Parameters
sourcestring path requiredThe policy pack source: ‘private’publisherstring path requiredOrganization that owns the policy packnamestring path requiredThe policy pack name
Responses
List Policy Pack Versions
/api/preview/registry/policypacks/{source}/{publisher}/{name}/versionsLists all versions of a specific policy pack. The policy pack is identified by its source (currently only ‘private’), publisher organization, and name. The response includes a list of policy pack version metadata and an optional continuationToken for pagination. Returns 404 if the policy pack does not exist.
Request Parameters
sourcestring path requiredThe policy pack source: ‘private’publisherstring path requiredOrganization that owns the policy packnamestring path requiredThe policy pack name
Responses
continuationTokenstring optionalContinuationToken can be used to fetch the next page of results. If nil, there are no more results available.- PolicyPacks contains the policy pack metadata for the current page.
- ↳
idstring requiredID is the unique identifier for this policy pack in the registry. This is a UUID that corresponds to the policy pack’s database ID. - ↳
sourcestring requiredSource indicates where this policy pack is hosted (e.g., “private”, “pulumi”). Currently, only “private” policy packs are supported. - ↳
publisherstring requiredPublisher is the organization or user that published this policy pack. This corresponds to the Pulumi organization name. - ↳
namestring requiredName is the unique identifier for this policy pack within the publisher’s namespace. Policy pack names must be URL-safe and unique per publisher. - ↳
versionstring requiredVersion is the semantic version of this policy pack. This represents the latest or specific version being referenced. - ↳
displayNamestring requiredDisplayName is a human-readable name for this policy pack. This is typically more descriptive than the technical name. - ↳
accessLevelenum requiredAccessLevel is the client’s level of access to this policy pack.Values:full,view-only,deny - ↳
enforcementLevelsarray[string] requiredEnforcementLevels are the client’s allowed enforcement levels for this policy pack.
Post Publish Policy Pack Version
/api/preview/registry/policypacks/{source}/{publisher}/{name}/versionsInitiates the first step of a two-phase policy pack version publish workflow. The policy pack is identified by its source (currently only ‘private’), publisher organization, and name. This creates a publish transaction that must be completed by calling PostPublishPolicyPackVersionComplete. Requires the RegistryPublish permission on the publisher organization. Returns 404 if the policy pack is not found.
Request Parameters
sourcestring path requiredThe policy pack source: ‘private’publisherstring path requiredOrganization that owns the policy packnamestring path requiredThe policy pack name
Responses
Get Policy Pack Version
/api/preview/registry/policypacks/{source}/{publisher}/{name}/versions/{version}Retrieves detailed information about a specific version of a policy pack, including the individual policy definitions. The policy pack is identified by its source (currently only ‘private’), publisher organization, and name. The version parameter accepts either a specific semantic version string or the special value ’latest’ to retrieve the most recently published version. The response includes the policy pack metadata and an optional list of policies, where each policy includes its configuration schema and enforcement rules. Returns 404 if the specified policy pack does not exist.
Request Parameters
sourcestring path requiredThe policy pack source: ‘private’publisherstring path requiredOrganization that owns the policy packnamestring path requiredThe policy pack nameversionstring path requiredSemantic version string or ’latest'
Responses
- PolicyPack contains the metadata for this specific version.
- ↳
idstring requiredID is the unique identifier for this policy pack in the registry. This is a UUID that corresponds to the policy pack’s database ID. - ↳
sourcestring requiredSource indicates where this policy pack is hosted (e.g., “private”, “pulumi”). Currently, only “private” policy packs are supported. - ↳
publisherstring requiredPublisher is the organization or user that published this policy pack. This corresponds to the Pulumi organization name. - ↳
namestring requiredName is the unique identifier for this policy pack within the publisher’s namespace. Policy pack names must be URL-safe and unique per publisher. - ↳
versionstring requiredVersion is the semantic version of this policy pack. This represents the latest or specific version being referenced. - ↳
displayNamestring requiredDisplayName is a human-readable name for this policy pack. This is typically more descriptive than the technical name. - ↳
accessLevelenum requiredAccessLevel is the client’s level of access to this policy pack.Values:full,view-only,deny - ↳
enforcementLevelsarray[string] requiredEnforcementLevels are the client’s allowed enforcement levels for this policy pack. - Policies contains the individual policy definitions in this version. Each policy includes its configuration schema and enforcement rules. This field is optional and may be omitted for lightweight responses that only provide registry metadata.
- ↳
namestring requiredUnique URL-safe name for the policy. This is unique to a specific version of a Policy Pack. - ↳
displayNamestring requiredThe display name - ↳
descriptionstring requiredDescription is used to provide more context about the purpose of the policy. - ↳
enforcementLevelenum requiredThe enforcement levelValues:advisory,mandatory,remediate,disabled - ↳
messagestring requiredMessage is the message that will be displayed to end users when they violate this policy. - The JSON schema for the Policy’s configuration.
- ↳
severityenum optionalThe severity of the policy.Values:,low,medium,high,critical - The compliance framework that this policy belongs to.
- ↳
tagsarray[string] optionalTags associated with the policy. - ↳
remediationStepsstring optionalA description of the steps to take to remediate a policy violation. - ↳
urlstring optionalA URL to more information about the policy.
Delete Policy Pack
/api/preview/registry/policypacks/{source}/{publisher}/{name}/versions/{version}Deletes a specific version of a policy pack from the registry. The policy pack version is identified by its source (currently only ‘private’), publisher organization, name, and semantic version string. Requires the RegistryPublish permission on the publisher organization. Returns 404 if the specified policy pack version does not exist.
Request Parameters
sourcestring path requiredThe policy pack source: ‘private’publisherstring path requiredOrganization that owns the policy packnamestring path requiredThe policy pack nameversionstring path requiredSemantic version string of the policy pack version to delete
Responses
Post Publish Policy Pack Version Complete
/api/preview/registry/policypacks/{source}/{publisher}/{name}/versions/{version}/completeFinalizes the second step of the two-phase policy pack version publish workflow. After initiating a publish with PostPublishPolicyPackVersion, call this endpoint with the policy pack source, publisher, name, and version to complete the publish and make the version available in the registry. Requires the RegistryPublish permission on the publisher organization. Returns 404 if the publish operation is not found.
Request Parameters
sourcestring path requiredThe policy pack source: ‘private’publisherstring path requiredOrganization that owns the policy packnamestring path requiredThe policy pack nameversionstring path requiredSemantic version string of the policy pack version to complete
Responses
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.