HashiCorp Cloud Platform Packer Artifact RegistryStable
Packer Service
Gets a build with its list of images.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
build_id
string
RequiredULID of the build that should be retrieved.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
Deletes a build in the provided iteration.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
build_id
string
RequiredULID of the build that should be deleted.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
Updates an image build. This may be most often used for modifying the status of a currently running build.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
build_id
string
RequiredULID of the build that should be updated.
Body Parameters
provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
region
string
region is the cloud region ("us-west1", "us-east1")
status
string
Status of the build. The status can be RUNNING, DONE, CANCELLED, FAILED, or UNSET.
cloud_provider
string
The cloud provider that this build produced artifacts for. For example, AWS, GCP, or Azure.
packer_run_uuid
string
The UUID specific to this call to Packer build. If you use the manifest post-processor, this UUID will match the UUID present there.
image_id
string
ID or URL of the remote cloud image as given by a build.
region
string
Cloud-specific region as provided by packer build
. For example, "ap-east-1".
labels
object
A key:value map for custom, user-settable metadata about your build.
source_image_id
string
The ID or URL of the remote cloud source image. Used for tracking image dependencies for build pipelines.
source_iteration_id
string
The ID of the parent iteration associated with the source_image_id
.
When the source iteration ID is set, the source image ID should also be set.
source_channel_id
string
The ID of the channel that it was used to fetch the source_iteration_id. When the source channel ID is set, the source iteration ID should also be set.
Lists every existing bucket in the HCP Packer registry and their last completed iteration.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
pagination.page_size
integer
The max number of results per page that should be returned. If the number
of available results is larger than page_size
, a next_page_token
is
returned which can be used to get the next page of results in subsequent
requests. A value of zero will cause page_size
to be defaulted.
pagination.next_page_token
string
Specifies a page token to use to retrieve the next page. Set this to the
next_page_token
returned by previous list requests to get the next page of
results. If set, previous_page_token
must not be set.
pagination.previous_page_token
string
Specifies a page token to use to retrieve the previous page. Set this to
the previous_page_token
returned by previous list requests to get the
previous page of results. If set, next_page_token
must not be set.
sorting.order_by
string[]
Creates an image bucket in the HCP Packer registry.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
Body Parameters
bucket_slug
string
Human-readable name for the bucket.
description
string
A short description of what this bucket's images are for.
labels
object
A key:value map for custom, user-settable metadata about your bucket.
provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
region
string
region is the cloud region ("us-west1", "us-east1")
Gets a bucket with its latest completed iteration.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
bucket_slug
string
RequiredHuman-readable name for the bucket.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
bucket_id
string
ULID of the bucket.
Deletes a bucket and all its information, such as iterations and builds.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
bucket_slug
string
RequiredHuman-readable name for the bucket.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
Updates a bucket's information.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
bucket_slug
string
RequiredHuman-readable name for the bucket.
Body Parameters
provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
region
string
region is the cloud region ("us-west1", "us-east1")
platforms
string[]
description
string
A short description of what this bucket's images are for.
labels
object
A key:value map for custom, user-settable metadata about your bucket.
Lists the ancestry relationships for an image bucket. This includes direct source images (parents) and downstream images built directly from the image bucket (children).
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
bucket_slug
string
RequiredHuman-readable name for the bucket you want to list ancestry for.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
type
string
The type of ancestry relations to list. Type 'parents' lists all the direct source images for this image bucket. Type 'children' lists all of the child images built directly from this image bucket. If not specified, defaults to listing both parent and child relationships for the image bucket.
channel
string
An image channel in the image bucket associated with the request. This property filters the results to children whose parent iteration was assigned to this channel when the children were built. If not specified, the endpoint returns all children built from any iteration in this image bucket.
pagination.page_size
integer
The max number of results per page that should be returned. If the number
of available results is larger than page_size
, a next_page_token
is
returned which can be used to get the next page of results in subsequent
requests. A value of zero will cause page_size
to be defaulted.
pagination.next_page_token
string
Specifies a page token to use to retrieve the next page. Set this to the
next_page_token
returned by previous list requests to get the next page of
results. If set, previous_page_token
must not be set.
pagination.previous_page_token
string
Specifies a page token to use to retrieve the previous page. Set this to
the previous_page_token
returned by previous list requests to get the
previous page of results. If set, next_page_token
must not be set.
incremental_version
integer
The human-readable version number of an iteration that HCP Packer uses to list that iteration's parents. All parents are the parent images Packer used to build this iteration. If not specified, the endpoint returns the parents of the image bucket's latest iteration.
iteration_id
string
ULID of the iteration that HCP Packer uses to list that iteration's parents. All parents are the parent images Packer used to build this iteration. If not specified, the endpoint returns the parents of the image bucket's latest iteration.
fingerprint
string
Fingerprint of an iteration that HCP Packer uses to list that iteration's parents. All parents are the parent images Packer used to build this iteration. If not specified, the endpoint returns the parents of the image bucket's latest iteration.
Lists all channels of a given bucket.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
bucket_slug
string
RequiredHuman-readable name for the bucket you want to list channels for.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
Creates a channel either empty or assigned to an iteration.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
bucket_slug
string
RequiredHuman-readable name for the bucket to associate the channel with.
Body Parameters
slug
string
Human-readable name for the channel.
incremental_version
integer
The human-readable version number assigned to this iteration.
iteration_id
string
ULID of the iteration.
fingerprint
string
Fingerprint of the iteration set by Packer when you call packer build
.
Refer to the Packer documentation for more information on how this value is set.
The fingerprint can be used as an identifier for the iteration.
provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
region
string
region is the cloud region ("us-west1", "us-east1")
restriction
string
When set, will set the channel access in HCP Packer registry. The channel is unrestricted by default;
- RESTRICTED: Make the channel only visible to users with permission to create and manage.
- UNRESTRICTED: Make the channel visible to every member of this organization.
Gets a channel with the iteration that it is currently assigned if any.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
bucket_slug
string
RequiredHuman-readable name for the bucket that the channel is associated with.
slug
string
RequiredHuman-readable name for the channel.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
Deletes a channel.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
bucket_slug
string
RequiredHuman-readable name for the bucket that the channel is associated with.
slug
string
RequiredHuman-readable name for the channel.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
Updates a channel to clear or point to a new iteration.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
bucket_slug
string
RequiredHuman-readable name for the bucket that the channel is associated with.
slug
string
RequiredHuman-readable name for the channel.
Body Parameters
incremental_version
integer
The human-readable version number assigned to this iteration.
iteration_id
string
ULID of the iteration. This was created and set by the HCP Packer registry when the iteration was created.
fingerprint
string
Fingerprint of the iteration set by Packer when you call packer build
.
Refer to the Packer documentation for more information on how this value is set.
The fingerprint can be used as an identifier for the iteration.
provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
region
string
region is the cloud region ("us-west1", "us-east1")
restriction
string
When set, will set the channel access in HCP Packer registry. The channel is unrestricted by default;
- RESTRICTED: Make the channel only visible to users with permission to create and manage.
- UNRESTRICTED: Make the channel visible to every member of this organization.
mask
string
When set, the service will only update the channel with attributes listed in the mask. For an empty mask list, all attributes will be updated according to their given value.
One or more of the iteration identifiers can be listed when updating the channel assignment. In this case, if paths for multiple iteration identifiers are present in the mask, the values of the equivalent fields must belong to the same iteration. NOTE: This is different from the behavior without a mask or with an empty mask, where the first non-zero identifier (in the order iterationId, fingerprint, incrementalVersion) is the only identifier used, and others are ignored.
Examples of usage:
- "incrementalVersion,iterationId,fingerprint"
- "restriction"
- "restriction,iterationId"
Lists a channel assignment history.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
bucket_slug
string
RequiredHuman-readable name for the bucket that the channel is associated with.
slug
string
RequiredHuman-readable name for the channel.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
pagination.page_size
integer
The max number of results per page that should be returned. If the number
of available results is larger than page_size
, a next_page_token
is
returned which can be used to get the next page of results in subsequent
requests. A value of zero will cause page_size
to be defaulted.
pagination.next_page_token
string
Specifies a page token to use to retrieve the next page. Set this to the
next_page_token
returned by previous list requests to get the next page of
results. If set, previous_page_token
must not be set.
pagination.previous_page_token
string
Specifies a page token to use to retrieve the previous page. Set this to
the previous_page_token
returned by previous list requests to get the
previous page of results. If set, next_page_token
must not be set.
Allows the user to get an iteration using one of the following identifiers:
- iteration_id
- incremental_version
- fingerprint
These are supplied as a query parameter (e.g.
images/{bucket_slug}/iteration?fingerprint={fingerprint}
).
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
bucket_slug
string
RequiredHuman-readable name for the bucket.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
incremental_version
integer
The human-readable version number assigned to this iteration.
iteration_id
string
ULID of the iteration.
fingerprint
string
Fingerprint of the iteration set by Packer when you call packer build
.
Refer to the Packer documentation for more information on how this value is set.
The fingerprint can be used as an identifier for the iteration.
Lists every existing iteration of a bucket.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
bucket_slug
string
RequiredHuman-readable name for the bucket.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
pagination.page_size
integer
The max number of results per page that should be returned. If the number
of available results is larger than page_size
, a next_page_token
is
returned which can be used to get the next page of results in subsequent
requests. A value of zero will cause page_size
to be defaulted.
pagination.next_page_token
string
Specifies a page token to use to retrieve the next page. Set this to the
next_page_token
returned by previous list requests to get the next page of
results. If set, previous_page_token
must not be set.
pagination.previous_page_token
string
Specifies a page token to use to retrieve the previous page. Set this to
the previous_page_token
returned by previous list requests to get the
previous page of results. If set, next_page_token
must not be set.
sorting.order_by
string[]
Creates an empty iteration to be written to. This API is called at the beginning of a new Packer build and does not create individual builds for the iteration.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
bucket_slug
string
RequiredHuman-readable name for the bucket.
Body Parameters
provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
region
string
region is the cloud region ("us-west1", "us-east1")
fingerprint
string
Fingerprint of the iteration set by Packer when you call packer build
.
Refer to the Packer documentation for more information on how this value is set.
The fingerprint can be used as an identifier for the iteration.
template_type
string
- TEMPLATE_TYPE_UNSET: TEMPLATE_TYPE_UNSET is a sentinel zero value so that an uninitialized value can be detected.
- HCL2: HCL2 configuration template; either pkr.hcl or pkr.json
- JSON: Legacy JSON configuration template
The type of Packer configuration template used to build this iteration.
Creates an image build in the provided image iteration. It is called once for each "build source" in a Packer build run. The request will error if the build for a given cloud provider already exists.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
bucket_slug
string
RequiredHuman-readable name for the bucket.
iteration_id
string
RequiredULID of the iteration that this build should be associated with.
Body Parameters
provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
region
string
region is the cloud region ("us-west1", "us-east1")
component_type
string
Internal Packer name for the builder or post-processor component used to build this. For example, "amazon-ebs" or "azure-arm"
packer_run_uuid
string
The UUID specific to this call to Packer build. If you use the manifest post-processor, this UUID will match the UUID present there.
image_id
string
ID or URL of the remote cloud image as given by a build.
region
string
Cloud-specific region as provided by packer build
. For example, "ap-east-1".
cloud_provider
string
The cloud provider that this build produced artifacts for. For example, AWS, GCP, or Azure.
status
string
Status of the build. The status can be RUNNING, DONE, CANCELLED, FAILED, or UNSET.
source_image_id
string
The ID or URL of the remote cloud source image. Used for tracking image dependencies for build pipelines.
source_iteration_id
string
The ID of the parent iteration associated with the source_image_id
.
When the source iteration ID is set, the source image ID should also be set.
source_channel_id
string
The ID of the channel that it was used to fetch the source_iteration_id. When the source channel ID is set, the source iteration ID should also be set.
labels
object
A key:value map for custom, user-settable metadata about your build.
fingerprint
string
Fingerprint of the iteration set by Packer when you call packer build
.
Refer to the Packer documentation for more information on how this value is set.
The fingerprint can be used as an identifier for the iteration.
Lists every existing build and its images for an iteration.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
bucket_slug
string
RequiredHuman-readable name for the bucket to list builds for.
iteration_id
string
RequiredULID of the iteration to list builds for.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
pagination.page_size
integer
The max number of results per page that should be returned. If the number
of available results is larger than page_size
, a next_page_token
is
returned which can be used to get the next page of results in subsequent
requests. A value of zero will cause page_size
to be defaulted.
pagination.next_page_token
string
Specifies a page token to use to retrieve the next page. Set this to the
next_page_token
returned by previous list requests to get the next page of
results. If set, previous_page_token
must not be set.
pagination.previous_page_token
string
Specifies a page token to use to retrieve the previous page. Set this to
the previous_page_token
returned by previous list requests to get the
previous page of results. If set, next_page_token
must not be set.
sorting.order_by
string[]
Deletes an iteration and all its information, such as its builds.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
iteration_id
string
RequiredULID of the iteration. This was created and set by the HCP Packer registry when the iteration was created.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
bucket_slug
string
Human-readable name for the bucket.
rollback_channels
boolean
When set to true, any user created channels will be rolled back to the last valid iteration they were assigned to.
This API can be used to revoke, restore, or complete an iteration. Revoking can be done at any time to complete or incomplete iterations, immediately or in the future depending on the passing timestamp. When an iteration is revoked, all its descendants will automatically get revoked unless 'skip_descendants_revocation' is set. Descendants will get revoked asynchronously to the request. Revoked iterations cannot be updated unless restored. To make build-specific updates for builds within the iteration, use the Update Build endpoint.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
iteration_id
string
RequiredULID of the iteration.
Body Parameters
provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
region
string
region is the cloud region ("us-west1", "us-east1")
bucket_slug
string
Human-readable name for the bucket.
complete
boolean
Set to "true" when all builds associated with this iteration have successfully completed and uploaded metadata to the registry. When "complete" is true, this iteration is considered ready to use, and can have channels assigned to it.
revocation_message
string
Optional field to provide the reason for why this iteration is being revoked.
revoke_at
string
revoke_at accepts strings in the RFC 3339 format to represent the revocation timestamp. To instantly revoke the iteration, provide the current timestamp. The revoke_at timestamp will always be recorded in UTC (Coordinated Universal Time). This option is equivalent to the 'revoke_in' option and therefore only one of them should be set when updating the iteration.
revoke_in
string
revoke_in accepts a signed sequence of decimal numbers with a unit suffix to represent the duration to the revocation date, such as '30d' or '2h45m'. Valid time units are 's', 'm', 'h', and 'd' as for seconds, minutes, hours, and days. To instantly revoke the iteration, provide the duration of zero seconds ("0s"). The revoke_in duration will be used to calculate the iteration revocation timestamp, which will be recorded as UTC (Coordinated Universal Time). This option is equivalent to the 'revoke_at' option and therefore only one of them should be set when updating the iteration.
restore
boolean
When set to true, will make a previously revoked iteration valid again.
skip_descendants_revocation
boolean
When set to true, the iteration's descendants won't inherit its revocation status.
rollback_channels
boolean
When set to true, any user created channels will be rolled back to the last valid iteration they were assigned to.
Gets a HCP Packer registry.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
Creates a HCP Packer registry and starts billing for it.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
Body Parameters
provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
region
string
region is the cloud region ("us-west1", "us-east1")
feature_tier
string
- PRIVATE_BETA: Deprecated
Feature tier of the Registry.
Deactivates an active HCP packer registry. Deactivating a registry will stop any additional billing for the resource.
Setting the hard_delete
param to true will delete the registry and any associated resources from the database.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")
hard_delete
boolean
When set to true, the registry will be deleted from database and recovery will no longer be possible.
Updates the feature tier of an HCP Packer registry.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
Body Parameters
provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
region
string
region is the cloud region ("us-west1", "us-east1")
feature_tier
string
- PRIVATE_BETA: Deprecated
Feature tier of the Registry. When trying to update a registry to the deprecated PRIVATE_BETA tier, HCP Packer will automatically update to STANDARD.
activate
boolean
Activates a deactivated registry. A registry can only be activated if the organization billing account is valid (e.g. valid credits or payment method).
Regenerates the HMAC key used to sign requests from Terraform Cloud to HCP Packer run tasks.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
Body Parameters
provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
region
string
region is the cloud region ("us-west1", "us-east1")
Gets the HCP Packer registry API URL and HMAC key to integrate with Terraform Cloud as a Run Task.
Path Parameters
location.organization_id
string
Requiredorganization_id is the id of the organization.
location.project_id
string
Requiredproject_id is the projects id.
task_type
string
RequiredThe HCP Packer Terraform Cloud run task type.
Currently, the only existing type is validation
.
Query Parameters
location.region.provider
string
provider is the named cloud provider ("aws", "gcp", "azure")
location.region.region
string
region is the cloud region ("us-west1", "us-east1")