Skip to content

disassociate_ip_groups

disassociate_ip_groups(
    directory_id: DirectoryId,
    group_ids: IpGroupIdList,
    *,
    config_overrides: Optional[WorkSpacesClientConfig] = 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/work_spaces.py
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[WorkSpacesClientConfig] = 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.
    """

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

        output, http_response = (
            capo_workspaces._operations.workspaces_service.disassociate_ip_groups.disassociate_ip_groups(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output