Skip to content

update_cluster async

update_cluster(
    cluster_id: __string,
    *,
    config_overrides: Optional[AsyncMediaLiveClientConfig] = None,
    name: Optional[__string] = None,
    network_settings: Optional[ClusterNetworkSettingsUpdateRequest] = None,
) -> UpdateClusterResponse

Change the settings for a Cluster.

Parameters:

  • cluster_id (__string) –

    The ID of the cluster

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

    Include this parameter only if you want to change the current name of the Cluster. Specify a name that is unique in the AWS account. You can't change the name. Names are case-sensitive.

  • network_settings (Optional[ClusterNetworkSettingsUpdateRequest], default: None ) –

    Include this property only if you want to change the current connections between the Nodes in the Cluster and the Networks the Cluster is associated with.

Raises:

Source code in docs_src/capo_medialive/_services/async_media_live.py
async def update_cluster(
    self,
    cluster_id: "capo_medialive.types.__string.__string",
    *,
    config_overrides: Optional[AsyncMediaLiveClientConfig] = None,
    name: Optional["capo_medialive.types.__string.__string"] = None,
    network_settings: Optional[
        "capo_medialive.types.cluster_network_settings_update_request.ClusterNetworkSettingsUpdateRequest"
    ] = None,
) -> "capo_medialive.types.update_cluster_response.UpdateClusterResponse":
    """Change the settings for a Cluster.

    Args:
        cluster_id: The ID of the cluster
        name: Include this parameter only if you want to change the current name of the Cluster. Specify a name that is unique in the AWS account. You can't change the name. Names are case-sensitive.
        network_settings: Include this property only if you want to change the current connections between the Nodes in the Cluster and the Networks the Cluster is associated with.

    Raises:
        capo_medialive.errors.bad_gateway_exception.BadGatewayException: Placeholder documentation for BadGatewayException
        capo_medialive.errors.bad_request_exception.BadRequestException: Placeholder documentation for BadRequestException
        capo_medialive.errors.conflict_exception.ConflictException: Placeholder documentation for ConflictException
        capo_medialive.errors.forbidden_exception.ForbiddenException: Placeholder documentation for ForbiddenException
        capo_medialive.errors.gateway_timeout_exception.GatewayTimeoutException: Placeholder documentation for GatewayTimeoutException
        capo_medialive.errors.internal_server_error_exception.InternalServerErrorException: Placeholder documentation for InternalServerErrorException
        capo_medialive.errors.too_many_requests_exception.TooManyRequestsException: Placeholder documentation for TooManyRequestsException
        capo_medialive.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_medialive.types.update_cluster_request.UpdateClusterRequest]",
    ) -> AsyncOperationResponse[
        "capo_medialive.types.update_cluster_response.UpdateClusterResponse"
    ]:
        import capo_medialive._operations.media_live.update_cluster

        (
            output,
            http_response,
        ) = await capo_medialive._operations.media_live.update_cluster.async_update_cluster(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateCluster")
    )
    input_: capo_medialive.types.update_cluster_request.UpdateClusterRequest = {
        "cluster_id": cluster_id
    }
    if name is not None:
        input_["name"] = name
    if network_settings is not None:
        input_["network_settings"] = network_settings

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