Skip to content

update_broker async

update_broker(
    broker_id: __string,
    *,
    config_overrides: Optional[AsyncmqClientConfig] = None,
    authentication_strategy: Optional[AuthenticationStrategy] = None,
    auto_minor_version_upgrade: Optional[__boolean] = None,
    configuration: Optional[ConfigurationId] = None,
    engine_version: Optional[__string] = None,
    host_instance_type: Optional[__string] = None,
    ldap_server_metadata: Optional[LdapServerMetadataInput] = None,
    logs: Optional[Logs] = None,
    maintenance_window_start_time: Optional[WeeklyStartTime] = None,
    resource_share_arns: Optional[__listOf__string] = None,
    security_groups: Optional[__listOf__string] = None,
    storage_size: Optional[__integer] = None,
    data_replication_mode: Optional[DataReplicationMode] = None,
) -> UpdateBrokerResponse

Adds a pending configuration change to a broker.

Parameters:

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

    Optional. The authentication strategy used to secure the broker. The default is SIMPLE.

  • auto_minor_version_upgrade (Optional[__boolean], default: None ) –

    Enables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot.

    Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.

  • broker_id (__string) –

    The unique ID that Amazon MQ generates for the broker.

  • configuration (Optional[ConfigurationId], default: None ) –

    A list of information about the configuration.

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

    The broker engine version. For more information, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide.

    When upgrading to ActiveMQ version 5.18 and above or RabbitMQ version 3.13 and above, you must have autoMinorVersionUpgrade set to true for the broker.

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

    The broker's host instance type to upgrade to. For a list of supported instance types, see Broker instance types.

  • ldap_server_metadata (Optional[LdapServerMetadataInput], default: None ) –

    Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.

  • logs (Optional[Logs], default: None ) –

    Enables Amazon CloudWatch logging for brokers.

  • maintenance_window_start_time (Optional[WeeklyStartTime], default: None ) –

    The parameters that determine the WeeklyStartTime.

  • resource_share_arns (Optional[__listOf__string], default: None ) –

    The list of resource shares to update on the broker

  • security_groups (Optional[__listOf__string], default: None ) –

    The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.

  • storage_size (Optional[__integer], default: None ) –

    The broker's storage size in GB.

  • data_replication_mode (Optional[DataReplicationMode], default: None ) –

    Defines whether this broker is a part of a data replication pair.

Raises:

Source code in docs_src/capo_mq/_services/async_mq.py
async def update_broker(
    self,
    broker_id: "capo_mq.types.__string.__string",
    *,
    config_overrides: Optional[AsyncmqClientConfig] = None,
    authentication_strategy: Optional[
        "capo_mq.types.authentication_strategy.AuthenticationStrategy"
    ] = None,
    auto_minor_version_upgrade: Optional[
        "capo_mq.types.__boolean.__boolean"
    ] = None,
    configuration: Optional[
        "capo_mq.types.configuration_id.ConfigurationId"
    ] = None,
    engine_version: Optional["capo_mq.types.__string.__string"] = None,
    host_instance_type: Optional["capo_mq.types.__string.__string"] = None,
    ldap_server_metadata: Optional[
        "capo_mq.types.ldap_server_metadata_input.LdapServerMetadataInput"
    ] = None,
    logs: Optional["capo_mq.types.logs.Logs"] = None,
    maintenance_window_start_time: Optional[
        "capo_mq.types.weekly_start_time.WeeklyStartTime"
    ] = None,
    resource_share_arns: Optional[
        "capo_mq.types.__list_of__string.__listOf__string"
    ] = None,
    security_groups: Optional[
        "capo_mq.types.__list_of__string.__listOf__string"
    ] = None,
    storage_size: Optional["capo_mq.types.__integer.__integer"] = None,
    data_replication_mode: Optional[
        "capo_mq.types.data_replication_mode.DataReplicationMode"
    ] = None,
) -> "capo_mq.types.update_broker_response.UpdateBrokerResponse":
    """<p>Adds a pending configuration change to a broker.</p>

    Args:
        authentication_strategy: <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
        auto_minor_version_upgrade: <p>Enables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot.</p> <note><p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p></note>
        broker_id: <p>The unique ID that Amazon MQ generates for the broker.</p>
        configuration: <p>A list of information about the configuration.</p>
        engine_version: <p>The broker engine version. 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> <note><p>When upgrading to ActiveMQ version 5.18 and above or RabbitMQ version 3.13 and above, you must have autoMinorVersionUpgrade set to true for the broker.</p></note>
        host_instance_type: <p>The broker's host instance type to upgrade to. For a list of supported instance types, see <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/broker.html#broker-instance-types">Broker instance types</a>.</p>
        ldap_server_metadata: <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
        logs: <p>Enables Amazon CloudWatch logging for brokers.</p>
        maintenance_window_start_time: <p>The parameters that determine the WeeklyStartTime.</p>
        resource_share_arns: <p>The list of resource shares to update on the broker</p>
        security_groups: <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
        storage_size: <p>The broker's storage size in GB.</p>
        data_replication_mode: <p>Defines whether this broker is a part of a data replication pair.</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.not_found_exception.NotFoundException: <p>Returns information about an error.</p>
        capo_mq.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mq.types.update_broker_request.UpdateBrokerRequest]",
    ) -> AsyncOperationResponse[
        "capo_mq.types.update_broker_response.UpdateBrokerResponse"
    ]:
        import capo_mq._operations.mq.update_broker

        (
            output,
            http_response,
        ) = await capo_mq._operations.mq.update_broker.async_update_broker(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateBroker")
    )
    input_: capo_mq.types.update_broker_request.UpdateBrokerRequest = {
        "broker_id": broker_id
    }
    if authentication_strategy is not None:
        input_["authentication_strategy"] = authentication_strategy
    if auto_minor_version_upgrade is not None:
        input_["auto_minor_version_upgrade"] = auto_minor_version_upgrade
    if configuration is not None:
        input_["configuration"] = configuration
    if engine_version is not None:
        input_["engine_version"] = engine_version
    if host_instance_type is not None:
        input_["host_instance_type"] = host_instance_type
    if ldap_server_metadata is not None:
        input_["ldap_server_metadata"] = ldap_server_metadata
    if logs is not None:
        input_["logs"] = logs
    if maintenance_window_start_time is not None:
        input_["maintenance_window_start_time"] = maintenance_window_start_time
    if resource_share_arns is not None:
        input_["resource_share_arns"] = resource_share_arns
    if security_groups is not None:
        input_["security_groups"] = security_groups
    if storage_size is not None:
        input_["storage_size"] = storage_size
    if data_replication_mode is not None:
        input_["data_replication_mode"] = data_replication_mode

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