Skip to content

update_registry_record

update_registry_record(
    registry_id: RegistryIdentifier,
    record_id: RecordIdentifier,
    *,
    config_overrides: Optional[AgentRegistryControlClientConfig] = None,
    name: Optional[RegistryRecordName] = None,
    display_name: Optional[UpdatedDisplayName] = None,
    description: Optional[UpdatedDescription] = None,
    record_type: Optional[RecordType] = None,
    descriptors: Optional[UpdatedDescriptors] = None,
    record_version: Optional[RegistryRecordVersion] = None,
    custom_metadata: Optional[UpdatedCustomMetadataMap] = None,
    trigger_synchronization: Optional[bool] = None,
    provenance: Optional[ProvenanceList] = None,
) -> UpdateRegistryRecordResponse

Updates a registry record. The update is asynchronous: the record is returned with the UPDATING status while it is processed. Fields that use update wrappers follow PATCH semantics: omit the field to leave it unchanged.

Parameters:

  • registry_id (RegistryIdentifier) –

    The identifier of the registry containing the record (ARN or ID)

  • record_id (RecordIdentifier) –

    The identifier of the registry record to update (ARN or ID)

  • name (Optional[RegistryRecordName], default: None ) –

    The updated name of the registry record. Omit to leave the name unchanged.

  • display_name (Optional[UpdatedDisplayName], default: None ) –

    The updated display name of the registry record. Omit to leave the display name unchanged; provide an empty wrapper to unset it.

  • description (Optional[UpdatedDescription], default: None ) –

    The updated description of the registry record. Omit to leave the description unchanged; provide an empty wrapper to unset it.

  • record_type (Optional[RecordType], default: None ) –

    The updated type of the registry record. Omit to leave the record type unchanged.

  • descriptors (Optional[UpdatedDescriptors], default: None ) –

    The updated typed descriptor content for the registry record. Omit to leave the descriptors unchanged.

  • record_version (Optional[RegistryRecordVersion], default: None ) –

    The updated version of the registry record. Omit to leave the version unchanged.

  • custom_metadata (Optional[UpdatedCustomMetadataMap], default: None ) –

    The updated custom metadata for the registry record. Values can be strings (maximum 128 characters) or native JSON booleans (true or false). Omit to leave the existing metadata unchanged. Supply the wrapper with a full replacement set to update, or with a null value to clear all metadata.

  • trigger_synchronization (Optional[bool], default: None ) –

    Whether to trigger synchronization of the record's descriptor content from its source

  • provenance (Optional[ProvenanceList], default: None ) –

    The provenance lineage re-assertion for the registry record. This field is reserved for the Amazon Web Services Agent Registry auto-detection service principal. Requests that include this field from other callers are rejected. The source identity of an existing lineage is immutable; a re-assertion may only refresh the source details.

Raises:

Source code in docs_src/capo_agent_registry_control/_services/agent_registry_control.py
def update_registry_record(
    self,
    registry_id: "capo_agent_registry_control.types.registry_identifier.RegistryIdentifier",
    record_id: "capo_agent_registry_control.types.record_identifier.RecordIdentifier",
    *,
    config_overrides: Optional[AgentRegistryControlClientConfig] = None,
    name: Optional[
        "capo_agent_registry_control.types.registry_record_name.RegistryRecordName"
    ] = None,
    display_name: Optional[
        "capo_agent_registry_control.types.updated_display_name.UpdatedDisplayName"
    ] = None,
    description: Optional[
        "capo_agent_registry_control.types.updated_description.UpdatedDescription"
    ] = None,
    record_type: Optional[
        "capo_agent_registry_control.types.record_type.RecordType"
    ] = None,
    descriptors: Optional[
        "capo_agent_registry_control.types.updated_descriptors.UpdatedDescriptors"
    ] = None,
    record_version: Optional[
        "capo_agent_registry_control.types.registry_record_version.RegistryRecordVersion"
    ] = None,
    custom_metadata: Optional[
        "capo_agent_registry_control.types.updated_custom_metadata_map.UpdatedCustomMetadataMap"
    ] = None,
    trigger_synchronization: Optional[bool] = None,
    provenance: Optional[
        "capo_agent_registry_control.types.provenance_list.ProvenanceList"
    ] = None,
) -> "capo_agent_registry_control.types.update_registry_record_response.UpdateRegistryRecordResponse":
    """<p>Updates a registry record. The update is asynchronous: the record is returned with the UPDATING status while it is processed. Fields that use update wrappers follow PATCH semantics: omit the field to leave it unchanged.</p>

    Args:
        registry_id: <p>The identifier of the registry containing the record (ARN or ID)</p>
        record_id: <p>The identifier of the registry record to update (ARN or ID)</p>
        name: <p>The updated name of the registry record. Omit to leave the name unchanged.</p>
        display_name: <p>The updated display name of the registry record. Omit to leave the display name unchanged; provide an empty wrapper to unset it.</p>
        description: <p>The updated description of the registry record. Omit to leave the description unchanged; provide an empty wrapper to unset it.</p>
        record_type: <p>The updated type of the registry record. Omit to leave the record type unchanged.</p>
        descriptors: <p>The updated typed descriptor content for the registry record. Omit to leave the descriptors unchanged.</p>
        record_version: <p>The updated version of the registry record. Omit to leave the version unchanged.</p>
        custom_metadata: <p>The updated custom metadata for the registry record. Values can be strings (maximum 128 characters) or native JSON booleans (<code>true</code> or <code>false</code>). Omit to leave the existing metadata unchanged. Supply the wrapper with a full replacement set to update, or with a null value to clear all metadata.</p>
        trigger_synchronization: <p>Whether to trigger synchronization of the record's descriptor content from its source</p>
        provenance: <p>The provenance lineage re-assertion for the registry record. This field is reserved for the Amazon Web Services Agent Registry auto-detection service principal. Requests that include this field from other callers are rejected. The source identity of an existing lineage is immutable; a re-assertion may only refresh the source details.</p>

    Raises:
        capo_agent_registry_control.errors.access_denied_exception.AccessDeniedException: <p>The caller is not authorized to perform the requested action.</p>
        capo_agent_registry_control.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
        capo_agent_registry_control.errors.internal_server_exception.InternalServerException: <p>The request failed due to an unexpected internal error; the caller may retry.</p>
        capo_agent_registry_control.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_agent_registry_control.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling; the caller may retry after a delay.</p>
        capo_agent_registry_control.errors.validation_exception.ValidationException: <p>The request failed validation of one or more input fields.</p>
        capo_agent_registry_control.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_agent_registry_control.types.update_registry_record_request.UpdateRegistryRecordRequest]",
    ) -> OperationResponse[
        "capo_agent_registry_control.types.update_registry_record_response.UpdateRegistryRecordResponse"
    ]:
        import capo_agent_registry_control._operations.agent_registry_control.update_registry_record

        output, http_response = (
            capo_agent_registry_control._operations.agent_registry_control.update_registry_record.update_registry_record(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_agent_registry_control.types.update_registry_record_request.UpdateRegistryRecordRequest",
    ) -> dict[str, Any]:
        import capo_agent_registry_control.types.update_registry_record_request

        return capo_agent_registry_control.types.update_registry_record_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_agent_registry_control.types.update_registry_record_response.UpdateRegistryRecordResponse",
    ) -> dict[str, Any]:
        import capo_agent_registry_control.types.update_registry_record_response

        return capo_agent_registry_control.types.update_registry_record_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateRegistryRecord",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_agent_registry_control.types.update_registry_record_request.UpdateRegistryRecordRequest = {
        "registry_id": registry_id,
        "record_id": record_id,
    }
    if name is not None:
        input_["name"] = name
    if display_name is not None:
        input_["display_name"] = display_name
    if description is not None:
        input_["description"] = description
    if record_type is not None:
        input_["record_type"] = record_type
    if descriptors is not None:
        input_["descriptors"] = descriptors
    if record_version is not None:
        input_["record_version"] = record_version
    if custom_metadata is not None:
        input_["custom_metadata"] = custom_metadata
    if trigger_synchronization is not None:
        input_["trigger_synchronization"] = trigger_synchronization
    if provenance is not None:
        input_["provenance"] = provenance

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output