Introduction
IBM Cloud® Container Registry provides a multi-tenant, highly available, and scalable private image registry that is hosted and managed by IBM. You can use the private registry by setting up your own image namespace and pushing container images to your namespace.
For more information about IBM Cloud Container Registry, see About IBM Cloud Container Registry.
For more information about IBM Cloud Kubernetes Service, see Getting started with IBM Cloud Kubernetes Service.
SDKs
SDKs for Java, Node, Python, and Go are available for this API. The client libraries that are provided by the SDKs implement best practices for using the API and reduce the amount of code that you need to write. The tab for each language includes code examples that demonstrate how to use the client libraries.
The code examples on this tab use the client library that is provided for Node.js.
npm install @ibm-cloud/ibm-container-registry
GitHub
The code examples on this tab use the client library that is provided for Go.
go get -u github.com/IBM/container-registry-go-sdk
GitHub
The code examples on this tab use the client library that is provided for Python.
pip install --upgrade "ibm-container-registry"
GitHub
The code examples on this tab use the client library that is provided for Java.
Gradle
compile group: 'com.ibm.cloud', name: 'container-registry', version: '1.+'
Maven
GitHub
Endpoint URL
The endpoint for the IBM Cloud Container Registry API is in the format: https://<registry_dns_name>
For example, the API endpoint for Dallas is: https://us.icr.io
To find out about the available IBM Cloud Container Registry DNS names, see Regions.
If you want to find the endpoint for the registry that you are currently targeting, run the ibmcloud cr api
command.
Authentication
Access to IBM Cloud Container Registry is controlled by using IBM Cloud Identity and Access Management (IAM), which provides a unified approach to managing user identities and access control across your IBM Cloud services and applications.
This API requires IBM Cloud Identity and Access Management (IAM) authentication. You must pass an IAM token in the Authorization header of the request. You can retrieve your IAM access token, which is prefixed with Bearer
, by running the ibmcloud iam oauth-tokens
command. You must also set the Account header to the unique ID for your IBM Cloud account. You can retrieve your Account ID by running the ibmcloud account show
command.
To call each method, you must be assigned a role that includes the required IAM actions. Each method lists the associated action. For more information about IAM actions and how they map to roles, see Managing access for IBM Cloud Container Registry.
Auditing
You can monitor API activity within your account by using the IBM Cloud Activity Tracker service. Whenever an API method is called, an event is generated that you can then track and audit from within Activity Tracker. The specific event type is listed for each individual method. For more information about how to track IBM Cloud Container Registry activity, see Auditing the events for Container Registry.
For more information about IAM actions and Activity Tracker actions by API method, see IAM and Activity Tracker actions by API method.
Error handling
The IBM Cloud Container Registry service uses standard HTTP response codes to indicate whether a method completed successfully.
- A
200
response always indicates success. - A
400
type response indicates a bad request that you must change before retrying. - A
500
type response usually indicates an internal system error.
Methods
Get authorization options
Get authorization options for the targeted account.
Get authorization options for the targeted account.
Get authorization options for the targeted account.
Get authorization options for the targeted account.
Get authorization options for the targeted account.
GET /api/v1/auth
(containerRegistry *ContainerRegistryV1) GetAuth(getAuthOptions *GetAuthOptions) (result *AuthOptions, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) GetAuthWithContext(ctx context.Context, getAuthOptions *GetAuthOptions) (result *AuthOptions, response *core.DetailedResponse, err error)
getAuth(params)
get_auth(
self,
**kwargs,
) -> DetailedResponse
ServiceCall<AuthOptions> getAuth(GetAuthOptions getAuthOptions)
Request
Instantiate the GetAuthOptions
struct and set the fields to provide parameter values for the GetAuth
method.
Use the GetAuthOptions.Builder
to create a GetAuthOptions
object that contains the parameter values for the getAuth
method.
Custom Headers
The unique ID for your IBM Cloud account.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
parameters
parameters
curl -X GET -H "accept: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" --url 'https://us.icr.io/api/v1/auth'
getAuthOptions := containerRegistryService.NewGetAuthOptions() authOptions, response, err := containerRegistryService.GetAuth(getAuthOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(authOptions, "", " ") fmt.Println(string(b))
containerRegistryService.getAuth({}) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
auth_options = container_registry_service.get_auth().get_result() print(json.dumps(auth_options, indent=2))
GetAuthOptions getAuthOptions = new GetAuthOptions(); Response<AuthOptions> response = service.getAuth(getAuthOptions).execute(); AuthOptions authOptions = response.getResult(); System.out.println(authOptions);
Response
The authorization options for the targeted IBM Cloud account
Enable role based authorization when authenticating with IBM Cloud IAM
Restrict account to only be able to push and pull images over private connections
The authorization options for the targeted IBM Cloud account.
Enable role based authorization when authenticating with IBM Cloud IAM.
Restrict account to only be able to push and pull images over private connections.
The authorization options for the targeted IBM Cloud account.
Enable role based authorization when authenticating with IBM Cloud IAM.
Restrict account to only be able to push and pull images over private connections.
The authorization options for the targeted IBM Cloud account.
Enable role based authorization when authenticating with IBM Cloud IAM.
Restrict account to only be able to push and pull images over private connections.
The authorization options for the targeted IBM Cloud account.
Enable role based authorization when authenticating with IBM Cloud IAM.
Restrict account to only be able to push and pull images over private connections.
Status Code
Success
A required header is missing. Correct the request and try again.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "iam_authz": true, "private_only": false }
{ "iam_authz": true, "private_only": false }
Update authorization options
Update authorization options for the targeted account.
Update authorization options for the targeted account.
Update authorization options for the targeted account.
Update authorization options for the targeted account.
Update authorization options for the targeted account.
PATCH /api/v1/auth
(containerRegistry *ContainerRegistryV1) UpdateAuth(updateAuthOptions *UpdateAuthOptions) (response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) UpdateAuthWithContext(ctx context.Context, updateAuthOptions *UpdateAuthOptions) (response *core.DetailedResponse, err error)
updateAuth(params)
update_auth(
self,
*,
iam_authz: bool = None,
private_only: bool = None,
**kwargs,
) -> DetailedResponse
ServiceCall<Void> updateAuth(UpdateAuthOptions updateAuthOptions)
Request
Instantiate the UpdateAuthOptions
struct and set the fields to provide parameter values for the UpdateAuth
method.
Use the UpdateAuthOptions.Builder
to create a UpdateAuthOptions
object that contains the parameter values for the updateAuth
method.
Custom Headers
The unique ID for your IBM Cloud account.
A JSON document containing the requested updates.
{
"iam_authz": true
}
Enable role based authorization when authenticating with IBM Cloud IAM
Restrict account to only be able to push and pull images over private connections
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdateAuth options.
Enable role based authorization when authenticating with IBM Cloud IAM.
Examples:true
Restrict account to only be able to push and pull images over private connections.
parameters
Enable role based authorization when authenticating with IBM Cloud IAM.
Examples:Restrict account to only be able to push and pull images over private connections.
parameters
Enable role based authorization when authenticating with IBM Cloud IAM.
Examples:Restrict account to only be able to push and pull images over private connections.
The updateAuth options.
Enable role based authorization when authenticating with IBM Cloud IAM.
Examples:true
Restrict account to only be able to push and pull images over private connections.
curl -X PATCH -H "Content-Type: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" -d "{\"iam_authz\":true}" --url 'https://us.icr.io/api/v1/auth'
updateAuthOptions := containerRegistryService.NewUpdateAuthOptions() updateAuthOptions.SetIamAuthz(true) response, err := containerRegistryService.UpdateAuth(updateAuthOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from UpdateAuth(): %d\n", response.StatusCode) }
const params = { iamAuthz: true, }; containerRegistryService.updateAuth(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
response = container_registry_service.update_auth( iam_authz=True ).get_result() print(json.dumps(response, indent=2))
UpdateAuthOptions updateAuthOptions = new UpdateAuthOptions.Builder() .iamAuthz(true) .build(); service.updateAuth(updateAuthOptions).execute();
Response
Status Code
Success
A required header is missing or invalid. Correct the request and try again.
You do not have access to perform the requested operation. You must have either Manager or Billing Manager roles on the targeted account to perform this action.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
No Sample Response
List images
List all images in namespaces in a targeted IBM Cloud account.
List all images in namespaces in a targeted IBM Cloud account.
List all images in namespaces in a targeted IBM Cloud account.
List all images in namespaces in a targeted IBM Cloud account.
List all images in namespaces in a targeted IBM Cloud account.
GET /api/v1/images
(containerRegistry *ContainerRegistryV1) ListImages(listImagesOptions *ListImagesOptions) (result []RemoteAPIImage, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) ListImagesWithContext(ctx context.Context, listImagesOptions *ListImagesOptions) (result []RemoteAPIImage, response *core.DetailedResponse, err error)
listImages(params)
list_images(
self,
*,
namespace: str = None,
include_ibm: bool = None,
include_private: bool = None,
include_manifest_lists: bool = None,
vulnerabilities: bool = None,
repository: str = None,
**kwargs,
) -> DetailedResponse
ServiceCall<List<RemoteAPIImage>> listImages(ListImagesOptions listImagesOptions)
Request
Instantiate the ListImagesOptions
struct and set the fields to provide parameter values for the ListImages
method.
Use the ListImagesOptions.Builder
to create a ListImagesOptions
object that contains the parameter values for the listImages
method.
Custom Headers
The unique ID for your IBM Cloud account.
Query Parameters
Lists images that are stored in the specified namespace only. Query multiple namespaces by specifying this option for each namespace. If this option is not specified, images from all namespaces in the specified IBM Cloud account are listed.
Includes IBM-provided public images in the list of images. If this option is not specified, private images are listed only. If this option is specified more than once, the last parsed setting is the setting that is used.
Includes private images in the list of images. If this option is not specified, private images are listed. If this option is specified more than once, the last parsed setting is the setting that is used.
Includes tags that reference multi-architecture manifest lists in the image list. If this option is not specified, tagged manifest lists are not shown in the list. If this option is specified more than once, the last parsed setting is the setting that is used.
Displays Vulnerability Advisor status for the listed images. If this option is specified more than once, the last parsed setting is the setting that is used.
Lists images that are stored in the specified repository, under your namespaces. Query multiple repositories by specifying this option for each repository. If this option is not specified, images from all repos are listed.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListImages options.
Lists images that are stored in the specified namespace only. Query multiple namespaces by specifying this option for each namespace. If this option is not specified, images from all namespaces in the specified IBM Cloud account are listed.
Includes IBM-provided public images in the list of images. If this option is not specified, private images are listed only. If this option is specified more than once, the last parsed setting is the setting that is used.
Includes private images in the list of images. If this option is not specified, private images are listed. If this option is specified more than once, the last parsed setting is the setting that is used.
Includes tags that reference multi-architecture manifest lists in the image list. If this option is not specified, tagged manifest lists are not shown in the list. If this option is specified more than once, the last parsed setting is the setting that is used.
Displays Vulnerability Advisor status for the listed images. If this option is specified more than once, the last parsed setting is the setting that is used.
Lists images that are stored in the specified repository, under your namespaces. Query multiple repositories by specifying this option for each repository. If this option is not specified, images from all repos are listed.
parameters
Lists images that are stored in the specified namespace only. Query multiple namespaces by specifying this option for each namespace. If this option is not specified, images from all namespaces in the specified IBM Cloud account are listed.
Includes IBM-provided public images in the list of images. If this option is not specified, private images are listed only. If this option is specified more than once, the last parsed setting is the setting that is used.
Includes private images in the list of images. If this option is not specified, private images are listed. If this option is specified more than once, the last parsed setting is the setting that is used.
Includes tags that reference multi-architecture manifest lists in the image list. If this option is not specified, tagged manifest lists are not shown in the list. If this option is specified more than once, the last parsed setting is the setting that is used.
Displays Vulnerability Advisor status for the listed images. If this option is specified more than once, the last parsed setting is the setting that is used.
Lists images that are stored in the specified repository, under your namespaces. Query multiple repositories by specifying this option for each repository. If this option is not specified, images from all repos are listed.
parameters
Lists images that are stored in the specified namespace only. Query multiple namespaces by specifying this option for each namespace. If this option is not specified, images from all namespaces in the specified IBM Cloud account are listed.
Includes IBM-provided public images in the list of images. If this option is not specified, private images are listed only. If this option is specified more than once, the last parsed setting is the setting that is used.
Includes private images in the list of images. If this option is not specified, private images are listed. If this option is specified more than once, the last parsed setting is the setting that is used.
Includes tags that reference multi-architecture manifest lists in the image list. If this option is not specified, tagged manifest lists are not shown in the list. If this option is specified more than once, the last parsed setting is the setting that is used.
Displays Vulnerability Advisor status for the listed images. If this option is specified more than once, the last parsed setting is the setting that is used.
Lists images that are stored in the specified repository, under your namespaces. Query multiple repositories by specifying this option for each repository. If this option is not specified, images from all repos are listed.
The listImages options.
Lists images that are stored in the specified namespace only. Query multiple namespaces by specifying this option for each namespace. If this option is not specified, images from all namespaces in the specified IBM Cloud account are listed.
Includes IBM-provided public images in the list of images. If this option is not specified, private images are listed only. If this option is specified more than once, the last parsed setting is the setting that is used.
Includes private images in the list of images. If this option is not specified, private images are listed. If this option is specified more than once, the last parsed setting is the setting that is used.
Includes tags that reference multi-architecture manifest lists in the image list. If this option is not specified, tagged manifest lists are not shown in the list. If this option is specified more than once, the last parsed setting is the setting that is used.
Displays Vulnerability Advisor status for the listed images. If this option is specified more than once, the last parsed setting is the setting that is used.
Lists images that are stored in the specified repository, under your namespaces. Query multiple repositories by specifying this option for each repository. If this option is not specified, images from all repos are listed.
curl -X GET -H "accept: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" --url 'https://us.icr.io/api/v1/images?includeIBM=false&includePrivate=true&includeManifestLists=true&vulnerabilities=true'
listImagesOptions := containerRegistryService.NewListImagesOptions() remoteAPIImage, response, err := containerRegistryService.ListImages(listImagesOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(remoteAPIImage, "", " ") fmt.Println(string(b))
containerRegistryService.listImages({}) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
list_remote_api_image = container_registry_service.list_images().get_result() print(json.dumps(list_remote_api_image, indent=2))
ListImagesOptions listImagesOptions = new ListImagesOptions.Builder() .build(); Response<List<RemoteAPIImage>> response = service.listImages(listImagesOptions).execute(); List<RemoteAPIImage> listRemoteApiImage = response.getResult(); System.out.println(listRemoteApiImage);
Response
Response type: []RemoteAPIImage
Response type: RemoteAPIImage[]
Response type: List[RemoteAPIImage]
Response type: List<RemoteAPIImage>
Information about an image, in a format consistent with the Docker Remote API format.
- DigestTags
A list of tags for an image.
- Labels
Status Code
Success
A required header is missing. Correct the request and try again.
You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again.
You do not have access to the specified namespace. Choose another namespace.
No namespaces were found for the targeted account. Add a namespace or target a different account. Alternatively, specify the option to include IBM-provided public images.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
[ { "Id": "sha256:11106fafa8005fdcf4641634220afe7bda9e6d86136d0c47902ff17d3324aaaa", "ParentId": "", "DigestTags": { "sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bbbb": [ "us.icr.io/birds/woodpecker:greaterspotted" ] }, "RepoTags": [ "us.icr.io/birds/woodpecker:greaterspotted" ], "RepoDigests": [ "us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bbbb" ], "Created": 1588672695, "Size": 760854, "VirtualSize": 760854, "Labels": { "key": "value" }, "Vulnerable": "true", "VulnerabilityCount": 3, "ConfigurationIssueCount": 0, "IssueCount": 3, "ExemptIssueCount": 0, "ManifestType": "application/vnd.docker.distribution.manifest.v2+json" }, { "Id": "sha256:25877264d5cb6b656bd630431369c01a0969cb16c88103792036ed2a6599cccc", "ParentId": "", "DigestTags": { "sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd": [ "us.icr.io/birds/woodpecker:green", "us.icr.io/birds/woodpecker:latest", "us.icr.io/birds/bird:greenwoodpecker", "us.icr.io/favouritebirds/woodpecker:green" ] }, "RepoTags": [ "us.icr.io/birds/woodpecker:green", "us.icr.io/birds/woodpecker:latest", "us.icr.io/birds/bird:greenwoodpecker", "us.icr.io/favouritebirds/woodpecker:green" ], "RepoDigests": [ "us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd", "us.icr.io/birds/bird@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd", "us.icr.io/favouritebirds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd" ], "Created": 1520977035, "Size": 9541618, "VirtualSize": 9541618, "Labels": { "key": "value" }, "Vulnerable": "false", "VulnerabilityCount": 0, "ConfigurationIssueCount": 0, "IssueCount": 0, "ExemptIssueCount": 0, "ManifestType": "application/vnd.docker.distribution.manifest.v2+json" } ]
[ { "Id": "sha256:11106fafa8005fdcf4641634220afe7bda9e6d86136d0c47902ff17d3324aaaa", "ParentId": "", "DigestTags": { "sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bbbb": [ "us.icr.io/birds/woodpecker:greaterspotted" ] }, "RepoTags": [ "us.icr.io/birds/woodpecker:greaterspotted" ], "RepoDigests": [ "us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bbbb" ], "Created": 1588672695, "Size": 760854, "VirtualSize": 760854, "Labels": { "key": "value" }, "Vulnerable": "true", "VulnerabilityCount": 3, "ConfigurationIssueCount": 0, "IssueCount": 3, "ExemptIssueCount": 0, "ManifestType": "application/vnd.docker.distribution.manifest.v2+json" }, { "Id": "sha256:25877264d5cb6b656bd630431369c01a0969cb16c88103792036ed2a6599cccc", "ParentId": "", "DigestTags": { "sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd": [ "us.icr.io/birds/woodpecker:green", "us.icr.io/birds/woodpecker:latest", "us.icr.io/birds/bird:greenwoodpecker", "us.icr.io/favouritebirds/woodpecker:green" ] }, "RepoTags": [ "us.icr.io/birds/woodpecker:green", "us.icr.io/birds/woodpecker:latest", "us.icr.io/birds/bird:greenwoodpecker", "us.icr.io/favouritebirds/woodpecker:green" ], "RepoDigests": [ "us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd", "us.icr.io/birds/bird@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd", "us.icr.io/favouritebirds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd" ], "Created": 1520977035, "Size": 9541618, "VirtualSize": 9541618, "Labels": { "key": "value" }, "Vulnerable": "false", "VulnerabilityCount": 0, "ConfigurationIssueCount": 0, "IssueCount": 0, "ExemptIssueCount": 0, "ManifestType": "application/vnd.docker.distribution.manifest.v2+json" } ]
Bulk delete images
Remove multiple container images from the registry.
Remove multiple container images from the registry.
Remove multiple container images from the registry.
Remove multiple container images from the registry.
Remove multiple container images from the registry.
POST /api/v1/images/bulkdelete
(containerRegistry *ContainerRegistryV1) BulkDeleteImages(bulkDeleteImagesOptions *BulkDeleteImagesOptions) (result *ImageBulkDeleteResult, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) BulkDeleteImagesWithContext(ctx context.Context, bulkDeleteImagesOptions *BulkDeleteImagesOptions) (result *ImageBulkDeleteResult, response *core.DetailedResponse, err error)
bulkDeleteImages(params)
bulk_delete_images(
self,
bulk_delete: List[str],
**kwargs,
) -> DetailedResponse
ServiceCall<ImageBulkDeleteResult> bulkDeleteImages(BulkDeleteImagesOptions bulkDeleteImagesOptions)
Request
Instantiate the BulkDeleteImagesOptions
struct and set the fields to provide parameter values for the BulkDeleteImages
method.
Use the BulkDeleteImagesOptions.Builder
to create a BulkDeleteImagesOptions
object that contains the parameter values for the bulkDeleteImages
method.
Custom Headers
The unique ID for your IBM Cloud account.
The full IBM Cloud registry path to the images that you want to delete, including its digest. All tags for the supplied digest are removed.
[
"us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bbbb",
"us.icr.io/birds/bird@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd"
]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The BulkDeleteImages options.
The full IBM Cloud registry path to the images that you want to delete, including its digest. All tags for the supplied digest are removed.
Examples:[ "us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bbbb", "us.icr.io/birds/bird@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd" ]
parameters
The full IBM Cloud registry path to the images that you want to delete, including its digest. All tags for the supplied digest are removed.
Examples:
parameters
The full IBM Cloud registry path to the images that you want to delete, including its digest. All tags for the supplied digest are removed.
Examples:
The bulkDeleteImages options.
The full IBM Cloud registry path to the images that you want to delete, including its digest. All tags for the supplied digest are removed.
Examples:[ "us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bbbb", "us.icr.io/birds/bird@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd" ]
curl -X POST -H "accept: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" -H "Content-Type: application/json" -d "[\"us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bbbb\",\"us.icr.io/birds/bird@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd\"]" --url 'https://us.icr.io/api/v1/images/bulkdelete'
bulkDeleteImagesOptions := containerRegistryService.NewBulkDeleteImagesOptions( []string{"image name"}, ) imageBulkDeleteResult, response, err := containerRegistryService.BulkDeleteImages(bulkDeleteImagesOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(imageBulkDeleteResult, "", " ") fmt.Println(string(b))
const params = { bulkDelete: ['image name'], }; containerRegistryService.bulkDeleteImages(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
image_bulk_delete_result = container_registry_service.bulk_delete_images( bulk_delete=['image name'] ).get_result() print(json.dumps(image_bulk_delete_result, indent=2))
BulkDeleteImagesOptions bulkDeleteImagesOptions = new BulkDeleteImagesOptions.Builder() .bulkDelete(new java.util.ArrayList<String>(java.util.Arrays.asList("image name"))) .build(); Response<ImageBulkDeleteResult> response = service.bulkDeleteImages(bulkDeleteImagesOptions).execute(); ImageBulkDeleteResult imageBulkDeleteResult = response.getResult(); System.out.println(imageBulkDeleteResult);
Response
The results of a bulk image delete request.
A map of digests to the error object that explains the failure.
- error
Information about a failure to delete an image as part of a bulk delete.
A list of digests which were deleted successfully.
The results of a bulk image delete request.
A map of digests to the error object that explains the failure.
- Error
An API error code.
The English text message associated with the error code.
A list of digests which were deleted successfully.
The results of a bulk image delete request.
A map of digests to the error object that explains the failure.
- error
An API error code.
The English text message associated with the error code.
A list of digests which were deleted successfully.
The results of a bulk image delete request.
A map of digests to the error object that explains the failure.
- error
An API error code.
The English text message associated with the error code.
A list of digests which were deleted successfully.
The results of a bulk image delete request.
A map of digests to the error object that explains the failure.
- error
An API error code.
The English text message associated with the error code.
A list of digests which were deleted successfully.
Status Code
Success
A required header is missing. Correct the request and try again.
You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "success": [ "us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bbbb" ], "error": { "us.icr.io/birds/bird@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bdbd": { "code": "CRI0103E", "message": "The image was not found. Correct the image name or digest reference, and try again." } } }
{ "success": [ "us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bbbb" ], "error": { "us.icr.io/birds/bird@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bdbd": { "code": "CRI0103E", "message": "The image was not found. Correct the image name or digest reference, and try again." } } }
List images by digest
List all images by digest in namespaces in a targeted IBM Cloud account.
List all images by digest in namespaces in a targeted IBM Cloud account.
List all images by digest in namespaces in a targeted IBM Cloud account.
List all images by digest in namespaces in a targeted IBM Cloud account.
List all images by digest in namespaces in a targeted IBM Cloud account.
POST /api/v1/images/digests
(containerRegistry *ContainerRegistryV1) ListImageDigests(listImageDigestsOptions *ListImageDigestsOptions) (result []ImageDigest, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) ListImageDigestsWithContext(ctx context.Context, listImageDigestsOptions *ListImageDigestsOptions) (result []ImageDigest, response *core.DetailedResponse, err error)
listImageDigests(params)
list_image_digests(
self,
*,
exclude_tagged: bool = None,
exclude_va: bool = None,
include_ibm: bool = None,
repositories: List[str] = None,
**kwargs,
) -> DetailedResponse
ServiceCall<List<ImageDigest>> listImageDigests(ListImageDigestsOptions listImageDigestsOptions)
Request
Instantiate the ListImageDigestsOptions
struct and set the fields to provide parameter values for the ListImageDigests
method.
Use the ListImageDigestsOptions.Builder
to create a ListImageDigestsOptions
object that contains the parameter values for the listImageDigests
method.
Custom Headers
The unique ID for your IBM Cloud account.
A JSON document containing the list options.
{
"exclude_tagged": false,
"exclude_va": false,
"include_ibm": false
}
ExcludeTagged returns only untagged digests
ExcludeVA returns the digest list with no VA scan results
When true, API will return the IBM public images if they exist in the targeted region.
Repositories in which to restrict the output. If left empty all images for the account will be returned.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListImageDigests options.
ExcludeTagged returns only untagged digests.
Examples:false
ExcludeVA returns the digest list with no VA scan results.
Examples:false
When true, API will return the IBM public images if they exist in the targeted region.
Examples:false
Repositories in which to restrict the output. If left empty all images for the account will be returned.
parameters
ExcludeTagged returns only untagged digests.
Examples:ExcludeVA returns the digest list with no VA scan results.
Examples:When true, API will return the IBM public images if they exist in the targeted region.
Examples:Repositories in which to restrict the output. If left empty all images for the account will be returned.
parameters
ExcludeTagged returns only untagged digests.
Examples:ExcludeVA returns the digest list with no VA scan results.
Examples:When true, API will return the IBM public images if they exist in the targeted region.
Examples:Repositories in which to restrict the output. If left empty all images for the account will be returned.
The listImageDigests options.
ExcludeTagged returns only untagged digests.
Examples:false
ExcludeVA returns the digest list with no VA scan results.
Examples:false
When true, API will return the IBM public images if they exist in the targeted region.
Examples:false
Repositories in which to restrict the output. If left empty all images for the account will be returned.
curl -X POST -H "accept: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" -H "Content-Type: application/json" -d "{\"exclude_tagged\":false,\"exclude_va\":false,\"include_ibm\":false,\"repositories\":null}" --url 'https://us.icr.io/api/v1/images/digests'
listImageDigestsOptions := containerRegistryService.NewListImageDigestsOptions() listImageDigestsOptions.SetExcludeTagged(false) listImageDigestsOptions.SetExcludeVa(false) listImageDigestsOptions.SetIncludeIBM(false) imageDigest, response, err := containerRegistryService.ListImageDigests(listImageDigestsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(imageDigest, "", " ") fmt.Println(string(b))
const params = { excludeTagged: false, excludeVa: false, includeIbm: false, }; containerRegistryService.listImageDigests(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
list_image_digest = container_registry_service.list_image_digests( exclude_tagged=False, exclude_va=False, include_ibm=False ).get_result() print(json.dumps(list_image_digest, indent=2))
ListImageDigestsOptions listImageDigestsOptions = new ListImageDigestsOptions.Builder() .excludeTagged(false) .excludeVa(false) .includeIbm(false) .build(); Response<List<ImageDigest>> response = service.listImageDigests(listImageDigestsOptions).execute(); List<ImageDigest> listImageDigest = response.getResult(); System.out.println(listImageDigest);
Response
Response type: []ImageDigest
Response type: ImageDigest[]
Response type: List[ImageDigest]
Response type: List<ImageDigest>
An array of image objects
The build date of the image
The image digest
The type of the image, such as 'Docker Image Manifest V2, Schema 2' or 'OCI Image Manifest v1'
A map of image repositories to tags
- repoTags
A map of tags to Vulnerability Advisor reports
- any property
The VA Report for a given image
The size of the image in bytes
Status Code
Success
A required header is missing. Correct the request and try again.
You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again.
You do not have access to the specified namespace. Choose another namespace.
No namespaces were found for the targeted account. Add a namespace or target a different account. Alternatively, specify the option to include IBM-provided public images.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
[ { "id": "sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bbbb", "repoTags": { "us.icr.io/birds/woodpecker": { "greaterspotted": { "vulnerable": "true", "vulnerabilityCount": 3, "configurationIssueCount": 0, "issueCount": 3, "exemptIssueCount": 0 } } }, "created": 1568815884, "size": 6762886, "manifestType": "application/vnd.docker.distribution.manifest.v2+json" }, { "id": "sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd", "repoTags": { "us.icr.io/birds/woodpecker": { "green": { "vulnerable": "false", "vulnerabilityCount": 0, "configurationIssueCount": 0, "issueCount": 0, "exemptIssueCount": 0 }, "latest": { "vulnerable": "false", "vulnerabilityCount": 0, "configurationIssueCount": 0, "issueCount": 0, "exemptIssueCount": 0 } }, "us.icr.io/birds/bird": { "greenwoodpecker": { "vulnerable": "false", "vulnerabilityCount": 0, "configurationIssueCount": 0, "issueCount": 0, "exemptIssueCount": 0 } }, "us.icr.io/favouritebirds/woodpecker": { "green": { "vulnerable": "false", "vulnerabilityCount": 0, "configurationIssueCount": 0, "issueCount": 0, "exemptIssueCount": 0 } } }, "created": 1546305670, "size": 755724, "manifestType": "application/vnd.docker.distribution.manifest.v2+json" } ]
[ { "id": "sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bbbb", "repoTags": { "us.icr.io/birds/woodpecker": { "greaterspotted": { "vulnerable": "true", "vulnerabilityCount": 3, "configurationIssueCount": 0, "issueCount": 3, "exemptIssueCount": 0 } } }, "created": 1568815884, "size": 6762886, "manifestType": "application/vnd.docker.distribution.manifest.v2+json" }, { "id": "sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd", "repoTags": { "us.icr.io/birds/woodpecker": { "green": { "vulnerable": "false", "vulnerabilityCount": 0, "configurationIssueCount": 0, "issueCount": 0, "exemptIssueCount": 0 }, "latest": { "vulnerable": "false", "vulnerabilityCount": 0, "configurationIssueCount": 0, "issueCount": 0, "exemptIssueCount": 0 } }, "us.icr.io/birds/bird": { "greenwoodpecker": { "vulnerable": "false", "vulnerabilityCount": 0, "configurationIssueCount": 0, "issueCount": 0, "exemptIssueCount": 0 } }, "us.icr.io/favouritebirds/woodpecker": { "green": { "vulnerable": "false", "vulnerabilityCount": 0, "configurationIssueCount": 0, "issueCount": 0, "exemptIssueCount": 0 } } }, "created": 1546305670, "size": 755724, "manifestType": "application/vnd.docker.distribution.manifest.v2+json" } ]
Create tag
Create a new tag in a private registry that refers to an existing image in the same region. If the fromimage has Red Hat® signatures and the toimage is in a different repository, those signatures are copied to that repository.
Create a new tag in a private registry that refers to an existing image in the same region. If the fromimage has Red Hat® signatures and the toimage is in a different repository, those signatures are copied to that repository.
Create a new tag in a private registry that refers to an existing image in the same region. If the fromimage has Red Hat® signatures and the toimage is in a different repository, those signatures are copied to that repository.
Create a new tag in a private registry that refers to an existing image in the same region. If the fromimage has Red Hat® signatures and the toimage is in a different repository, those signatures are copied to that repository.
Create a new tag in a private registry that refers to an existing image in the same region. If the fromimage has Red Hat® signatures and the toimage is in a different repository, those signatures are copied to that repository.
POST /api/v1/images/tags
(containerRegistry *ContainerRegistryV1) TagImage(tagImageOptions *TagImageOptions) (response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) TagImageWithContext(ctx context.Context, tagImageOptions *TagImageOptions) (response *core.DetailedResponse, err error)
tagImage(params)
tag_image(
self,
fromimage: str,
toimage: str,
**kwargs,
) -> DetailedResponse
ServiceCall<Void> tagImage(TagImageOptions tagImageOptions)
Request
Instantiate the TagImageOptions
struct and set the fields to provide parameter values for the TagImage
method.
Use the TagImageOptions.Builder
to create a TagImageOptions
object that contains the parameter values for the tagImage
method.
Custom Headers
The unique ID for your IBM Cloud account.
Query Parameters
The name of the image that you want to create a new tag for, in the format <REPOSITORY>:<TAG>. Run
ibmcloud cr images
or call theGET /images/json
endpoint to review images that are in the registry.The new tag for the image, in the format <REPOSITORY>:<TAG>.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The TagImage options.
The name of the image that you want to create a new tag for, in the format <REPOSITORY>:<TAG>. Run
ibmcloud cr images
or call theGET /images/json
endpoint to review images that are in the registry.The new tag for the image, in the format <REPOSITORY>:<TAG>.
parameters
The name of the image that you want to create a new tag for, in the format <REPOSITORY>:<TAG>. Run
ibmcloud cr images
or call theGET /images/json
endpoint to review images that are in the registry.The new tag for the image, in the format <REPOSITORY>:<TAG>.
parameters
The name of the image that you want to create a new tag for, in the format <REPOSITORY>:<TAG>. Run
ibmcloud cr images
or call theGET /images/json
endpoint to review images that are in the registry.The new tag for the image, in the format <REPOSITORY>:<TAG>.
The tagImage options.
The name of the image that you want to create a new tag for, in the format <REPOSITORY>:<TAG>. Run
ibmcloud cr images
or call theGET /images/json
endpoint to review images that are in the registry.The new tag for the image, in the format <REPOSITORY>:<TAG>.
curl -X POST -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" -H "Content-Type: application/json" --url 'https://us.icr.io/api/v1/images/tags?fromimage=us.icr.io%2Fbirds%2Fwoodpecker%3Agreen&toimage=us.icr.io%2Fbirds%2Fwoodpecker%3Alatest'
tagImageOptions := containerRegistryService.NewTagImageOptions( "from image name", "to image name", ) response, err := containerRegistryService.TagImage(tagImageOptions) if err != nil { panic(err) } if response.StatusCode != 201 { fmt.Printf("\nUnexpected response status code received from TagImage(): %d\n", response.StatusCode) }
const params = { fromimage: 'from image name', toimage: 'to image name', }; containerRegistryService.tagImage(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
response = container_registry_service.tag_image( fromimage='from image name', toimage='to image name' ).get_result() print(json.dumps(response, indent=2))
TagImageOptions tagImageOptions = new TagImageOptions.Builder() .fromimage("from image name") .toimage("to image name") .build(); service.tagImage(tagImageOptions).execute();
Response
Status Code
Success
There was a problem with the input. Correct the request and try again.
You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again.
You do not have authorization to access the specified namespace.
An internal server error occurred
No Sample Response
Delete image
Delete a container image from the registry.
Delete a container image from the registry.
Delete a container image from the registry.
Delete a container image from the registry.
Delete a container image from the registry.
DELETE /api/v1/images/{image}
(containerRegistry *ContainerRegistryV1) DeleteImage(deleteImageOptions *DeleteImageOptions) (result *ImageDeleteResult, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) DeleteImageWithContext(ctx context.Context, deleteImageOptions *DeleteImageOptions) (result *ImageDeleteResult, response *core.DetailedResponse, err error)
deleteImage(params)
delete_image(
self,
image: str,
**kwargs,
) -> DetailedResponse
ServiceCall<ImageDeleteResult> deleteImage(DeleteImageOptions deleteImageOptions)
Request
Instantiate the DeleteImageOptions
struct and set the fields to provide parameter values for the DeleteImage
method.
Use the DeleteImageOptions.Builder
to create a DeleteImageOptions
object that contains the parameter values for the deleteImage
method.
Custom Headers
The unique ID for your IBM Cloud account.
Path Parameters
The full IBM Cloud registry path to the image that you want to delete, including its tag. If you do not provide a specific tag, the version with the
latest
tag is removed.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteImage options.
The full IBM Cloud registry path to the image that you want to delete, including its tag. If you do not provide a specific tag, the version with the
latest
tag is removed.
parameters
The full IBM Cloud registry path to the image that you want to delete, including its tag. If you do not provide a specific tag, the version with the
latest
tag is removed.
parameters
The full IBM Cloud registry path to the image that you want to delete, including its tag. If you do not provide a specific tag, the version with the
latest
tag is removed.
The deleteImage options.
The full IBM Cloud registry path to the image that you want to delete, including its tag. If you do not provide a specific tag, the version with the
latest
tag is removed.
curl -X DELETE -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" -H "accept: application/json" --url 'https://us.icr.io/api/v1/images/us.icr.io%2Fbirds%2Fdodo%3Alatest'
deleteImageOptions := containerRegistryService.NewDeleteImageOptions( "image name", ) imageDeleteResult, response, err := containerRegistryService.DeleteImage(deleteImageOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(imageDeleteResult, "", " ") fmt.Println(string(b))
const params = { image: 'image name', }; containerRegistryService.deleteImage(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
image_delete_result = container_registry_service.delete_image( image='image name' ).get_result() print(json.dumps(image_delete_result, indent=2))
DeleteImageOptions deleteImageOptions = new DeleteImageOptions.Builder() .image("image name") .build(); Response<ImageDeleteResult> response = service.deleteImage(deleteImageOptions).execute(); ImageDeleteResult imageDeleteResult = response.getResult(); System.out.println(imageDeleteResult);
Response
Status Code
Success
A required header is missing. Correct the request and try again.
You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again.
You do not have authorization to access the specified namespace.
The specified image was not found. Check the spelling of the specified image.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "Untagged": "sha256:b44b210e565c7871aed1c1155527ca0782be82153f9ebe12786e7b992151dddd" }
{ "Untagged": "sha256:b44b210e565c7871aed1c1155527ca0782be82153f9ebe12786e7b992151dddd" }
Inspect an image
Inspect a container image in the private registry.
Inspect a container image in the private registry.
Inspect a container image in the private registry.
Inspect a container image in the private registry.
Inspect a container image in the private registry.
GET /api/v1/images/{image}/json
(containerRegistry *ContainerRegistryV1) InspectImage(inspectImageOptions *InspectImageOptions) (result *ImageInspection, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) InspectImageWithContext(ctx context.Context, inspectImageOptions *InspectImageOptions) (result *ImageInspection, response *core.DetailedResponse, err error)
inspectImage(params)
inspect_image(
self,
image: str,
**kwargs,
) -> DetailedResponse
ServiceCall<ImageInspection> inspectImage(InspectImageOptions inspectImageOptions)
Request
Instantiate the InspectImageOptions
struct and set the fields to provide parameter values for the InspectImage
method.
Use the InspectImageOptions.Builder
to create a InspectImageOptions
object that contains the parameter values for the inspectImage
method.
Custom Headers
The unique ID for your IBM Cloud account.
Path Parameters
The full IBM Cloud registry path to the image that you want to inspect. Run
ibmcloud cr images
or call theGET /images/json
endpoint to review images that are in the registry.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The InspectImage options.
The full IBM Cloud registry path to the image that you want to inspect. Run
ibmcloud cr images
or call theGET /images/json
endpoint to review images that are in the registry.
parameters
The full IBM Cloud registry path to the image that you want to inspect. Run
ibmcloud cr images
or call theGET /images/json
endpoint to review images that are in the registry.
parameters
The full IBM Cloud registry path to the image that you want to inspect. Run
ibmcloud cr images
or call theGET /images/json
endpoint to review images that are in the registry.
The inspectImage options.
The full IBM Cloud registry path to the image that you want to inspect. Run
ibmcloud cr images
or call theGET /images/json
endpoint to review images that are in the registry.
curl -X GET -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" -H "accept: application/json" --url 'https://us.icr.io/api/v1/images/us.icr.io%2Fbirds%2Fwoodpecker%3Agreen/json'
inspectImageOptions := containerRegistryService.NewInspectImageOptions( "image name", ) imageInspection, response, err := containerRegistryService.InspectImage(inspectImageOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(imageInspection, "", " ") fmt.Println(string(b))
const params = { image: 'image name', }; containerRegistryService.inspectImage(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
image_inspection = container_registry_service.inspect_image( image='image name' ).get_result() print(json.dumps(image_inspection, indent=2))
InspectImageOptions inspectImageOptions = new InspectImageOptions.Builder() .image("image name") .build(); Response<ImageInspection> response = service.inspectImage(inspectImageOptions).execute(); ImageInspection imageInspection = response.getResult(); System.out.println(imageInspection);
Response
An image JSON output consistent with the Docker Remote API
The processor architecture used to build this image, and required to run it
The author of the image
A plain text description of the image
The configuration data about a container.
The ID of the container which created this image
The configuration data about a container.
The unix timestamp for the date when the image was created
The Docker version used to build this image
The image ID
Media type of the manifest for the image
The operating system family used to build this image, and required to run it
The version of the operating system used to build this image
The ID of the base image for this image
RootFS contains information about the root filesystem of a container image
The size of the image in bytes
The sum of the size of each layer in the image in bytes
An image JSON output consistent with the Docker Remote API.
The processor architecture used to build this image, and required to run it.
The author of the image.
A plain text description of the image.
The configuration data about a container.
- Config
True if command is already escaped (Windows specific).
If true, standard error is attached.
If true, standard input is attached, which makes possible user interaction.
If true, standard output is attached.
Command that is run when starting the container.
The FQDN for the container.
Entrypoint to run when starting the container.
List of environment variables to set in the container.
A list of exposed ports in a format [123:{},456:{}].
- Healthcheck
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The number of consecutive failures needed to consider a container as unhealthy. Zero means inherit.
The test to perform to check that the container is healthy. An empty slice means to inherit the default. The options are: {} : inherit healthcheck {"NONE"} : disable healthcheck {"CMD", args...} : exec arguments directly {"CMD-SHELL", command} : run command with system's default shell.
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The host name of the container.
Name of the image as it was passed by the operator (eg. could be symbolic).
List of labels set to this container.
The MAC Address of the container.
If true, containers are not given network access.
ONBUILD metadata that were defined on the image Dockerfile https://docs.docker.com/engine/reference/builder/#onbuild.
Open stdin.
Shell for shell-form of RUN, CMD, ENTRYPOINT.
If true, close stdin after the 1 attached client disconnects.
Signal to stop a container.
Timeout (in seconds) to stop a container.
Attach standard streams to a tty, including stdin if it is not closed.
The user that will run the command(s) inside the container.
List of volumes (mounts) used for the container.
Current working directory (PWD) in the command will be launched.
The ID of the container which created this image.
The configuration data about a container.
- ContainerConfig
True if command is already escaped (Windows specific).
If true, standard error is attached.
If true, standard input is attached, which makes possible user interaction.
If true, standard output is attached.
Command that is run when starting the container.
The FQDN for the container.
Entrypoint to run when starting the container.
List of environment variables to set in the container.
A list of exposed ports in a format [123:{},456:{}].
- Healthcheck
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The number of consecutive failures needed to consider a container as unhealthy. Zero means inherit.
The test to perform to check that the container is healthy. An empty slice means to inherit the default. The options are: {} : inherit healthcheck {"NONE"} : disable healthcheck {"CMD", args...} : exec arguments directly {"CMD-SHELL", command} : run command with system's default shell.
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The host name of the container.
Name of the image as it was passed by the operator (eg. could be symbolic).
List of labels set to this container.
The MAC Address of the container.
If true, containers are not given network access.
ONBUILD metadata that were defined on the image Dockerfile https://docs.docker.com/engine/reference/builder/#onbuild.
Open stdin.
Shell for shell-form of RUN, CMD, ENTRYPOINT.
If true, close stdin after the 1 attached client disconnects.
Signal to stop a container.
Timeout (in seconds) to stop a container.
Attach standard streams to a tty, including stdin if it is not closed.
The user that will run the command(s) inside the container.
List of volumes (mounts) used for the container.
Current working directory (PWD) in the command will be launched.
The unix timestamp for the date when the image was created.
The Docker version used to build this image.
The image ID.
Media type of the manifest for the image.
The operating system family used to build this image, and required to run it.
The version of the operating system used to build this image.
The ID of the base image for this image.
RootFS contains information about the root filesystem of a container image.
- RootFs
Descriptor for the base layer in the image.
Descriptors for each layer in the image.
The type of filesystem.
The size of the image in bytes.
The sum of the size of each layer in the image in bytes.
An image JSON output consistent with the Docker Remote API.
The processor architecture used to build this image, and required to run it.
The author of the image.
A plain text description of the image.
The configuration data about a container.
- Config
True if command is already escaped (Windows specific).
If true, standard error is attached.
If true, standard input is attached, which makes possible user interaction.
If true, standard output is attached.
Command that is run when starting the container.
The FQDN for the container.
Entrypoint to run when starting the container.
List of environment variables to set in the container.
A list of exposed ports in a format [123:{},456:{}].
- Healthcheck
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The number of consecutive failures needed to consider a container as unhealthy. Zero means inherit.
The test to perform to check that the container is healthy. An empty slice means to inherit the default. The options are: {} : inherit healthcheck {"NONE"} : disable healthcheck {"CMD", args...} : exec arguments directly {"CMD-SHELL", command} : run command with system's default shell.
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The host name of the container.
Name of the image as it was passed by the operator (eg. could be symbolic).
List of labels set to this container.
The MAC Address of the container.
If true, containers are not given network access.
ONBUILD metadata that were defined on the image Dockerfile https://docs.docker.com/engine/reference/builder/#onbuild.
Open stdin.
Shell for shell-form of RUN, CMD, ENTRYPOINT.
If true, close stdin after the 1 attached client disconnects.
Signal to stop a container.
Timeout (in seconds) to stop a container.
Attach standard streams to a tty, including stdin if it is not closed.
The user that will run the command(s) inside the container.
List of volumes (mounts) used for the container.
Current working directory (PWD) in the command will be launched.
The ID of the container which created this image.
The configuration data about a container.
- ContainerConfig
True if command is already escaped (Windows specific).
If true, standard error is attached.
If true, standard input is attached, which makes possible user interaction.
If true, standard output is attached.
Command that is run when starting the container.
The FQDN for the container.
Entrypoint to run when starting the container.
List of environment variables to set in the container.
A list of exposed ports in a format [123:{},456:{}].
- Healthcheck
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The number of consecutive failures needed to consider a container as unhealthy. Zero means inherit.
The test to perform to check that the container is healthy. An empty slice means to inherit the default. The options are: {} : inherit healthcheck {"NONE"} : disable healthcheck {"CMD", args...} : exec arguments directly {"CMD-SHELL", command} : run command with system's default shell.
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The host name of the container.
Name of the image as it was passed by the operator (eg. could be symbolic).
List of labels set to this container.
The MAC Address of the container.
If true, containers are not given network access.
ONBUILD metadata that were defined on the image Dockerfile https://docs.docker.com/engine/reference/builder/#onbuild.
Open stdin.
Shell for shell-form of RUN, CMD, ENTRYPOINT.
If true, close stdin after the 1 attached client disconnects.
Signal to stop a container.
Timeout (in seconds) to stop a container.
Attach standard streams to a tty, including stdin if it is not closed.
The user that will run the command(s) inside the container.
List of volumes (mounts) used for the container.
Current working directory (PWD) in the command will be launched.
The unix timestamp for the date when the image was created.
The Docker version used to build this image.
The image ID.
Media type of the manifest for the image.
The operating system family used to build this image, and required to run it.
The version of the operating system used to build this image.
The ID of the base image for this image.
RootFS contains information about the root filesystem of a container image.
- RootFS
Descriptor for the base layer in the image.
Descriptors for each layer in the image.
The type of filesystem.
The size of the image in bytes.
The sum of the size of each layer in the image in bytes.
An image JSON output consistent with the Docker Remote API.
The processor architecture used to build this image, and required to run it.
The author of the image.
A plain text description of the image.
The configuration data about a container.
- config
True if command is already escaped (Windows specific).
If true, standard error is attached.
If true, standard input is attached, which makes possible user interaction.
If true, standard output is attached.
Command that is run when starting the container.
The FQDN for the container.
Entrypoint to run when starting the container.
List of environment variables to set in the container.
A list of exposed ports in a format [123:{},456:{}].
- healthcheck
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The number of consecutive failures needed to consider a container as unhealthy. Zero means inherit.
The test to perform to check that the container is healthy. An empty slice means to inherit the default. The options are: {} : inherit healthcheck {"NONE"} : disable healthcheck {"CMD", args...} : exec arguments directly {"CMD-SHELL", command} : run command with system's default shell.
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The host name of the container.
Name of the image as it was passed by the operator (eg. could be symbolic).
List of labels set to this container.
The MAC Address of the container.
If true, containers are not given network access.
ONBUILD metadata that were defined on the image Dockerfile https://docs.docker.com/engine/reference/builder/#onbuild.
Open stdin.
Shell for shell-form of RUN, CMD, ENTRYPOINT.
If true, close stdin after the 1 attached client disconnects.
Signal to stop a container.
Timeout (in seconds) to stop a container.
Attach standard streams to a tty, including stdin if it is not closed.
The user that will run the command(s) inside the container.
List of volumes (mounts) used for the container.
Current working directory (PWD) in the command will be launched.
The ID of the container which created this image.
The configuration data about a container.
- container_config
True if command is already escaped (Windows specific).
If true, standard error is attached.
If true, standard input is attached, which makes possible user interaction.
If true, standard output is attached.
Command that is run when starting the container.
The FQDN for the container.
Entrypoint to run when starting the container.
List of environment variables to set in the container.
A list of exposed ports in a format [123:{},456:{}].
- healthcheck
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The number of consecutive failures needed to consider a container as unhealthy. Zero means inherit.
The test to perform to check that the container is healthy. An empty slice means to inherit the default. The options are: {} : inherit healthcheck {"NONE"} : disable healthcheck {"CMD", args...} : exec arguments directly {"CMD-SHELL", command} : run command with system's default shell.
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The host name of the container.
Name of the image as it was passed by the operator (eg. could be symbolic).
List of labels set to this container.
The MAC Address of the container.
If true, containers are not given network access.
ONBUILD metadata that were defined on the image Dockerfile https://docs.docker.com/engine/reference/builder/#onbuild.
Open stdin.
Shell for shell-form of RUN, CMD, ENTRYPOINT.
If true, close stdin after the 1 attached client disconnects.
Signal to stop a container.
Timeout (in seconds) to stop a container.
Attach standard streams to a tty, including stdin if it is not closed.
The user that will run the command(s) inside the container.
List of volumes (mounts) used for the container.
Current working directory (PWD) in the command will be launched.
The unix timestamp for the date when the image was created.
The Docker version used to build this image.
The image ID.
Media type of the manifest for the image.
The operating system family used to build this image, and required to run it.
The version of the operating system used to build this image.
The ID of the base image for this image.
RootFS contains information about the root filesystem of a container image.
- root_fs
Descriptor for the base layer in the image.
Descriptors for each layer in the image.
The type of filesystem.
The size of the image in bytes.
The sum of the size of each layer in the image in bytes.
An image JSON output consistent with the Docker Remote API.
The processor architecture used to build this image, and required to run it.
The author of the image.
A plain text description of the image.
The configuration data about a container.
- config
True if command is already escaped (Windows specific).
If true, standard error is attached.
If true, standard input is attached, which makes possible user interaction.
If true, standard output is attached.
Command that is run when starting the container.
The FQDN for the container.
Entrypoint to run when starting the container.
List of environment variables to set in the container.
A list of exposed ports in a format [123:{},456:{}].
- healthcheck
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The number of consecutive failures needed to consider a container as unhealthy. Zero means inherit.
The test to perform to check that the container is healthy. An empty slice means to inherit the default. The options are: {} : inherit healthcheck {"NONE"} : disable healthcheck {"CMD", args...} : exec arguments directly {"CMD-SHELL", command} : run command with system's default shell.
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The host name of the container.
Name of the image as it was passed by the operator (eg. could be symbolic).
List of labels set to this container.
The MAC Address of the container.
If true, containers are not given network access.
ONBUILD metadata that were defined on the image Dockerfile https://docs.docker.com/engine/reference/builder/#onbuild.
Open stdin.
Shell for shell-form of RUN, CMD, ENTRYPOINT.
If true, close stdin after the 1 attached client disconnects.
Signal to stop a container.
Timeout (in seconds) to stop a container.
Attach standard streams to a tty, including stdin if it is not closed.
The user that will run the command(s) inside the container.
List of volumes (mounts) used for the container.
Current working directory (PWD) in the command will be launched.
The ID of the container which created this image.
The configuration data about a container.
- containerConfig
True if command is already escaped (Windows specific).
If true, standard error is attached.
If true, standard input is attached, which makes possible user interaction.
If true, standard output is attached.
Command that is run when starting the container.
The FQDN for the container.
Entrypoint to run when starting the container.
List of environment variables to set in the container.
A list of exposed ports in a format [123:{},456:{}].
- healthcheck
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The number of consecutive failures needed to consider a container as unhealthy. Zero means inherit.
The test to perform to check that the container is healthy. An empty slice means to inherit the default. The options are: {} : inherit healthcheck {"NONE"} : disable healthcheck {"CMD", args...} : exec arguments directly {"CMD-SHELL", command} : run command with system's default shell.
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
The host name of the container.
Name of the image as it was passed by the operator (eg. could be symbolic).
List of labels set to this container.
The MAC Address of the container.
If true, containers are not given network access.
ONBUILD metadata that were defined on the image Dockerfile https://docs.docker.com/engine/reference/builder/#onbuild.
Open stdin.
Shell for shell-form of RUN, CMD, ENTRYPOINT.
If true, close stdin after the 1 attached client disconnects.
Signal to stop a container.
Timeout (in seconds) to stop a container.
Attach standard streams to a tty, including stdin if it is not closed.
The user that will run the command(s) inside the container.
List of volumes (mounts) used for the container.
Current working directory (PWD) in the command will be launched.
The unix timestamp for the date when the image was created.
The Docker version used to build this image.
The image ID.
Media type of the manifest for the image.
The operating system family used to build this image, and required to run it.
The version of the operating system used to build this image.
The ID of the base image for this image.
RootFS contains information about the root filesystem of a container image.
- rootFs
Descriptor for the base layer in the image.
Descriptors for each layer in the image.
The type of filesystem.
The size of the image in bytes.
The sum of the size of each layer in the image in bytes.
Status Code
Success
A required header is missing. Correct the request and try again.
You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again.
You do not have authorization to access the specified namespace.
The specified image was not found. Check the spelling of the specified image.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "Id": "sha256:11106fafa8005fdcf4641634220afe7bda9e6d86136d0c47902ff17d3324aaaa", "Parent": "", "Comment": "", "Created": "2020-05-05T09:58:15.763923649Z", "Container": "3a23849e2c3e754193c5148caa67ce83cd05541d162b05e39a02cdf9261cbbbb", "ContainerConfig": { "Hostname": "3a23849ecccc", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "1234/tcp": {}, "5678/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "Cmd": [ "/bin/sh", "-c", "#(nop) ", "LABEL key=value" ], "Image": "sha256:b44b210e565c7871aed1c1155527ca0782be82153f9ebe12786e7b992151dddd", "Volumes": { "/etc/apache2": {}, "/var/log/apache2": {}, "/var/www": {} }, "WorkingDir": "", "Entrypoint": [ "/usr/sbin/somecmd", "-D", "FOREGROUND" ], "OnBuild": [ "RUN echo example" ], "Labels": { "key": "value" } }, "DockerVersion": "19.03.5", "Author": "", "Config": { "Hostname": "", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "1234/tcp": {}, "5678/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "Image": "sha256:b44b210e565c7871aed1c1155527ca0782be82153f9ebe12786e7b992151dddd", "Volumes": { "/etc/apache2": {}, "/var/log/apache2": {}, "/var/www": {} }, "WorkingDir": "", "Entrypoint": [ "/usr/sbin/somecmd", "-D", "FOREGROUND" ], "OnBuild": [ "RUN echo example" ], "Labels": { "key": "value" } }, "Architecture": "amd64", "Os": "linux", "Size": 760854, "VirtualSize": 760854, "RootFS": { "Type": "layers", "Layers": [ "sha256:5b0d2d635df829f65d0ffb45eab2c3124a470c4f385d6602bda0c21c5248eeee" ] }, "ManifestType": "application/vnd.docker.distribution.manifest.v2+json" }
{ "Id": "sha256:11106fafa8005fdcf4641634220afe7bda9e6d86136d0c47902ff17d3324aaaa", "Parent": "", "Comment": "", "Created": "2020-05-05T09:58:15.763923649Z", "Container": "3a23849e2c3e754193c5148caa67ce83cd05541d162b05e39a02cdf9261cbbbb", "ContainerConfig": { "Hostname": "3a23849ecccc", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "1234/tcp": {}, "5678/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "Cmd": [ "/bin/sh", "-c", "#(nop) ", "LABEL key=value" ], "Image": "sha256:b44b210e565c7871aed1c1155527ca0782be82153f9ebe12786e7b992151dddd", "Volumes": { "/etc/apache2": {}, "/var/log/apache2": {}, "/var/www": {} }, "WorkingDir": "", "Entrypoint": [ "/usr/sbin/somecmd", "-D", "FOREGROUND" ], "OnBuild": [ "RUN echo example" ], "Labels": { "key": "value" } }, "DockerVersion": "19.03.5", "Author": "", "Config": { "Hostname": "", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "1234/tcp": {}, "5678/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "Image": "sha256:b44b210e565c7871aed1c1155527ca0782be82153f9ebe12786e7b992151dddd", "Volumes": { "/etc/apache2": {}, "/var/log/apache2": {}, "/var/www": {} }, "WorkingDir": "", "Entrypoint": [ "/usr/sbin/somecmd", "-D", "FOREGROUND" ], "OnBuild": [ "RUN echo example" ], "Labels": { "key": "value" } }, "Architecture": "amd64", "Os": "linux", "Size": 760854, "VirtualSize": 760854, "RootFS": { "Type": "layers", "Layers": [ "sha256:5b0d2d635df829f65d0ffb45eab2c3124a470c4f385d6602bda0c21c5248eeee" ] }, "ManifestType": "application/vnd.docker.distribution.manifest.v2+json" }
Get image manifest
Get the manifest for a container image in the private registry.
Get the manifest for a container image in the private registry.
Get the manifest for a container image in the private registry.
Get the manifest for a container image in the private registry.
Get the manifest for a container image in the private registry.
GET /api/v1/images/{image}/manifest
(containerRegistry *ContainerRegistryV1) GetImageManifest(getImageManifestOptions *GetImageManifestOptions) (result map[string]interface{}, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) GetImageManifestWithContext(ctx context.Context, getImageManifestOptions *GetImageManifestOptions) (result map[string]interface{}, response *core.DetailedResponse, err error)
getImageManifest(params)
get_image_manifest(
self,
image: str,
**kwargs,
) -> DetailedResponse
ServiceCall<Map<String, Object>> getImageManifest(GetImageManifestOptions getImageManifestOptions)
Request
Instantiate the GetImageManifestOptions
struct and set the fields to provide parameter values for the GetImageManifest
method.
Use the GetImageManifestOptions.Builder
to create a GetImageManifestOptions
object that contains the parameter values for the getImageManifest
method.
Custom Headers
The unique ID for your IBM Cloud account.
Path Parameters
The full IBM Cloud registry path to the image that you want to inspect. Run
ibmcloud cr images
or call theGET /images/json
endpoint to review images that are in the registry.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetImageManifest options.
The full IBM Cloud registry path to the image that you want to inspect. Run
ibmcloud cr images
or call theGET /images/json
endpoint to review images that are in the registry.
parameters
The full IBM Cloud registry path to the image that you want to inspect. Run
ibmcloud cr images
or call theGET /images/json
endpoint to review images that are in the registry.
parameters
The full IBM Cloud registry path to the image that you want to inspect. Run
ibmcloud cr images
or call theGET /images/json
endpoint to review images that are in the registry.
The getImageManifest options.
The full IBM Cloud registry path to the image that you want to inspect. Run
ibmcloud cr images
or call theGET /images/json
endpoint to review images that are in the registry.
curl -X GET -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" -H "accept: application/json" --url 'https://us.icr.io/api/v1/images/us.icr.io%2Fbirds%2Fwoodpecker%3Agreen/manifest'
getImageManifestOptions := containerRegistryService.NewGetImageManifestOptions( "image name", ) imageManifest, response, err := containerRegistryService.GetImageManifest(getImageManifestOptions) if err != nil { panic(err) } // result contains a map[string]interface{} representation of the manifest // The following test will simply check that it is a V2 manifest Expect(imageManifest["schemaVersion"]).To(Equal(float64(2)))
const params = { image: 'image name', }; containerRegistryService.getImageManifest(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
response = container_registry_service.get_image_manifest( image='image name' ).get_result() print(json.dumps(response, indent=2))
GetImageManifestOptions getImageManifestOptions = new GetImageManifestOptions.Builder() .image("image name") .build(); Response<Map<String, Object>> response = service.getImageManifest(getImageManifestOptions).execute(); Map<String, Object> imageManifest = response.getResult(); System.out.println(imageManifest);
Response
Response type: map[string]interface{}
Response type: JsonObject
Response type: dict
Response type: Map<String, Object>
A container image manifest in JSON format. Check the Content-Type response header for the manifest type.
Status Code
Success
A required header is missing. Correct the request and try again.
You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again.
You do not have authorization to access the specified namespace.
The specified image was not found. Check the spelling of the specified image.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "config": { "mediaType": "application/vnd.docker.container.image.v1+json", "size": 2297, "digest": "sha256:11106fafa8005fdcf4641634220afe7bda9e6d86136d0c47902ff17d3324aaaa" }, "layers": [ { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 760854, "digest": "sha256:e2334dd9fee4b77e48a8f2d793904118a3acf26f1f2e72a3d79c6cae993ebbbb" } ] }
{ "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "config": { "mediaType": "application/vnd.docker.container.image.v1+json", "size": 2297, "digest": "sha256:11106fafa8005fdcf4641634220afe7bda9e6d86136d0c47902ff17d3324aaaa" }, "layers": [ { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 760854, "digest": "sha256:e2334dd9fee4b77e48a8f2d793904118a3acf26f1f2e72a3d79c6cae993ebbbb" } ] }
Get messages
Return any published system messages.
Return any published system messages.
Return any published system messages.
Return any published system messages.
Return any published system messages.
GET /api/v1/messages
(containerRegistry *ContainerRegistryV1) GetMessages(getMessagesOptions *GetMessagesOptions) (result *string, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) GetMessagesWithContext(ctx context.Context, getMessagesOptions *GetMessagesOptions) (result *string, response *core.DetailedResponse, err error)
getMessages(params)
get_messages(
self,
**kwargs,
) -> DetailedResponse
ServiceCall<String> getMessages()
Request
No Request Parameters
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
No Request Parameters
No Request Parameters
No Request Parameters
No Request Parameters
curl -X GET --url 'https://icr.io/api/v1/messages'
getMessagesOptions := containerRegistryService.NewGetMessagesOptions() getMessagesResponse, response, err := containerRegistryService.GetMessages(getMessagesOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(getMessagesResponse, "", " ") fmt.Println(string(b))
containerRegistryService.getMessages({}) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
get_messages_response = container_registry_service.get_messages().get_result() print(json.dumps(get_messages_response, indent=2))
GetMessagesOptions getMessagesOptions = new GetMessagesOptions(); Response<String> response = service.getMessages(getMessagesOptions).execute(); String getMessagesResponse = response.getResult(); System.out.println(getMessagesResponse);
Response
Response type: string
Response type: string
Response type: str
Response type: String
Status Code
Success.
There are no messages to display.
A required header is missing. Correct the request and try again.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
Hello, world!
Hello, world!
List namespaces
List authorized namespaces in the targeted IBM Cloud account.
List authorized namespaces in the targeted IBM Cloud account.
List authorized namespaces in the targeted IBM Cloud account.
List authorized namespaces in the targeted IBM Cloud account.
List authorized namespaces in the targeted IBM Cloud account.
GET /api/v1/namespaces
(containerRegistry *ContainerRegistryV1) ListNamespaces(listNamespacesOptions *ListNamespacesOptions) (result []string, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) ListNamespacesWithContext(ctx context.Context, listNamespacesOptions *ListNamespacesOptions) (result []string, response *core.DetailedResponse, err error)
listNamespaces(params)
list_namespaces(
self,
**kwargs,
) -> DetailedResponse
ServiceCall<List<String>> listNamespaces(ListNamespacesOptions listNamespacesOptions)
Request
Instantiate the ListNamespacesOptions
struct and set the fields to provide parameter values for the ListNamespaces
method.
Use the ListNamespacesOptions.Builder
to create a ListNamespacesOptions
object that contains the parameter values for the listNamespaces
method.
Custom Headers
The unique ID for your IBM Cloud account.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
parameters
parameters
curl -X GET -H "accept: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" --url 'https://us.icr.io/api/v1/namespaces'
listNamespacesOptions := containerRegistryService.NewListNamespacesOptions() namespaces, response, err := containerRegistryService.ListNamespaces(listNamespacesOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(namespaces, "", " ") fmt.Println(string(b))
containerRegistryService.listNamespaces({}) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
result = container_registry_service.list_namespaces().get_result() print(json.dumps(result, indent=2))
ListNamespacesOptions listNamespacesOptions = new ListNamespacesOptions(); Response<List<String>> response = service.listNamespaces(listNamespacesOptions).execute(); List<String> result = response.getResult(); System.out.println(result);
Response
Response type: []string
Response type: string[]
Response type: List[str]
Response type: List<String>
A list of authorized namespaces in the targeted IBM Cloud account
Status Code
Success
A required header is missing. Correct the request and try again.
You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
[ "birds", "favouritebirds" ]
[ "birds", "favouritebirds" ]
Detailed namespace list
Retrieves details, such as resource group, for all your namespaces in the targeted registry.
Retrieves details, such as resource group, for all your namespaces in the targeted registry.
Retrieves details, such as resource group, for all your namespaces in the targeted registry.
Retrieves details, such as resource group, for all your namespaces in the targeted registry.
Retrieves details, such as resource group, for all your namespaces in the targeted registry.
GET /api/v1/namespaces/details
(containerRegistry *ContainerRegistryV1) ListNamespaceDetails(listNamespaceDetailsOptions *ListNamespaceDetailsOptions) (result []NamespaceDetails, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) ListNamespaceDetailsWithContext(ctx context.Context, listNamespaceDetailsOptions *ListNamespaceDetailsOptions) (result []NamespaceDetails, response *core.DetailedResponse, err error)
listNamespaceDetails(params)
list_namespace_details(
self,
**kwargs,
) -> DetailedResponse
ServiceCall<List<NamespaceDetails>> listNamespaceDetails(ListNamespaceDetailsOptions listNamespaceDetailsOptions)
Request
Instantiate the ListNamespaceDetailsOptions
struct and set the fields to provide parameter values for the ListNamespaceDetails
method.
Use the ListNamespaceDetailsOptions.Builder
to create a ListNamespaceDetailsOptions
object that contains the parameter values for the listNamespaceDetails
method.
Custom Headers
The unique ID for your IBM Cloud account.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
parameters
parameters
curl -X GET -H "accept: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" --url 'https://us.icr.io/api/v1/namespaces/details'
listNamespaceDetailsOptions := containerRegistryService.NewListNamespaceDetailsOptions() namespaceDetails, response, err := containerRegistryService.ListNamespaceDetails(listNamespaceDetailsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(namespaceDetails, "", " ") fmt.Println(string(b))
containerRegistryService.listNamespaceDetails({}) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
list_namespace_details = container_registry_service.list_namespace_details().get_result() print(json.dumps(list_namespace_details, indent=2))
ListNamespaceDetailsOptions listNamespaceDetailsOptions = new ListNamespaceDetailsOptions(); Response<List<NamespaceDetails>> response = service.listNamespaceDetails(listNamespaceDetailsOptions).execute(); List<NamespaceDetails> listNamespaceDetails = response.getResult(); System.out.println(listNamespaceDetails);
Response
Response type: []NamespaceDetails
Response type: NamespaceDetails[]
Response type: List[NamespaceDetails]
Response type: List<NamespaceDetails>
Details of authorized namespaces in the targeted IBM Cloud account
The IBM Cloud account that owns the namespace.
The creation date of the namespace.
If the namespace is assigned to a resource group, the IBM Cloud CRN representing the namespace.
The date that the namespace was assigned to a resource group.
The ID of the resource group to which the namespace is assigned.
The date that the namespace was last updated.
Status Code
Success
A required header is missing. Correct the request and try again.
You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
[ { "name": "birds", "account": "79c6d1c71fb1cbedc38ffc251ba2ffff", "created_date": "2020-07-03 08:49:37", "updated_date": "2020-07-03 08:49:37" }, { "name": "favouritebirds", "account": "79c6d1c71fb1cbedc38ffc251ba2ffff", "crn": "crn:v1:bluemix:public:container-registry:us-south:a/79c6d1c71fb1cbedc38ffc251ba2ffff::namespace:favouritebirds", "resource_group": "c9cbad60c221eb1add958e1b14dcaaaa", "resource_created_date": "2020-06-05 12:59:00", "created_date": "2020-05-07 12:49:56", "updated_date": "2020-06-05 12:59:00" } ]
[ { "name": "birds", "account": "79c6d1c71fb1cbedc38ffc251ba2ffff", "created_date": "2020-07-03 08:49:37", "updated_date": "2020-07-03 08:49:37" }, { "name": "favouritebirds", "account": "79c6d1c71fb1cbedc38ffc251ba2ffff", "crn": "crn:v1:bluemix:public:container-registry:us-south:a/79c6d1c71fb1cbedc38ffc251ba2ffff::namespace:favouritebirds", "resource_group": "c9cbad60c221eb1add958e1b14dcaaaa", "resource_created_date": "2020-06-05 12:59:00", "created_date": "2020-05-07 12:49:56", "updated_date": "2020-06-05 12:59:00" } ]
Create namespace
Add a namespace to the targeted IBM Cloud account.
Add a namespace to the targeted IBM Cloud account.
Add a namespace to the targeted IBM Cloud account.
Add a namespace to the targeted IBM Cloud account.
Add a namespace to the targeted IBM Cloud account.
PUT /api/v1/namespaces/{name}
(containerRegistry *ContainerRegistryV1) CreateNamespace(createNamespaceOptions *CreateNamespaceOptions) (result *Namespace, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) CreateNamespaceWithContext(ctx context.Context, createNamespaceOptions *CreateNamespaceOptions) (result *Namespace, response *core.DetailedResponse, err error)
createNamespace(params)
create_namespace(
self,
name: str,
*,
x_auth_resource_group: str = None,
**kwargs,
) -> DetailedResponse
ServiceCall<Namespace> createNamespace(CreateNamespaceOptions createNamespaceOptions)
Request
Instantiate the CreateNamespaceOptions
struct and set the fields to provide parameter values for the CreateNamespace
method.
Use the CreateNamespaceOptions.Builder
to create a CreateNamespaceOptions
object that contains the parameter values for the createNamespace
method.
Custom Headers
The unique ID for your IBM Cloud account.
The ID of the resource group to which you want to add the namespace.
Path Parameters
The name of the namespace that you want to create.
Possible values: 4 ≤ length ≤ 30, Value must match regular expression
^[a-z0-9]+[a-z0-9_-]+[a-z0-9]+$
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateNamespace options.
The name of the namespace that you want to create.
Possible values: 4 ≤ length ≤ 30, Value must match regular expression
/^[a-z0-9]+[a-z0-9_-]+[a-z0-9]+$/
The ID of the resource group to which you want to add the namespace.
parameters
The name of the namespace that you want to create.
Possible values: 4 ≤ length ≤ 30, Value must match regular expression
/^[a-z0-9]+[a-z0-9_-]+[a-z0-9]+$/
The ID of the resource group to which you want to add the namespace.
parameters
The name of the namespace that you want to create.
Possible values: 4 ≤ length ≤ 30, Value must match regular expression
/^[a-z0-9]+[a-z0-9_-]+[a-z0-9]+$/
The ID of the resource group to which you want to add the namespace.
The createNamespace options.
The name of the namespace that you want to create.
Possible values: 4 ≤ length ≤ 30, Value must match regular expression
/^[a-z0-9]+[a-z0-9_-]+[a-z0-9]+$/
The ID of the resource group to which you want to add the namespace.
curl -X PUT -H "accept: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" -H "X-Auth-Resource-Group: <resource_group_ID>" --url 'https://us.icr.io/api/v1/namespaces/birds'
createNamespaceOptions := containerRegistryService.NewCreateNamespaceOptions( "my_example_namespace", ) namespace, response, err := containerRegistryService.CreateNamespace(createNamespaceOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(namespace, "", " ") fmt.Println(string(b))
const params = { name: 'my_example_namespace', }; containerRegistryService.createNamespace(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
namespace = container_registry_service.create_namespace( name='my_example_namespace' ).get_result() print(json.dumps(namespace, indent=2))
CreateNamespaceOptions createNamespaceOptions = new CreateNamespaceOptions.Builder() .name("my_example_namespace") .build(); Response<Namespace> response = service.createNamespace(createNamespaceOptions).execute(); Namespace namespace = response.getResult(); System.out.println(namespace);
Response
Status Code
The namespace is already assigned to your IBM Cloud account.
The namespace was successfully added to your IBM Cloud account.
A required header is missing or invalid. Correct the request and try again.
You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again.
The requested namespace is blocklisted. Correct the request and try again.
The requested namespace is already in use. Request a different namespace.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "namespace": "birds" }
{ "namespace": "birds" }
{ "namespace": "birds" }
{ "namespace": "birds" }
Assign namespace
Assign a namespace to the specified resource group in the targeted IBM Cloud account.
Assign a namespace to the specified resource group in the targeted IBM Cloud account.
Assign a namespace to the specified resource group in the targeted IBM Cloud account.
Assign a namespace to the specified resource group in the targeted IBM Cloud account.
Assign a namespace to the specified resource group in the targeted IBM Cloud account.
PATCH /api/v1/namespaces/{name}
(containerRegistry *ContainerRegistryV1) AssignNamespace(assignNamespaceOptions *AssignNamespaceOptions) (result *Namespace, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) AssignNamespaceWithContext(ctx context.Context, assignNamespaceOptions *AssignNamespaceOptions) (result *Namespace, response *core.DetailedResponse, err error)
assignNamespace(params)
assign_namespace(
self,
x_auth_resource_group: str,
name: str,
**kwargs,
) -> DetailedResponse
ServiceCall<Namespace> assignNamespace(AssignNamespaceOptions assignNamespaceOptions)
Request
Instantiate the AssignNamespaceOptions
struct and set the fields to provide parameter values for the AssignNamespace
method.
Use the AssignNamespaceOptions.Builder
to create a AssignNamespaceOptions
object that contains the parameter values for the assignNamespace
method.
Custom Headers
The unique ID for your IBM Cloud account.
The ID of the resource group to which you want to add the namespace.
Path Parameters
The name of the namespace that you want to udpate.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The AssignNamespace options.
The ID of the resource group to which you want to add the namespace.
The name of the namespace that you want to udpate.
parameters
The ID of the resource group to which you want to add the namespace.
The name of the namespace that you want to udpate.
parameters
The ID of the resource group to which you want to add the namespace.
The name of the namespace that you want to udpate.
The assignNamespace options.
The ID of the resource group to which you want to add the namespace.
The name of the namespace that you want to udpate.
curl -X PATCH -H "accept: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" -H "X-Auth-Resource-Group: <resource_group_ID>" --url 'https://us.icr.io/api/v1/namespaces/birds'
assignNamespaceOptions := containerRegistryService.NewAssignNamespaceOptions( "Resource Group ID", namespaceLink, ) namespace, response, err := containerRegistryService.AssignNamespace(assignNamespaceOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(namespace, "", " ") fmt.Println(string(b))
const params = { xAuthResourceGroup: 'Resource Group ID', name: namespaceLink, }; containerRegistryService.assignNamespace(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
namespace = container_registry_service.assign_namespace( x_auth_resource_group='Resource Group ID', name=namespace_link ).get_result() print(json.dumps(namespace, indent=2))
AssignNamespaceOptions assignNamespaceOptions = new AssignNamespaceOptions.Builder() .xAuthResourceGroup("Resource Group ID") .name(namespaceLink) .build(); Response<Namespace> response = service.assignNamespace(assignNamespaceOptions).execute(); Namespace namespace = response.getResult(); System.out.println(namespace);
Response
Status Code
The namespace was successfully assigned to the resource group.
A required header is missing or invalid. Correct the request and try again.
You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again.
The requested account does not own a namespace with the requested name. Correct the request and try again.
The requested namespace is already assigned to a resource group. Namespaces cannot be reassigned.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "namespace": "birds" }
{ "namespace": "birds" }
Delete namespace
Delete the IBM Cloud Container Registry namespace from the targeted IBM Cloud account, and removes all images that were in that namespace.
Delete the IBM Cloud Container Registry namespace from the targeted IBM Cloud account, and removes all images that were in that namespace.
Delete the IBM Cloud Container Registry namespace from the targeted IBM Cloud account, and removes all images that were in that namespace.
Delete the IBM Cloud Container Registry namespace from the targeted IBM Cloud account, and removes all images that were in that namespace.
Delete the IBM Cloud Container Registry namespace from the targeted IBM Cloud account, and removes all images that were in that namespace.
DELETE /api/v1/namespaces/{name}
(containerRegistry *ContainerRegistryV1) DeleteNamespace(deleteNamespaceOptions *DeleteNamespaceOptions) (response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) DeleteNamespaceWithContext(ctx context.Context, deleteNamespaceOptions *DeleteNamespaceOptions) (response *core.DetailedResponse, err error)
deleteNamespace(params)
delete_namespace(
self,
name: str,
**kwargs,
) -> DetailedResponse
ServiceCall<Void> deleteNamespace(DeleteNamespaceOptions deleteNamespaceOptions)
Request
Instantiate the DeleteNamespaceOptions
struct and set the fields to provide parameter values for the DeleteNamespace
method.
Use the DeleteNamespaceOptions.Builder
to create a DeleteNamespaceOptions
object that contains the parameter values for the deleteNamespace
method.
Custom Headers
The unique ID for your IBM Cloud account.
Path Parameters
The name of the namespace that you want to delete.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteNamespace options.
The name of the namespace that you want to delete.
parameters
The name of the namespace that you want to delete.
parameters
The name of the namespace that you want to delete.
The deleteNamespace options.
The name of the namespace that you want to delete.
curl -X DELETE -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" --url 'https://us.icr.io/api/v1/namespaces/birds'
deleteNamespaceOptions := containerRegistryService.NewDeleteNamespaceOptions( namespaceLink, ) response, err := containerRegistryService.DeleteNamespace(deleteNamespaceOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from DeleteNamespace(): %d\n", response.StatusCode) }
const params = { name: namespaceLink, }; containerRegistryService.deleteNamespace(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
response = container_registry_service.delete_namespace( name=namespace_link ).get_result() print(json.dumps(response, indent=2))
DeleteNamespaceOptions deleteNamespaceOptions = new DeleteNamespaceOptions.Builder() .name(namespaceLink) .build(); service.deleteNamespace(deleteNamespaceOptions).execute();
Response
Status Code
Success.
A required header is missing. Correct the request and try again.
Your IBM Cloud bearer token is not valid for the targeted account. Correct the request and try again.
The specified namespace is not owned by the targeted account.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
No Sample Response
Get plans
Get plans for the targeted account.
Get plans for the targeted account.
Get plans for the targeted account.
Get plans for the targeted account.
Get plans for the targeted account.
GET /api/v1/plans
(containerRegistry *ContainerRegistryV1) GetPlans(getPlansOptions *GetPlansOptions) (result *Plan, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) GetPlansWithContext(ctx context.Context, getPlansOptions *GetPlansOptions) (result *Plan, response *core.DetailedResponse, err error)
getPlans(params)
get_plans(
self,
**kwargs,
) -> DetailedResponse
ServiceCall<Plan> getPlans(GetPlansOptions getPlansOptions)
Request
Instantiate the GetPlansOptions
struct and set the fields to provide parameter values for the GetPlans
method.
Use the GetPlansOptions.Builder
to create a GetPlansOptions
object that contains the parameter values for the getPlans
method.
Custom Headers
The unique ID for your IBM Cloud account.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
parameters
parameters
curl -X GET -H "accept: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" --url 'https://us.icr.io/api/v1/plans'
getPlansOptions := containerRegistryService.NewGetPlansOptions() plan, response, err := containerRegistryService.GetPlans(getPlansOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(plan, "", " ") fmt.Println(string(b))
containerRegistryService.getPlans({}) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
plan = container_registry_service.get_plans().get_result() print(json.dumps(plan, indent=2))
GetPlansOptions getPlansOptions = new GetPlansOptions(); Response<Plan> response = service.getPlans(getPlansOptions).execute(); Plan plan = response.getResult(); System.out.println(plan);
Response
The plan for the targeted IBM Cloud account
The plan for the targeted IBM Cloud account.
The plan for the targeted IBM Cloud account.
The plan for the targeted IBM Cloud account.
The plan for the targeted IBM Cloud account.
Status Code
Success.
A required header is missing. Correct the request and try again.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "plan": "Free" }
{ "plan": "Free" }
Update plans
Update plans for the targeted account.
Update plans for the targeted account.
Update plans for the targeted account.
Update plans for the targeted account.
Update plans for the targeted account.
PATCH /api/v1/plans
(containerRegistry *ContainerRegistryV1) UpdatePlans(updatePlansOptions *UpdatePlansOptions) (response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) UpdatePlansWithContext(ctx context.Context, updatePlansOptions *UpdatePlansOptions) (response *core.DetailedResponse, err error)
updatePlans(params)
update_plans(
self,
*,
plan: str = None,
**kwargs,
) -> DetailedResponse
ServiceCall<Void> updatePlans(UpdatePlansOptions updatePlansOptions)
Request
Instantiate the UpdatePlansOptions
struct and set the fields to provide parameter values for the UpdatePlans
method.
Use the UpdatePlansOptions.Builder
to create a UpdatePlansOptions
object that contains the parameter values for the updatePlans
method.
Custom Headers
The unique ID for your IBM Cloud account.
A JSON document containing the requested updates.
{
"plan": "Standard"
}
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdatePlans options.
- Examples:
Standard
parameters
- Examples:
parameters
- Examples:
The updatePlans options.
- Examples:
Standard
curl -X PATCH -H "Content-Type: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" -d "{\"plan\":\"Standard\"}" --url 'https://us.icr.io/api/v1/plans'
updatePlansOptions := containerRegistryService.NewUpdatePlansOptions() updatePlansOptions.SetPlan("Standard") response, err := containerRegistryService.UpdatePlans(updatePlansOptions) if err != nil { panic(err) } if response.StatusCode != 200 { fmt.Printf("\nUnexpected response status code received from UpdatePlans(): %d\n", response.StatusCode) }
const params = { plan: 'Standard', }; containerRegistryService.updatePlans(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
response = container_registry_service.update_plans( plan='Standard' ).get_result() print(json.dumps(response, indent=2))
UpdatePlansOptions updatePlansOptions = new UpdatePlansOptions.Builder() .plan("Standard") .build(); service.updatePlans(updatePlansOptions).execute();
Response
Status Code
Success.
A required header is missing. Correct the request and try again.
You do not have access to perform the requested operation. You must have either Manager or Billing Manager roles on the targeted account to perform this action.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
No Sample Response
Get quotas
Get quotas for the targeted account.
Get quotas for the targeted account.
Get quotas for the targeted account.
Get quotas for the targeted account.
Get quotas for the targeted account.
GET /api/v1/quotas
(containerRegistry *ContainerRegistryV1) GetQuota(getQuotaOptions *GetQuotaOptions) (result *Quota, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) GetQuotaWithContext(ctx context.Context, getQuotaOptions *GetQuotaOptions) (result *Quota, response *core.DetailedResponse, err error)
getQuota(params)
get_quota(
self,
**kwargs,
) -> DetailedResponse
ServiceCall<Quota> getQuota(GetQuotaOptions getQuotaOptions)
Request
Instantiate the GetQuotaOptions
struct and set the fields to provide parameter values for the GetQuota
method.
Use the GetQuotaOptions.Builder
to create a GetQuotaOptions
object that contains the parameter values for the getQuota
method.
Custom Headers
The unique ID for your IBM Cloud account.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
parameters
parameters
curl -X GET -H "accept: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" --url 'https://us.icr.io/api/v1/quotas'
getQuotaOptions := containerRegistryService.NewGetQuotaOptions() quota, response, err := containerRegistryService.GetQuota(getQuotaOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(quota, "", " ") fmt.Println(string(b))
containerRegistryService.getQuota({}) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
quota = container_registry_service.get_quota().get_result() print(json.dumps(quota, indent=2))
GetQuotaOptions getQuotaOptions = new GetQuotaOptions(); Response<Quota> response = service.getQuota(getQuotaOptions).execute(); Quota quota = response.getResult(); System.out.println(quota);
Response
Current usage and limits for the targeted IBM Cloud account.
Current usage and limits for the targeted IBM Cloud account.
- Limit
Storage quota or usage in bytes. The value -1 denotes "Unlimited".
Traffic quota or usage in bytes. The value -1 denotes "Unlimited".
- Usage
Storage quota or usage in bytes. The value -1 denotes "Unlimited".
Traffic quota or usage in bytes. The value -1 denotes "Unlimited".
Current usage and limits for the targeted IBM Cloud account.
- limit
Storage quota or usage in bytes. The value -1 denotes "Unlimited".
Traffic quota or usage in bytes. The value -1 denotes "Unlimited".
- usage
Storage quota or usage in bytes. The value -1 denotes "Unlimited".
Traffic quota or usage in bytes. The value -1 denotes "Unlimited".
Current usage and limits for the targeted IBM Cloud account.
- limit
Storage quota or usage in bytes. The value -1 denotes "Unlimited".
Traffic quota or usage in bytes. The value -1 denotes "Unlimited".
- usage
Storage quota or usage in bytes. The value -1 denotes "Unlimited".
Traffic quota or usage in bytes. The value -1 denotes "Unlimited".
Current usage and limits for the targeted IBM Cloud account.
- limit
Storage quota or usage in bytes. The value -1 denotes "Unlimited".
Traffic quota or usage in bytes. The value -1 denotes "Unlimited".
- usage
Storage quota or usage in bytes. The value -1 denotes "Unlimited".
Traffic quota or usage in bytes. The value -1 denotes "Unlimited".
Status Code
Success.
A required header is missing. Correct the request and try again.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "usage": { "storage_bytes": 760984 }, "limit": { "traffic_bytes": 5368709120, "storage_bytes": 524288000 } }
{ "usage": { "storage_bytes": 760984 }, "limit": { "traffic_bytes": 5368709120, "storage_bytes": 524288000 } }
Update quotas
Update quotas for the targeted account.
Update quotas for the targeted account.
Update quotas for the targeted account.
Update quotas for the targeted account.
Update quotas for the targeted account.
PATCH /api/v1/quotas
(containerRegistry *ContainerRegistryV1) UpdateQuota(updateQuotaOptions *UpdateQuotaOptions) (response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) UpdateQuotaWithContext(ctx context.Context, updateQuotaOptions *UpdateQuotaOptions) (response *core.DetailedResponse, err error)
updateQuota(params)
update_quota(
self,
*,
storage_megabytes: int = None,
traffic_megabytes: int = None,
**kwargs,
) -> DetailedResponse
ServiceCall<Void> updateQuota(UpdateQuotaOptions updateQuotaOptions)
Request
Instantiate the UpdateQuotaOptions
struct and set the fields to provide parameter values for the UpdateQuota
method.
Use the UpdateQuotaOptions.Builder
to create a UpdateQuotaOptions
object that contains the parameter values for the updateQuota
method.
Custom Headers
The unique ID for your IBM Cloud account.
A JSON document containing the requested updates.
{
"traffic_megabytes": 480
}
Storage quota in megabytes. The value -1 denotes "Unlimited".
Traffic quota in megabytes. The value -1 denotes "Unlimited".
Requested storage quota in megabytes. The value of Max Uint64 (18446744073709551615) denotes "Unlimited". This value is ignored if storage_megabytes is set to a non-zero value.
Requested traffic quota in megabytes. The value of Max Uint64 (18446744073709551615) denotes "Unlimited". This value is ignored if traffic_megabytes is set to a non-zero value.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdateQuota options.
Storage quota in megabytes. The value -1 denotes "Unlimited".
Traffic quota in megabytes. The value -1 denotes "Unlimited".
Examples:480
parameters
Storage quota in megabytes. The value -1 denotes "Unlimited".
Traffic quota in megabytes. The value -1 denotes "Unlimited".
Examples:
parameters
Storage quota in megabytes. The value -1 denotes "Unlimited".
Traffic quota in megabytes. The value -1 denotes "Unlimited".
Examples:
The updateQuota options.
Storage quota in megabytes. The value -1 denotes "Unlimited".
Traffic quota in megabytes. The value -1 denotes "Unlimited".
Examples:480
curl -X PATCH -H "Content-Type: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" -d "{\"traffic_megabytes\":480}" --url 'https://us.icr.io/api/v1/quotas'
updateQuotaOptions := containerRegistryService.NewUpdateQuotaOptions() updateQuotaOptions.SetTrafficMegabytes(int64(480)) response, err := containerRegistryService.UpdateQuota(updateQuotaOptions) if err != nil { panic(err) } if response.StatusCode != 200 { fmt.Printf("\nUnexpected response status code received from UpdateQuota(): %d\n", response.StatusCode) }
const params = { trafficMegabytes: 480, }; containerRegistryService.updateQuota(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
response = container_registry_service.update_quota( traffic_megabytes=480 ).get_result() print(json.dumps(response, indent=2))
UpdateQuotaOptions updateQuotaOptions = new UpdateQuotaOptions.Builder() .trafficMegabytes(Long.valueOf("480")) .build(); service.updateQuota(updateQuotaOptions).execute();
Response
Status Code
Success.
A required header is missing or invalid. Correct the request and try again.
You do not have access to perform the requested operation. You must have either Manager or Billing Manager roles on the targeted account to perform this action.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
No Sample Response
List retention policies
List retention policies for all namespaces in the targeted IBM Cloud account.
List retention policies for all namespaces in the targeted IBM Cloud account.
List retention policies for all namespaces in the targeted IBM Cloud account.
List retention policies for all namespaces in the targeted IBM Cloud account.
List retention policies for all namespaces in the targeted IBM Cloud account.
GET /api/v1/retentions
(containerRegistry *ContainerRegistryV1) ListRetentionPolicies(listRetentionPoliciesOptions *ListRetentionPoliciesOptions) (result map[string]RetentionPolicy, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) ListRetentionPoliciesWithContext(ctx context.Context, listRetentionPoliciesOptions *ListRetentionPoliciesOptions) (result map[string]RetentionPolicy, response *core.DetailedResponse, err error)
listRetentionPolicies(params)
list_retention_policies(
self,
**kwargs,
) -> DetailedResponse
ServiceCall<Map<String, RetentionPolicy>> listRetentionPolicies(ListRetentionPoliciesOptions listRetentionPoliciesOptions)
Request
Instantiate the ListRetentionPoliciesOptions
struct and set the fields to provide parameter values for the ListRetentionPolicies
method.
Use the ListRetentionPoliciesOptions.Builder
to create a ListRetentionPoliciesOptions
object that contains the parameter values for the listRetentionPolicies
method.
Custom Headers
The unique ID for your IBM Cloud account.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
parameters
parameters
curl -X GET -H "accept: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" --url 'https://us.icr.io/api/v1/retentions'
listRetentionPoliciesOptions := containerRegistryService.NewListRetentionPoliciesOptions() mapStringRetentionPolicy, response, err := containerRegistryService.ListRetentionPolicies(listRetentionPoliciesOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(mapStringRetentionPolicy, "", " ") fmt.Println(string(b))
containerRegistryService.listRetentionPolicies({}) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
dict = container_registry_service.list_retention_policies().get_result() print(json.dumps(dict, indent=2))
ListRetentionPoliciesOptions listRetentionPoliciesOptions = new ListRetentionPoliciesOptions(); Response<Map<String, RetentionPolicy>> response = service.listRetentionPolicies(listRetentionPoliciesOptions).execute(); Map<String, RetentionPolicy> mapStringRetentionPolicy = response.getResult(); System.out.println(mapStringRetentionPolicy);
Response
Response type: map[string]RetentionPolicy
Response type: JsonObject
Response type: dict
Response type: Map<String, RetentionPolicy>
A map of namespace names to retention policies
A document that contains the image retention settings for a namespace
- any property
The namespace to which the retention policy is attached.
Account associated with the policy.
Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
Status Code
Success.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "birds": { "namespace": "birds", "account": "79c6d1c71fb1cbedc38ffc251ba2ffff", "images_per_repo": -1, "retain_untagged": true }, "favouritebirds": { "namespace": "favouritebirds", "account": "79c6d1c71fb1cbedc38ffc251ba2ffff", "images_per_repo": 10, "retain_untagged": false } }
{ "birds": { "namespace": "birds", "account": "79c6d1c71fb1cbedc38ffc251ba2ffff", "images_per_repo": -1, "retain_untagged": true }, "favouritebirds": { "namespace": "favouritebirds", "account": "79c6d1c71fb1cbedc38ffc251ba2ffff", "images_per_repo": 10, "retain_untagged": false } }
Set retention policy
Set the retention policy for the specified namespace.
Set the retention policy for the specified namespace.
Set the retention policy for the specified namespace.
Set the retention policy for the specified namespace.
Set the retention policy for the specified namespace.
POST /api/v1/retentions
(containerRegistry *ContainerRegistryV1) SetRetentionPolicy(setRetentionPolicyOptions *SetRetentionPolicyOptions) (response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) SetRetentionPolicyWithContext(ctx context.Context, setRetentionPolicyOptions *SetRetentionPolicyOptions) (response *core.DetailedResponse, err error)
setRetentionPolicy(params)
set_retention_policy(
self,
namespace: str,
*,
images_per_repo: int = None,
retain_untagged: bool = None,
**kwargs,
) -> DetailedResponse
ServiceCall<Void> setRetentionPolicy(SetRetentionPolicyOptions setRetentionPolicyOptions)
Request
Instantiate the SetRetentionPolicyOptions
struct and set the fields to provide parameter values for the SetRetentionPolicy
method.
Use the SetRetentionPolicyOptions.Builder
to create a SetRetentionPolicyOptions
object that contains the parameter values for the setRetentionPolicy
method.
Custom Headers
The unique ID for your IBM Cloud account.
The retention policy parameters to be applied to the namespace, as JSON.
{
"namespace": "birds",
"account": "79c6d1c71fb1cbedc38ffc251ba2ffff",
"images_per_repo": 10,
"retain_untagged": false
}
The namespace to which the retention policy is attached.
Account associated with the policy.
Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The SetRetentionPolicy options.
The namespace to which the retention policy is attached.
Examples:birds
Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
Examples:10
Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
Examples:false
parameters
The namespace to which the retention policy is attached.
Examples:Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
Examples:Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
Examples:
parameters
The namespace to which the retention policy is attached.
Examples:Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
Examples:Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
Examples:
The setRetentionPolicy options.
The namespace to which the retention policy is attached.
Examples:birds
Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
Examples:10
Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
Examples:false
curl -X POST -H "Content-Type: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" -d "{\"namespace\":\"birds\",\"account\":\"79c6d1c71fb1cbedc38ffc251ba2ffff\",\"images_per_repo\":10,\"retain_untagged\":false}" --url 'https://us.icr.io/api/v1/retentions'
setRetentionPolicyOptions := containerRegistryService.NewSetRetentionPolicyOptions( namespaceLink, ) setRetentionPolicyOptions.SetImagesPerRepo(int64(10)) setRetentionPolicyOptions.SetRetainUntagged(false) response, err := containerRegistryService.SetRetentionPolicy(setRetentionPolicyOptions) if err != nil { panic(err) } if response.StatusCode != 200 { fmt.Printf("\nUnexpected response status code received from SetRetentionPolicy(): %d\n", response.StatusCode) }
const params = { namespace: namespaceLink, imagesPerRepo: 10, retainUntagged: false, }; containerRegistryService.setRetentionPolicy(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
response = container_registry_service.set_retention_policy( namespace=namespace_link, images_per_repo=10, retain_untagged=False ).get_result() print(json.dumps(response, indent=2))
SetRetentionPolicyOptions setRetentionPolicyOptions = new SetRetentionPolicyOptions.Builder() .namespace(namespaceLink) .imagesPerRepo(Long.valueOf("10")) .retainUntagged(false) .build(); service.setRetentionPolicy(setRetentionPolicyOptions).execute();
Analyze retention policy
Analyze a retention policy, and get a list of what would be deleted by it.
Analyze a retention policy, and get a list of what would be deleted by it.
Analyze a retention policy, and get a list of what would be deleted by it.
Analyze a retention policy, and get a list of what would be deleted by it.
Analyze a retention policy, and get a list of what would be deleted by it.
POST /api/v1/retentions/analyze
(containerRegistry *ContainerRegistryV1) AnalyzeRetentionPolicy(analyzeRetentionPolicyOptions *AnalyzeRetentionPolicyOptions) (result map[string][]string, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) AnalyzeRetentionPolicyWithContext(ctx context.Context, analyzeRetentionPolicyOptions *AnalyzeRetentionPolicyOptions) (result map[string][]string, response *core.DetailedResponse, err error)
analyzeRetentionPolicy(params)
analyze_retention_policy(
self,
namespace: str,
*,
images_per_repo: int = None,
retain_untagged: bool = None,
**kwargs,
) -> DetailedResponse
ServiceCall<Map<String, List<String>>> analyzeRetentionPolicy(AnalyzeRetentionPolicyOptions analyzeRetentionPolicyOptions)
Request
Instantiate the AnalyzeRetentionPolicyOptions
struct and set the fields to provide parameter values for the AnalyzeRetentionPolicy
method.
Use the AnalyzeRetentionPolicyOptions.Builder
to create a AnalyzeRetentionPolicyOptions
object that contains the parameter values for the analyzeRetentionPolicy
method.
Custom Headers
The unique ID for your IBM Cloud account.
The retention policy parameters to be analyzed, as JSON.
{
"namespace": "birds",
"account": "79c6d1c71fb1cbedc38ffc251ba2ffff",
"images_per_repo": 10,
"retain_untagged": false
}
The namespace to which the retention policy is attached.
Account associated with the policy.
Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The AnalyzeRetentionPolicy options.
The namespace to which the retention policy is attached.
Examples:birds
Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
Examples:10
Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
Examples:false
parameters
The namespace to which the retention policy is attached.
Examples:Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
Examples:Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
Examples:
parameters
The namespace to which the retention policy is attached.
Examples:Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
Examples:Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
Examples:
The analyzeRetentionPolicy options.
The namespace to which the retention policy is attached.
Examples:birds
Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
Examples:10
Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
Examples:false
curl -X POST -H "Content-Type: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" -d "{\"namespace\":\"birds\",\"account\":\"79c6d1c71fb1cbedc38ffc251ba2ffff\",\"images_per_repo\":10,\"retain_untagged\":false}" --url 'https://us.icr.io/api/v1/retentions/analyze'
analyzeRetentionPolicyOptions := containerRegistryService.NewAnalyzeRetentionPolicyOptions( namespaceLink, ) analyzeRetentionPolicyOptions.SetImagesPerRepo(int64(10)) analyzeRetentionPolicyOptions.SetRetainUntagged(false) mapStringstring, response, err := containerRegistryService.AnalyzeRetentionPolicy(analyzeRetentionPolicyOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(mapStringstring, "", " ") fmt.Println(string(b))
const params = { namespace: namespaceLink, imagesPerRepo: 10, retainUntagged: false, }; containerRegistryService.analyzeRetentionPolicy(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
policy_analysis = container_registry_service.analyze_retention_policy( namespace=namespace_link, images_per_repo=10, retain_untagged=False ).get_result() print(json.dumps(policy_analysis, indent=2))
AnalyzeRetentionPolicyOptions analyzeRetentionPolicyOptions = new AnalyzeRetentionPolicyOptions.Builder() .namespace(namespaceLink) .imagesPerRepo(Long.valueOf("10")) .retainUntagged(false) .build(); Response<Map<String, List<String>>> response = service.analyzeRetentionPolicy(analyzeRetentionPolicyOptions).execute(); Map<String, List<String>> mapStringListString = response.getResult(); System.out.println(mapStringListString);
Response
Response type: map[string][]string
Response type: JsonObject
Response type: dict
Response type: Map<String, List<String>>
Analysis of a Retention Policy.
Status Code
Success.
Supplied input was not valid. Correct the request and try again.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd": [ "green", "latest" ], "us.icr.io/birds/sparrow@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4eeee": [ "house" ] }
{ "us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd": [ "green", "latest" ], "us.icr.io/birds/sparrow@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4eeee": [ "house" ] }
Get retention policy
Get the retention policy for the specified namespace.
Get the retention policy for the specified namespace.
Get the retention policy for the specified namespace.
Get the retention policy for the specified namespace.
Get the retention policy for the specified namespace.
GET /api/v1/retentions/{namespace}
(containerRegistry *ContainerRegistryV1) GetRetentionPolicy(getRetentionPolicyOptions *GetRetentionPolicyOptions) (result *RetentionPolicy, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) GetRetentionPolicyWithContext(ctx context.Context, getRetentionPolicyOptions *GetRetentionPolicyOptions) (result *RetentionPolicy, response *core.DetailedResponse, err error)
getRetentionPolicy(params)
get_retention_policy(
self,
namespace: str,
**kwargs,
) -> DetailedResponse
ServiceCall<RetentionPolicy> getRetentionPolicy(GetRetentionPolicyOptions getRetentionPolicyOptions)
Request
Instantiate the GetRetentionPolicyOptions
struct and set the fields to provide parameter values for the GetRetentionPolicy
method.
Use the GetRetentionPolicyOptions.Builder
to create a GetRetentionPolicyOptions
object that contains the parameter values for the getRetentionPolicy
method.
Custom Headers
The unique ID for your IBM Cloud account.
Path Parameters
Gets the retention policy for the specified namespace.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetRetentionPolicy options.
Gets the retention policy for the specified namespace.
parameters
Gets the retention policy for the specified namespace.
parameters
Gets the retention policy for the specified namespace.
The getRetentionPolicy options.
Gets the retention policy for the specified namespace.
curl -X GET -H "accept: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" --url 'https://us.icr.io/api/v1/retentions/birds'
getRetentionPolicyOptions := containerRegistryService.NewGetRetentionPolicyOptions( namespaceLink, ) retentionPolicy, response, err := containerRegistryService.GetRetentionPolicy(getRetentionPolicyOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(retentionPolicy, "", " ") fmt.Println(string(b))
const params = { namespace: namespaceLink, }; containerRegistryService.getRetentionPolicy(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
retention_policy = container_registry_service.get_retention_policy( namespace=namespace_link ).get_result() print(json.dumps(retention_policy, indent=2))
GetRetentionPolicyOptions getRetentionPolicyOptions = new GetRetentionPolicyOptions.Builder() .namespace("testString") .build(); Response<RetentionPolicy> response = service.getRetentionPolicy(getRetentionPolicyOptions).execute(); RetentionPolicy retentionPolicy = response.getResult(); System.out.println(retentionPolicy);
Response
A document that contains the image retention settings for a namespace
The namespace to which the retention policy is attached.
Account associated with the policy.
Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
A document that contains the image retention settings for a namespace.
Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
The namespace to which the retention policy is attached.
Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
A document that contains the image retention settings for a namespace.
Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
The namespace to which the retention policy is attached.
Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
A document that contains the image retention settings for a namespace.
Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
The namespace to which the retention policy is attached.
Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
A document that contains the image retention settings for a namespace.
Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
The namespace to which the retention policy is attached.
Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.
Status Code
Success.
Supplied input was not valid. Correct the request and try again.
You do not have access to the specified namespace. Choose another namespace.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "namespace": "birds", "account": "79c6d1c71fb1cbedc38ffc251ba2ffff", "images_per_repo": 10, "retain_untagged": false }
{ "namespace": "birds", "account": "79c6d1c71fb1cbedc38ffc251ba2ffff", "images_per_repo": 10, "retain_untagged": false }
Get account settings
Get account settings for the targeted account.
Get account settings for the targeted account.
Get account settings for the targeted account.
Get account settings for the targeted account.
Get account settings for the targeted account.
GET /api/v1/settings
(containerRegistry *ContainerRegistryV1) GetSettings(getSettingsOptions *GetSettingsOptions) (result *AccountSettings, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) GetSettingsWithContext(ctx context.Context, getSettingsOptions *GetSettingsOptions) (result *AccountSettings, response *core.DetailedResponse, err error)
getSettings(params)
get_settings(
self,
**kwargs,
) -> DetailedResponse
ServiceCall<AccountSettings> getSettings(GetSettingsOptions getSettingsOptions)
Request
Instantiate the GetSettingsOptions
struct and set the fields to provide parameter values for the GetSettings
method.
Use the GetSettingsOptions.Builder
to create a GetSettingsOptions
object that contains the parameter values for the getSettings
method.
Custom Headers
The unique ID for your IBM Cloud account.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
parameters
parameters
getSettingsOptions := containerRegistryService.NewGetSettingsOptions() accountSettings, response, err := containerRegistryService.GetSettings(getSettingsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(accountSettings, "", " ") fmt.Println(string(b))
containerRegistryService.getSettings({}) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
account_settings = container_registry_service.get_settings().get_result() print(json.dumps(account_settings, indent=2))
GetSettingsOptions getSettingsOptions = new GetSettingsOptions(); Response<AccountSettings> response = service.getSettings(getSettingsOptions).execute(); AccountSettings accountSettings = response.getResult(); System.out.println(accountSettings);
Response
Account settings for the targeted IBM Cloud account
Opt in to IBM Cloud Container Registry publishing platform metrics
Account settings for the targeted IBM Cloud account.
Opt in to IBM Cloud Container Registry publishing platform metrics.
Account settings for the targeted IBM Cloud account.
Opt in to IBM Cloud Container Registry publishing platform metrics.
Account settings for the targeted IBM Cloud account.
Opt in to IBM Cloud Container Registry publishing platform metrics.
Account settings for the targeted IBM Cloud account.
Opt in to IBM Cloud Container Registry publishing platform metrics.
Status Code
Success
A required header is missing. Correct the request and try again.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "platform_metrics": false }
{ "platform_metrics": false }
Update account settings
Update settings for the targeted account.
Update settings for the targeted account.
Update settings for the targeted account.
Update settings for the targeted account.
Update settings for the targeted account.
PATCH /api/v1/settings
(containerRegistry *ContainerRegistryV1) UpdateSettings(updateSettingsOptions *UpdateSettingsOptions) (response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) UpdateSettingsWithContext(ctx context.Context, updateSettingsOptions *UpdateSettingsOptions) (response *core.DetailedResponse, err error)
updateSettings(params)
update_settings(
self,
*,
platform_metrics: bool = None,
**kwargs,
) -> DetailedResponse
ServiceCall<Void> updateSettings(UpdateSettingsOptions updateSettingsOptions)
Request
Instantiate the UpdateSettingsOptions
struct and set the fields to provide parameter values for the UpdateSettings
method.
Use the UpdateSettingsOptions.Builder
to create a UpdateSettingsOptions
object that contains the parameter values for the updateSettings
method.
Custom Headers
The unique ID for your IBM Cloud account.
A JSON document containing the requested updates.
{
"platform_metrics": true
}
Opt in to IBM Cloud Container Registry publishing platform metrics
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdateSettings options.
Opt in to IBM Cloud Container Registry publishing platform metrics.
Examples:true
parameters
Opt in to IBM Cloud Container Registry publishing platform metrics.
Examples:
parameters
Opt in to IBM Cloud Container Registry publishing platform metrics.
Examples:
The updateSettings options.
Opt in to IBM Cloud Container Registry publishing platform metrics.
Examples:true
updateSettingsOptions := containerRegistryService.NewUpdateSettingsOptions() updateSettingsOptions.SetPlatformMetrics(true) response, err := containerRegistryService.UpdateSettings(updateSettingsOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from UpdateSettings(): %d\n", response.StatusCode) }
const params = { platformMetrics: true, }; containerRegistryService.updateSettings(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
response = container_registry_service.update_settings( platform_metrics=True ).get_result() print(json.dumps(response, indent=2))
UpdateSettingsOptions updateSettingsOptions = new UpdateSettingsOptions.Builder() .platformMetrics(true) .build(); service.updateSettings(updateSettingsOptions).execute();
Response
Status Code
Success
A required header is missing or invalid. Correct the request and try again.
You do not have access to perform the requested operation. You must have either Manager or Billing Manager roles on the targeted account to perform this action.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
No Sample Response
Delete tag
Untag a container image in the registry.
Untag a container image in the registry.
Untag a container image in the registry.
Untag a container image in the registry.
Untag a container image in the registry.
DELETE /api/v1/tags/{image}
(containerRegistry *ContainerRegistryV1) DeleteImageTag(deleteImageTagOptions *DeleteImageTagOptions) (result *ImageDeleteResult, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) DeleteImageTagWithContext(ctx context.Context, deleteImageTagOptions *DeleteImageTagOptions) (result *ImageDeleteResult, response *core.DetailedResponse, err error)
deleteImageTag(params)
delete_image_tag(
self,
image: str,
**kwargs,
) -> DetailedResponse
ServiceCall<ImageDeleteResult> deleteImageTag(DeleteImageTagOptions deleteImageTagOptions)
Request
Instantiate the DeleteImageTagOptions
struct and set the fields to provide parameter values for the DeleteImageTag
method.
Use the DeleteImageTagOptions.Builder
to create a DeleteImageTagOptions
object that contains the parameter values for the deleteImageTag
method.
Custom Headers
The unique ID for your IBM Cloud account.
Path Parameters
The name of the image that you want to delete, in the format <REPOSITORY>:<TAG>
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteImageTag options.
The name of the image that you want to delete, in the format <REPOSITORY>:<TAG>.
parameters
The name of the image that you want to delete, in the format <REPOSITORY>:<TAG>.
parameters
The name of the image that you want to delete, in the format <REPOSITORY>:<TAG>.
The deleteImageTag options.
The name of the image that you want to delete, in the format <REPOSITORY>:<TAG>.
curl -X DELETE -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" -H "accept: application/json" --url 'https://us.icr.io/api/v1/tags/us.icr.io%2Fbirds%2Fwoodpecker%3Alatest'
deleteImageTagOptions := containerRegistryService.NewDeleteImageTagOptions( "image name", ) imageDeleteResult, response, err := containerRegistryService.DeleteImageTag(deleteImageTagOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(imageDeleteResult, "", " ") fmt.Println(string(b))
const params = { image: 'image name', }; containerRegistryService.deleteImageTag(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
image_delete_result = container_registry_service.delete_image_tag( image='image name' ).get_result() print(json.dumps(image_delete_result, indent=2))
DeleteImageTagOptions deleteImageTagOptions = new DeleteImageTagOptions.Builder() .image("image name") .build(); Response<ImageDeleteResult> response = service.deleteImageTag(deleteImageTagOptions).execute(); ImageDeleteResult imageDeleteResult = response.getResult(); System.out.println(imageDeleteResult);
Response
Status Code
Success
A required header is missing. Correct the request and try again.
You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again.
You do not have authorization to access the specified namespace.
The specified image was not found. Check the spelling of the specified image.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "Untagged": "us.icr.io/birds/woodpecker:latest" }
{ "Untagged": "us.icr.io/birds/woodpecker:latest" }
List deleted images
List all images that are in the trash can.
List all images that are in the trash can.
List all images that are in the trash can.
List all images that are in the trash can.
List all images that are in the trash can.
GET /api/v1/trash
(containerRegistry *ContainerRegistryV1) ListDeletedImages(listDeletedImagesOptions *ListDeletedImagesOptions) (result map[string]Trash, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) ListDeletedImagesWithContext(ctx context.Context, listDeletedImagesOptions *ListDeletedImagesOptions) (result map[string]Trash, response *core.DetailedResponse, err error)
listDeletedImages(params)
list_deleted_images(
self,
*,
namespace: str = None,
**kwargs,
) -> DetailedResponse
ServiceCall<Map<String, Trash>> listDeletedImages(ListDeletedImagesOptions listDeletedImagesOptions)
Request
Instantiate the ListDeletedImagesOptions
struct and set the fields to provide parameter values for the ListDeletedImages
method.
Use the ListDeletedImagesOptions.Builder
to create a ListDeletedImagesOptions
object that contains the parameter values for the listDeletedImages
method.
Custom Headers
The unique ID for your IBM Cloud account.
Query Parameters
Limit results to trash can images in the given namespace only.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListDeletedImages options.
Limit results to trash can images in the given namespace only.
parameters
Limit results to trash can images in the given namespace only.
parameters
Limit results to trash can images in the given namespace only.
The listDeletedImages options.
Limit results to trash can images in the given namespace only.
curl -X GET -H "accept: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" --url 'https://us.icr.io/api/v1/trash?namespace=birds'
listDeletedImagesOptions := containerRegistryService.NewListDeletedImagesOptions() mapStringTrash, response, err := containerRegistryService.ListDeletedImages(listDeletedImagesOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(mapStringTrash, "", " ") fmt.Println(string(b))
containerRegistryService.listDeletedImages({}) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
dict = container_registry_service.list_deleted_images().get_result() print(json.dumps(dict, indent=2))
ListDeletedImagesOptions listDeletedImagesOptions = new ListDeletedImagesOptions.Builder() .build(); Response<Map<String, Trash>> response = service.listDeletedImages(listDeletedImagesOptions).execute(); Map<String, Trash> mapStringTrash = response.getResult(); System.out.println(mapStringTrash);
Response
Response type: map[string]Trash
Response type: JsonObject
Response type: dict
Response type: Map<String, Trash>
A map of digests in trash, to tags and days until expiry
Details of the tags and days until expiry
- any property
Status Code
Success
A required header is missing. Correct the request and try again.
You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again.
No namespaces exist for this account, or you are not authorized to view any namespaces for this account in this region. Create a namespace, or ensure that the IAM access policy for this account grants you Reader access to at least one namespace. You must have access to at least one namespace so that you can list the contents of the trash can
No namespaces were found for the targeted account. Add a namespace or target a different account
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bbbb": { "tags": [ "greaterspotted" ], "daysUntilExpiry": 4 }, "us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd": { "tags": [ "green", "latest" ], "daysUntilExpiry": 30 }, "us.icr.io/birds/bird@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd": { "tags": [ "greenwoodpecker", "oneeleven", "oneten" ], "daysUntilExpiry": 25 } }
{ "us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4bbbb": { "tags": [ "greaterspotted" ], "daysUntilExpiry": 4 }, "us.icr.io/birds/woodpecker@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd": { "tags": [ "green", "latest" ], "daysUntilExpiry": 30 }, "us.icr.io/birds/bird@sha256:38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd": { "tags": [ "greenwoodpecker", "oneeleven", "oneten" ], "daysUntilExpiry": 25 } }
Restore a digest and all associated tags
In the targeted region, restore a digest, and all of its tags in the same repository, from the trash.
In the targeted region, restore a digest, and all of its tags in the same repository, from the trash.
In the targeted region, restore a digest, and all of its tags in the same repository, from the trash.
In the targeted region, restore a digest, and all of its tags in the same repository, from the trash.
In the targeted region, restore a digest, and all of its tags in the same repository, from the trash.
POST /api/v1/trash/{digest}/restoretags
(containerRegistry *ContainerRegistryV1) RestoreTags(restoreTagsOptions *RestoreTagsOptions) (result *RestoreResult, response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) RestoreTagsWithContext(ctx context.Context, restoreTagsOptions *RestoreTagsOptions) (result *RestoreResult, response *core.DetailedResponse, err error)
restoreTags(params)
restore_tags(
self,
digest: str,
**kwargs,
) -> DetailedResponse
ServiceCall<RestoreResult> restoreTags(RestoreTagsOptions restoreTagsOptions)
Request
Instantiate the RestoreTagsOptions
struct and set the fields to provide parameter values for the RestoreTags
method.
Use the RestoreTagsOptions.Builder
to create a RestoreTagsOptions
object that contains the parameter values for the restoreTags
method.
Custom Headers
The unique ID for your IBM Cloud account.
Path Parameters
The full IBM Cloud registry digest reference for the digest that you want to restore such as
icr.io/namespace/repo@sha256:a9be...
. Call theGET /trash/json
endpoint to review digests that are in the trash and their tags in the same repository.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The RestoreTags options.
The full IBM Cloud registry digest reference for the digest that you want to restore such as
icr.io/namespace/repo@sha256:a9be...
. Call theGET /trash/json
endpoint to review digests that are in the trash and their tags in the same repository.
parameters
The full IBM Cloud registry digest reference for the digest that you want to restore such as
icr.io/namespace/repo@sha256:a9be...
. Call theGET /trash/json
endpoint to review digests that are in the trash and their tags in the same repository.
parameters
The full IBM Cloud registry digest reference for the digest that you want to restore such as
icr.io/namespace/repo@sha256:a9be...
. Call theGET /trash/json
endpoint to review digests that are in the trash and their tags in the same repository.
The restoreTags options.
The full IBM Cloud registry digest reference for the digest that you want to restore such as
icr.io/namespace/repo@sha256:a9be...
. Call theGET /trash/json
endpoint to review digests that are in the trash and their tags in the same repository.
curl -X POST -H "accept: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" --url 'https://us.icr.io/api/v1/trash/us.icr.io%2Fbirds%2Fwoodpecker%40sha256%3A38f97dd92769b18ca82ad9ab6667af47306e66fea5b446937eea68b10ab4dddd/restoretags'
restoreTagsOptions := containerRegistryService.NewRestoreTagsOptions( "image name", // Fully qualified including digest ) restoreResult, response, err := containerRegistryService.RestoreTags(restoreTagsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(restoreResult, "", " ") fmt.Println(string(b))
const params = { digest: 'image name', // Fully qualified including digest }; containerRegistryService.restoreTags(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
restore_result = container_registry_service.restore_tags( digest='image name' # Fully qualified including digest ).get_result() print(json.dumps(restore_result, indent=2))
RestoreTagsOptions restoreTagsOptions = new RestoreTagsOptions.Builder() .digest("image name") // Fully qualified including digest .build(); Response<RestoreResult> response = service.restoreTags(restoreTagsOptions).execute(); RestoreResult restoreResult = response.getResult(); System.out.println(restoreResult);
Response
The result of restoring tags for a digest. In a successful request the digest is always restored, and zero or more of its tags may be restored.
Successful is a list of tags that were restored
Unsuccessful is a list of tags that were not restored because of a conflict
The result of restoring tags for a digest. In a successful request the digest is always restored, and zero or more of its tags may be restored.
Successful is a list of tags that were restored.
Unsuccessful is a list of tags that were not restored because of a conflict.
The result of restoring tags for a digest. In a successful request the digest is always restored, and zero or more of its tags may be restored.
Successful is a list of tags that were restored.
Unsuccessful is a list of tags that were not restored because of a conflict.
The result of restoring tags for a digest. In a successful request the digest is always restored, and zero or more of its tags may be restored.
Successful is a list of tags that were restored.
Unsuccessful is a list of tags that were not restored because of a conflict.
The result of restoring tags for a digest. In a successful request the digest is always restored, and zero or more of its tags may be restored.
Successful is a list of tags that were restored.
Unsuccessful is a list of tags that were not restored because of a conflict.
Status Code
Success
There was a problem with the input. Correct the request and try again.
You do not have push authorization to the specified namespace.
Digest not found.
An internal server error occurred
Unable to authenticate with IBM Cloud. Try again later.
{ "successful": [ "green" ], "unsuccessful": [ "latest" ] }
{ "successful": [ "green" ], "unsuccessful": [ "latest" ] }
Restore deleted image
Restore an image from the trash can.
Restore an image from the trash can.
Restore an image from the trash can.
Restore an image from the trash can.
Restore an image from the trash can.
POST /api/v1/trash/{image}/restore
(containerRegistry *ContainerRegistryV1) RestoreImage(restoreImageOptions *RestoreImageOptions) (response *core.DetailedResponse, err error)
(containerRegistry *ContainerRegistryV1) RestoreImageWithContext(ctx context.Context, restoreImageOptions *RestoreImageOptions) (response *core.DetailedResponse, err error)
restoreImage(params)
restore_image(
self,
image: str,
**kwargs,
) -> DetailedResponse
ServiceCall<Void> restoreImage(RestoreImageOptions restoreImageOptions)
Request
Instantiate the RestoreImageOptions
struct and set the fields to provide parameter values for the RestoreImage
method.
Use the RestoreImageOptions.Builder
to create a RestoreImageOptions
object that contains the parameter values for the restoreImage
method.
Custom Headers
The unique ID for your IBM Cloud account.
Path Parameters
The name of the image that you want to restore, in the format <REPOSITORY>:<TAG>. Run
ibmcloud cr trash-list
or call theGET /trash/json
endpoint to review images that are in the trash.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The RestoreImage options.
The name of the image that you want to restore, in the format <REPOSITORY>:<TAG>. Run
ibmcloud cr trash-list
or call theGET /trash/json
endpoint to review images that are in the trash.
parameters
The name of the image that you want to restore, in the format <REPOSITORY>:<TAG>. Run
ibmcloud cr trash-list
or call theGET /trash/json
endpoint to review images that are in the trash.
parameters
The name of the image that you want to restore, in the format <REPOSITORY>:<TAG>. Run
ibmcloud cr trash-list
or call theGET /trash/json
endpoint to review images that are in the trash.
The restoreImage options.
The name of the image that you want to restore, in the format <REPOSITORY>:<TAG>. Run
ibmcloud cr trash-list
or call theGET /trash/json
endpoint to review images that are in the trash.
curl -X POST -H "accept: application/json" -H "Account: <account_ID>" -H "Authorization: Bearer <bearer_token>" --url 'https://us.icr.io/api/v1/trash/us.icr.io%2Fbirds%2Fwoodpecker%3Agreen/restore'
restoreImageOptions := containerRegistryService.NewRestoreImageOptions( "image name", ) response, err := containerRegistryService.RestoreImage(restoreImageOptions) if err != nil { panic(err) } if response.StatusCode != 200 { fmt.Printf("\nUnexpected response status code received from RestoreImage(): %d\n", response.StatusCode) }
const params = { image: 'image name', }; containerRegistryService.restoreImage(params) .then(res => { console.log(JSON.stringify(res.result, null, 2)); }) .catch(err => { console.warn(err) });
response = container_registry_service.restore_image( image='image name' ).get_result() print(json.dumps(response, indent=2))
RestoreImageOptions restoreImageOptions = new RestoreImageOptions.Builder() .image("image name") .build(); service.restoreImage(restoreImageOptions).execute();