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,
    artifact: Optional[UpdatedRegistryRecordArtifact] = None,
    record_version: Optional[RegistryRecordVersion] = None,
    custom_metadata: Optional[UpdatedCustomMetadataMap] = None,
    trigger_synchronization: Optional[bool] = None,
    force_authentication: Optional[bool] = None,
    provenance: Optional[ProvenanceList] = None,
) -> UpdateRegistryRecordResponse

Updates a registry record. The update is asynchronous: the operation returns the record with the UPDATING status while the registry processes it. If a GitHub user must first authorize access to the record's skill source, the operation returns the record with the UPDATE_PENDING_AUTH status instead. 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.

  • artifact (Optional[UpdatedRegistryRecordArtifact], default: None ) –

    The change to the record's uploaded skill package. Omit it to keep the current package, specify an empty object to remove an uploaded package, or specify optionalValue to upload a new package. An empty object doesn't remove a package that the record synchronizes from a source. To stop that synchronization, remove skillPackage. A request that changes skillMd.data replaces the record's package with that text, even if you omit this member.

  • 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 ) –

    Specifies whether to synchronize the record's descriptor content from its source. For a skill record, the registry reads the stored skillMd.source or skillPackage.source again, because it doesn't watch the source for changes. For a GitHub source, the operation also returns a new authorization link when one is needed. An update that sets a different skill source starts a synchronization even if you omit this member.

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

    Specifies whether to ask a GitHub user to authorize access again, even when the current authorization still works, for example to use a different GitHub account. You can use it only together with triggerSynchronization, for a GitHub source whose credential provider uses the AUTHORIZATION_CODE grant. The new authorization also replaces the one that the same IAM principal's other records in the registry use for the same host, credential provider, scopes, and custom parameters.

  • 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,
    artifact: Optional[
        "capo_agent_registry_control.types.updated_registry_record_artifact.UpdatedRegistryRecordArtifact"
    ] = 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,
    force_authentication: 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 operation returns the record with the <code>UPDATING</code> status while the registry processes it. If a GitHub user must first authorize access to the record's skill source, the operation returns the record with the <code>UPDATE_PENDING_AUTH</code> status instead. 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>
        artifact: <p>The change to the record's uploaded skill package. Omit it to keep the current package, specify an empty object to remove an uploaded package, or specify <code>optionalValue</code> to upload a new package. An empty object doesn't remove a package that the record synchronizes from a source. To stop that synchronization, remove <code>skillPackage</code>. A request that changes <code>skillMd.data</code> replaces the record's package with that text, even if you omit this member.</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>Specifies whether to synchronize the record's descriptor content from its source. For a skill record, the registry reads the stored <code>skillMd.source</code> or <code>skillPackage.source</code> again, because it doesn't watch the source for changes. For a GitHub source, the operation also returns a new authorization link when one is needed. An update that sets a different skill source starts a synchronization even if you omit this member.</p>
        force_authentication: <p>Specifies whether to ask a GitHub user to authorize access again, even when the current authorization still works, for example to use a different GitHub account. You can use it only together with <code>triggerSynchronization</code>, for a GitHub source whose credential provider uses the <code>AUTHORIZATION_CODE</code> grant. The new authorization also replaces the one that the same IAM principal's other records in the registry use for the same host, credential provider, scopes, and custom parameters.</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 artifact is not None:
        input_["artifact"] = artifact
    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 force_authentication is not None:
        input_["force_authentication"] = force_authentication
    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