Skip to content

update_network_settings async

update_network_settings(
    network_settings_arn: ARN,
    *,
    config_overrides: Optional[AsyncWorkSpacesWebClientConfig] = None,
    vpc_id: Optional[VpcId] = None,
    subnet_ids: Optional[SubnetIdList] = None,
    security_group_ids: Optional[SecurityGroupIdList] = None,
    client_token: Optional[ClientToken] = None,
) -> UpdateNetworkSettingsResponse

Updates network settings.

Parameters:

  • network_settings_arn (ARN) –

    The ARN of the network settings.

  • vpc_id (Optional[VpcId], default: None ) –

    The VPC that streaming instances will connect to.

  • subnet_ids (Optional[SubnetIdList], default: None ) –

    The subnets in which network interfaces are created to connect streaming instances to your VPC. At least two of these subnets must be in different availability zones.

  • security_group_ids (Optional[SecurityGroupIdList], default: None ) –

    One or more security groups used to control access from streaming instances to your VPC.

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

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token return the result from the original successful request.

    If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.

Raises:

Source code in docs_src/capo_workspaces_web/_services/async_work_spaces_web.py
async def update_network_settings(
    self,
    network_settings_arn: "capo_workspaces_web.types.arn.ARN",
    *,
    config_overrides: Optional[AsyncWorkSpacesWebClientConfig] = None,
    vpc_id: Optional["capo_workspaces_web.types.vpc_id.VpcId"] = None,
    subnet_ids: Optional[
        "capo_workspaces_web.types.subnet_id_list.SubnetIdList"
    ] = None,
    security_group_ids: Optional[
        "capo_workspaces_web.types.security_group_id_list.SecurityGroupIdList"
    ] = None,
    client_token: Optional[
        "capo_workspaces_web.types.client_token.ClientToken"
    ] = None,
) -> "capo_workspaces_web.types.update_network_settings_response.UpdateNetworkSettingsResponse":
    """<p>Updates network settings.</p>

    Args:
        network_settings_arn: <p>The ARN of the network settings.</p>
        vpc_id: <p>The VPC that streaming instances will connect to.</p>
        subnet_ids: <p>The subnets in which network interfaces are created to connect streaming instances to your VPC. At least two of these subnets must be in different availability zones.</p>
        security_group_ids: <p>One or more security groups used to control access from streaming instances to your VPC.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token return the result from the original successful request. </p> <p>If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.</p>

    Raises:
        capo_workspaces_web.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
        capo_workspaces_web.errors.internal_server_exception.InternalServerException: <p>There is an internal server error.</p>
        capo_workspaces_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource cannot be found.</p>
        capo_workspaces_web.errors.throttling_exception.ThrottlingException: <p>There is a throttling error.</p>
        capo_workspaces_web.errors.validation_exception.ValidationException: <p>There is a validation error.</p>
        capo_workspaces_web.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_workspaces_web.types.update_network_settings_request.UpdateNetworkSettingsRequest]",
    ) -> AsyncOperationResponse[
        "capo_workspaces_web.types.update_network_settings_response.UpdateNetworkSettingsResponse"
    ]:
        import capo_workspaces_web._operations.aws_ermine_control_plane_service.update_network_settings

        (
            output,
            http_response,
        ) = await capo_workspaces_web._operations.aws_ermine_control_plane_service.update_network_settings.async_update_network_settings(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateNetworkSettings")
    )
    input_: capo_workspaces_web.types.update_network_settings_request.UpdateNetworkSettingsRequest = {
        "network_settings_arn": network_settings_arn
    }
    if vpc_id is not None:
        input_["vpc_id"] = vpc_id
    if subnet_ids is not None:
        input_["subnet_ids"] = subnet_ids
    if security_group_ids is not None:
        input_["security_group_ids"] = security_group_ids
    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