Skip to content

create_configuration

create_configuration(
    *,
    config_overrides: Optional[mqClientConfig] = None,
    authentication_strategy: Optional[AuthenticationStrategy] = None,
    engine_type: Optional[EngineType] = None,
    engine_version: Optional[__string] = None,
    name: Optional[__string] = None,
    tags: Optional[__mapOf__string] = None,
) -> CreateConfigurationResponse

Creates a new configuration for the specified configuration name. Amazon MQ uses the default configuration (the engine type and version).

Parameters:

  • authentication_strategy (Optional[AuthenticationStrategy], default: None ) –

    Optional. The authentication strategy associated with the configuration. The default is SIMPLE.

  • engine_type (Optional[EngineType], default: None ) –

    Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.

  • engine_version (Optional[__string], default: None ) –

    The broker engine version. Defaults to the latest available version for the specified broker engine type. For more information, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide.

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

    Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.

  • tags (Optional[__mapOf__string], default: None ) –

    Create tags when creating the configuration.

Raises:

Source code in docs_src/capo_mq/_services/mq.py
def create_configuration(
    self,
    *,
    config_overrides: Optional[mqClientConfig] = None,
    authentication_strategy: Optional[
        "capo_mq.types.authentication_strategy.AuthenticationStrategy"
    ] = None,
    engine_type: Optional["capo_mq.types.engine_type.EngineType"] = None,
    engine_version: Optional["capo_mq.types.__string.__string"] = None,
    name: Optional["capo_mq.types.__string.__string"] = None,
    tags: Optional["capo_mq.types.__map_of__string.__mapOf__string"] = None,
) -> "capo_mq.types.create_configuration_response.CreateConfigurationResponse":
    """<p>Creates a new configuration for the specified configuration name. Amazon MQ uses the default configuration (the engine type and version).</p>

    Args:
        authentication_strategy: <p>Optional. The authentication strategy associated with the configuration. The default is SIMPLE.</p>
        engine_type: <p>Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.</p>
        engine_version: <p>The broker engine version. Defaults to the latest available version for the specified broker engine type. For more information, see the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/activemq-version-management.html">ActiveMQ version management</a> and the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/rabbitmq-version-management.html">RabbitMQ version management</a> sections in the Amazon MQ Developer Guide.</p>
        name: <p>Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.</p>
        tags: <p>Create tags when creating the configuration.</p>

    Raises:
        capo_mq.errors.bad_request_exception.BadRequestException: <p>Returns information about an error.</p>
        capo_mq.errors.conflict_exception.ConflictException: <p>Returns information about an error.</p>
        capo_mq.errors.forbidden_exception.ForbiddenException: <p>Returns information about an error.</p>
        capo_mq.errors.internal_server_error_exception.InternalServerErrorException: <p>Returns information about an error.</p>
        capo_mq.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_mq.types.create_configuration_request.CreateConfigurationRequest]",
    ) -> OperationResponse[
        "capo_mq.types.create_configuration_response.CreateConfigurationResponse"
    ]:
        import capo_mq._operations.mq.create_configuration

        output, http_response = (
            capo_mq._operations.mq.create_configuration.create_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateConfiguration")
    )
    input_: capo_mq.types.create_configuration_request.CreateConfigurationRequest = {}
    if authentication_strategy is not None:
        input_["authentication_strategy"] = authentication_strategy
    if engine_type is not None:
        input_["engine_type"] = engine_type
    if engine_version is not None:
        input_["engine_version"] = engine_version
    if name is not None:
        input_["name"] = name
    if tags is not None:
        input_["tags"] = tags

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