.. _UpdateCredential: UpdateCredential ================ Replace the key for an existing remote origin. Requires ``objects.update`` permission. No input or output blobs are used. Parameters ---------- * ``origin`` (string, required): the existing origin, using the same normalization as CreateCredential. * ``key`` (object, required): the complete replacement credential; omitted members are not preserved. Behavior -------- The origin must exist. Registration validates key fields without contacting the provider. The update commits or rolls back with the query. Wait for success before submitting queries that should use the new key. Updating a credential in the same query as a media read does not change the key used for that read. Requests already underway may finish with the previous key. See :doc:`../RemoteCredentials` for timing in a cluster and :doc:`../parameters/key` for provider fields. Response -------- Success returns ``status: 0``. Failures return a negative ``status`` and an ``info`` message; see :doc:`../Responses` for error envelopes and retry guidance. Examples -------- .. TESTED_EXAMPLE: UpdateCredential_1 .. code-block:: json [{ "UpdateCredential": { "origin": "s3://training-images", "key": { "access_key": "", "secret_access_key": "", "region": "us-west-2" } } }] Response: .. TESTED_EXAMPLE: UpdateCredential_1_response .. code-block:: json [{ "UpdateCredential": { "status": 0 } }]