Skip to content

create_registry

create_registry(
    name: RegistryName,
    *,
    config_overrides: Optional[BedrockAgentCoreControlClientConfig] = None,
    description: Optional[Description] = None,
    authorizer_type: Optional[RegistryAuthorizerType] = None,
    authorizer_configuration: Optional[AuthorizerConfiguration] = None,
    client_token: Optional[ClientToken] = None,
    approval_configuration: Optional[ApprovalConfiguration] = None,
) -> CreateRegistryResponse

Creates a new registry in your Amazon Web Services account. A registry serves as a centralized catalog for organizing and managing registry records, including MCP servers, A2A agents, agent skills, and custom resource types.

If you specify CUSTOM_JWT as the authorizerType, you must provide an authorizerConfiguration.

Parameters:

  • name (RegistryName) –

    The name of the registry. The name must be unique within your account and can contain alphanumeric characters and underscores.

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

    A description of the registry.

  • authorizer_type (Optional[RegistryAuthorizerType], default: None ) –

    The type of authorizer to use for the registry. This controls the authorization method for the Search and Invoke APIs used by consumers, and does not affect the standard CRUDL APIs for registry and registry record management used by administrators.

    • CUSTOM_JWT - Authorize with a bearer token.

    • AWS_IAM - Authorize with your Amazon Web Services IAM credentials.

  • authorizer_configuration (Optional[AuthorizerConfiguration], default: None ) –

    The authorizer configuration for the registry. Required if authorizerType is CUSTOM_JWT. For details, see the AuthorizerConfiguration data type.

  • 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.

  • approval_configuration (Optional[ApprovalConfiguration], default: None ) –

    The approval configuration for registry records. Controls whether records require explicit approval before becoming active. See the ApprovalConfiguration data type for supported configuration options.

Raises:

Source code in docs_src/capo_bedrock_agentcore_control/_services/bedrock_agent_core_control.py
def create_registry(
    self,
    name: "capo_bedrock_agentcore_control.types.registry_name.RegistryName",
    *,
    config_overrides: Optional[BedrockAgentCoreControlClientConfig] = None,
    description: Optional[
        "capo_bedrock_agentcore_control.types.description.Description"
    ] = None,
    authorizer_type: Optional[
        "capo_bedrock_agentcore_control.types.registry_authorizer_type.RegistryAuthorizerType"
    ] = None,
    authorizer_configuration: Optional[
        "capo_bedrock_agentcore_control.types.authorizer_configuration.AuthorizerConfiguration"
    ] = None,
    client_token: Optional[
        "capo_bedrock_agentcore_control.types.client_token.ClientToken"
    ] = None,
    approval_configuration: Optional[
        "capo_bedrock_agentcore_control.types.approval_configuration.ApprovalConfiguration"
    ] = None,
) -> "capo_bedrock_agentcore_control.types.create_registry_response.CreateRegistryResponse":
    """<p>Creates a new registry in your Amazon Web Services account. A registry serves as a centralized catalog for organizing and managing registry records, including MCP servers, A2A agents, agent skills, and custom resource types.</p> <p>If you specify <code>CUSTOM_JWT</code> as the <code>authorizerType</code>, you must provide an <code>authorizerConfiguration</code>.</p>

    Args:
        name: <p>The name of the registry. The name must be unique within your account and can contain alphanumeric characters and underscores.</p>
        description: <p>A description of the registry.</p>
        authorizer_type: <p>The type of authorizer to use for the registry. This controls the authorization method for the Search and Invoke APIs used by consumers, and does not affect the standard CRUDL APIs for registry and registry record management used by administrators.</p> <ul> <li> <p> <code>CUSTOM_JWT</code> - Authorize with a bearer token.</p> </li> <li> <p> <code>AWS_IAM</code> - Authorize with your Amazon Web Services IAM credentials.</p> </li> </ul>
        authorizer_configuration: <p>The authorizer configuration for the registry. Required if <code>authorizerType</code> is <code>CUSTOM_JWT</code>. For details, see the <code>AuthorizerConfiguration</code> data type.</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>
        approval_configuration: <p>The approval configuration for registry records. Controls whether records require explicit approval before becoming active. See the <code>ApprovalConfiguration</code> data type for supported configuration options.</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.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.
    """

    def _handler(
        req: "OperationRequest[capo_bedrock_agentcore_control.types.create_registry_request.CreateRegistryRequest]",
    ) -> OperationResponse[
        "capo_bedrock_agentcore_control.types.create_registry_response.CreateRegistryResponse"
    ]:
        import capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.create_registry

        output, http_response = (
            capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.create_registry.create_registry(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

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

        return capo_bedrock_agentcore_control.types.create_registry_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateRegistry", redact_input=_redact_input),
    )
    input_: capo_bedrock_agentcore_control.types.create_registry_request.CreateRegistryRequest = {
        "name": name
    }
    if description is not None:
        input_["description"] = description
    if authorizer_type is not None:
        input_["authorizer_type"] = authorizer_type
    if authorizer_configuration is not None:
        input_["authorizer_configuration"] = authorizer_configuration
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if approval_configuration is not None:
        input_["approval_configuration"] = approval_configuration

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