Skip to content

disassociate_ip_groups async

disassociate_ip_groups(
    directory_id: DirectoryId,
    group_ids: IpGroupIdList,
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
) -> DisassociateIpGroupsResult

Disassociates the specified IP access control group from the specified directory.

Parameters:

  • directory_id (DirectoryId) –

    The identifier of the directory.

  • group_ids (IpGroupIdList) –

    The identifiers of one or more IP access control groups.

Raises:

Source code in docs_src/capo_workspaces/_services/async_work_spaces.py
async def disassociate_ip_groups(
    self,
    directory_id: "capo_workspaces.types.directory_id.DirectoryId",
    group_ids: "capo_workspaces.types.ip_group_id_list.IpGroupIdList",
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
) -> (
    "capo_workspaces.types.disassociate_ip_groups_result.DisassociateIpGroupsResult"
):
    """<p>Disassociates the specified IP access control group from the specified directory.</p>

    Args:
        directory_id: <p>The identifier of the directory.</p>
        group_ids: <p>The identifiers of one or more IP access control groups.</p>

    Raises:
        capo_workspaces.errors.access_denied_exception.AccessDeniedException: <p>The user is not authorized to access a resource.</p>
        capo_workspaces.errors.invalid_parameter_values_exception.InvalidParameterValuesException: <p>One or more parameter values are not valid.</p>
        capo_workspaces.errors.invalid_resource_state_exception.InvalidResourceStateException: <p>The state of the resource is not valid for this operation.</p>
        capo_workspaces.errors.operation_not_supported_exception.OperationNotSupportedException: <p>This operation is not supported.</p>
        capo_workspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
        capo_workspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_workspaces.types.disassociate_ip_groups_request.DisassociateIpGroupsRequest]",
    ) -> AsyncOperationResponse[
        "capo_workspaces.types.disassociate_ip_groups_result.DisassociateIpGroupsResult"
    ]:
        import capo_workspaces._operations.workspaces_service.disassociate_ip_groups

        (
            output,
            http_response,
        ) = await capo_workspaces._operations.workspaces_service.disassociate_ip_groups.async_disassociate_ip_groups(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisassociateIpGroups")
    )
    input_: capo_workspaces.types.disassociate_ip_groups_request.DisassociateIpGroupsRequest = {
        "directory_id": directory_id,
        "group_ids": group_ids,
    }

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