Skip to content

create_registry_record async

create_registry_record(
    registry_id: RegistryIdentifier,
    name: RegistryRecordName,
    descriptor_type: DescriptorType,
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    description: Optional[Description] = None,
    descriptors: Optional[Descriptors] = None,
    record_version: Optional[RegistryRecordVersion] = None,
    synchronization_type: Optional[SynchronizationType] = None,
    synchronization_configuration: Optional[SynchronizationConfiguration] = None,
    client_token: Optional[ClientToken] = None,
) -> CreateRegistryRecordResponse

Creates a new registry record within the specified registry. A registry record represents an individual AI resource's metadata in the registry. This could be an MCP server (and associated tools), A2A agent, agent skill, or a custom resource with a custom schema.

The record is processed asynchronously and returns HTTP 202 Accepted.

Parameters:

  • registry_id (RegistryIdentifier) –

    The identifier of the registry where the record will be created. You can specify either the Amazon Resource Name (ARN) or the ID of the registry.

  • name (RegistryRecordName) –

    The name of the registry record.

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

    A description of the registry record.

  • descriptor_type (DescriptorType) –

    The descriptor type of the registry record.

    • MCP - Model Context Protocol descriptor for MCP-compatible servers and tools.

    • A2A - Agent-to-Agent protocol descriptor.

    • CUSTOM - Custom descriptor type for resources such as APIs, Lambda functions, or servers not conforming to a standard protocol.

    • AGENT_SKILLS - Agent skills descriptor for defining agent skill definitions.

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

    The descriptor-type-specific configuration containing the resource schema and metadata. The structure of this field depends on the descriptorType you specify.

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

    The version of the registry record. Use this to track different versions of the record's content.

  • synchronization_type (Optional[SynchronizationType], default: None ) –

    The type of synchronization to use for keeping the record metadata up to date from an external source. Possible values include FROM_URL and NONE.

  • synchronization_configuration (Optional[SynchronizationConfiguration], default: None ) –

    The configuration for synchronizing registry record metadata from an external source, such as a URL-based MCP server.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency.

Raises:

Source code in docs_src/capo_bedrock_agentcore_control/_services/async_bedrock_agent_core_control.py
async def create_registry_record(
    self,
    registry_id: "capo_bedrock_agentcore_control.types.registry_identifier.RegistryIdentifier",
    name: "capo_bedrock_agentcore_control.types.registry_record_name.RegistryRecordName",
    descriptor_type: "capo_bedrock_agentcore_control.types.descriptor_type.DescriptorType",
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    description: Optional[
        "capo_bedrock_agentcore_control.types.description.Description"
    ] = None,
    descriptors: Optional[
        "capo_bedrock_agentcore_control.types.descriptors.Descriptors"
    ] = None,
    record_version: Optional[
        "capo_bedrock_agentcore_control.types.registry_record_version.RegistryRecordVersion"
    ] = None,
    synchronization_type: Optional[
        "capo_bedrock_agentcore_control.types.synchronization_type.SynchronizationType"
    ] = None,
    synchronization_configuration: Optional[
        "capo_bedrock_agentcore_control.types.synchronization_configuration.SynchronizationConfiguration"
    ] = None,
    client_token: Optional[
        "capo_bedrock_agentcore_control.types.client_token.ClientToken"
    ] = None,
) -> "capo_bedrock_agentcore_control.types.create_registry_record_response.CreateRegistryRecordResponse":
    """<p>Creates a new registry record within the specified registry. A registry record represents an individual AI resource's metadata in the registry. This could be an MCP server (and associated tools), A2A agent, agent skill, or a custom resource with a custom schema.</p> <p>The record is processed asynchronously and returns HTTP 202 Accepted.</p>

    Args:
        registry_id: <p>The identifier of the registry where the record will be created. You can specify either the Amazon Resource Name (ARN) or the ID of the registry.</p>
        name: <p>The name of the registry record.</p>
        description: <p>A description of the registry record.</p>
        descriptor_type: <p>The descriptor type of the registry record.</p> <ul> <li> <p> <code>MCP</code> - Model Context Protocol descriptor for MCP-compatible servers and tools.</p> </li> <li> <p> <code>A2A</code> - Agent-to-Agent protocol descriptor.</p> </li> <li> <p> <code>CUSTOM</code> - Custom descriptor type for resources such as APIs, Lambda functions, or servers not conforming to a standard protocol.</p> </li> <li> <p> <code>AGENT_SKILLS</code> - Agent skills descriptor for defining agent skill definitions.</p> </li> </ul>
        descriptors: <p>The descriptor-type-specific configuration containing the resource schema and metadata. The structure of this field depends on the <code>descriptorType</code> you specify.</p>
        record_version: <p>The version of the registry record. Use this to track different versions of the record's content.</p>
        synchronization_type: <p>The type of synchronization to use for keeping the record metadata up to date from an external source. Possible values include <code>FROM_URL</code> and <code>NONE</code>.</p>
        synchronization_configuration: <p>The configuration for synchronizing registry record metadata from an external source, such as a URL-based MCP server.</p>
        client_token: <p>A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>

    Raises:
        capo_bedrock_agentcore_control.errors.access_denied_exception.AccessDeniedException: <p>This exception is thrown when a request is denied per access permissions</p>
        capo_bedrock_agentcore_control.errors.conflict_exception.ConflictException: <p>This exception is thrown when there is a conflict performing an operation</p>
        capo_bedrock_agentcore_control.errors.internal_server_exception.InternalServerException: <p>This exception is thrown if there was an unexpected error during processing of request</p>
        capo_bedrock_agentcore_control.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource referenced by the operation does not exist</p>
        capo_bedrock_agentcore_control.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>This exception is thrown when a request is made beyond the service quota</p>
        capo_bedrock_agentcore_control.errors.throttling_exception.ThrottlingException: <p>This exception is thrown when the number of requests exceeds the limit</p>
        capo_bedrock_agentcore_control.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_bedrock_agentcore_control.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_bedrock_agentcore_control.types.create_registry_record_request.CreateRegistryRecordRequest]",
    ) -> AsyncOperationResponse[
        "capo_bedrock_agentcore_control.types.create_registry_record_response.CreateRegistryRecordResponse"
    ]:
        import capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.create_registry_record

        (
            output,
            http_response,
        ) = await capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.create_registry_record.async_create_registry_record(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_bedrock_agentcore_control.types.create_registry_record_request.CreateRegistryRecordRequest",
    ) -> dict[str, Any]:
        import capo_bedrock_agentcore_control.types.create_registry_record_request

        return capo_bedrock_agentcore_control.types.create_registry_record_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateRegistryRecord", redact_input=_redact_input),
    )
    input_: capo_bedrock_agentcore_control.types.create_registry_record_request.CreateRegistryRecordRequest = {
        "registry_id": registry_id,
        "name": name,
        "descriptor_type": descriptor_type,
    }
    if description is not None:
        input_["description"] = description
    if descriptors is not None:
        input_["descriptors"] = descriptors
    if record_version is not None:
        input_["record_version"] = record_version
    if synchronization_type is not None:
        input_["synchronization_type"] = synchronization_type
    if synchronization_configuration is not None:
        input_["synchronization_configuration"] = synchronization_configuration
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output