Retrieves a list of IP address ranges, specified as IPv4 CIDR blocks, that you can use for the network management interface when you enable Bring Your Own License (BYOL).
This operation can be run only by Amazon Web Services accounts that are enabled for BYOL. If your account isn't enabled for BYOL, you'll receive an AccessDeniedException error.
The management network interface is connected to a secure Amazon WorkSpaces management network. It is used for interactive streaming of the WorkSpace desktop to Amazon WorkSpaces clients, and to allow Amazon WorkSpaces to manage the WorkSpace.
Parameters:
-
management_cidr_range_constraint
(ManagementCidrRangeConstraint)
–
The IP address range to search. Specify an IP address range that is compatible with your network and in CIDR notation (that is, specify the range as an IPv4 CIDR block).
-
max_results
(Optional[ManagementCidrRangeMaxResults], default:
None
)
–
The maximum number of items to return.
-
next_token
(Optional[PaginationToken], default:
None
)
–
If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.
Raises:
Source code in docs_src/capo_workspaces/_services/work_spaces.py
| def list_available_management_cidr_ranges(
self,
management_cidr_range_constraint: "capo_workspaces.types.management_cidr_range_constraint.ManagementCidrRangeConstraint",
*,
config_overrides: Optional[WorkSpacesClientConfig] = None,
max_results: Optional[
"capo_workspaces.types.management_cidr_range_max_results.ManagementCidrRangeMaxResults"
] = None,
next_token: Optional[
"capo_workspaces.types.pagination_token.PaginationToken"
] = None,
) -> "capo_workspaces.types.list_available_management_cidr_ranges_result.ListAvailableManagementCidrRangesResult":
"""<p>Retrieves a list of IP address ranges, specified as IPv4 CIDR blocks, that you can use for the network management interface when you enable Bring Your Own License (BYOL). </p> <p>This operation can be run only by Amazon Web Services accounts that are enabled for BYOL. If your account isn't enabled for BYOL, you'll receive an <code>AccessDeniedException</code> error.</p> <p>The management network interface is connected to a secure Amazon WorkSpaces management network. It is used for interactive streaming of the WorkSpace desktop to Amazon WorkSpaces clients, and to allow Amazon WorkSpaces to manage the WorkSpace.</p>
Args:
management_cidr_range_constraint: <p>The IP address range to search. Specify an IP address range that is compatible with your network and in CIDR notation (that is, specify the range as an IPv4 CIDR block).</p>
max_results: <p>The maximum number of items to return.</p>
next_token: <p>If you received a <code>NextToken</code> from a previous call that was paginated, provide this token to receive the next set of results.</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.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_workspaces.types.list_available_management_cidr_ranges_request.ListAvailableManagementCidrRangesRequest]",
) -> OperationResponse[
"capo_workspaces.types.list_available_management_cidr_ranges_result.ListAvailableManagementCidrRangesResult"
]:
import capo_workspaces._operations.workspaces_service.list_available_management_cidr_ranges
output, http_response = (
capo_workspaces._operations.workspaces_service.list_available_management_cidr_ranges.list_available_management_cidr_ranges(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListAvailableManagementCidrRanges")
)
input_: capo_workspaces.types.list_available_management_cidr_ranges_request.ListAvailableManagementCidrRangesRequest = {
"management_cidr_range_constraint": management_cidr_range_constraint
}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|