// Module included in the following assemblies:
//
// * openshift_images/image-configuration-hcp.adoc

:_mod-docs-content-type: PROCEDURE
[id="images-registry-mirroring-edit_{context}"]
= Editing an image mirroring configuration

[role="_abstract"]
You can edit an image mirror configuration for a {product-title} cluster with the {rosa-cli-first} tool.

[NOTE]
====
When editing an image mirror configuration, the new mirrors list completely replaces the existing mirrors list.
====

.Procedure

. Run the following command to edit an image mirror configuration:
+
[source,terminal]
----
$ rosa edit image-mirror [arguments]
----
+
.Arguments
[cols="30,70"]
|===
|Option |Definition

|--cluster
|Required: The name or ID (string) of the cluster to which the image mirror configuration applies.

|--mirrors
|Required: New list of mirror registries that replaces current mirror registries. Mirror registries must be comma-separated.

|--id
|Required: ID of the image mirror configuration to edit.

|--profile
|Optional: Use a specific AWS profile from your credential file.

|--region
|Optional: Use a specific AWS region, overriding the AWS_REGION environment variable.
|===

. Run the following command to replace a single mirror on an image mirror configuration:
+
[source,terminal]
----
$ rosa edit image-mirror --cluster=mycluster --id=abc123def456 \
  --mirrors=single-mirror.company.com/team
----
+
.Example Output
[source,terminal]
----
I: Image mirror 'abc123def456' has been updated on cluster 'mycluster'
I: Source: registry.example.com/team
I: Updated mirrors: [single-mirror.company.com/team]
----

. Run the following command to replace all mirrors on an image mirror configuration:
+
[source,terminal]
----
$ rosa edit image-mirror --cluster=mycluster --id=abc123def456 \
  --mirrors=new-primary.company.com/team,new-secondary.company.com/team
----
