Lists private workforce information, including workforce name, Amazon Resource Name (ARN), and, if applicable, allowed IP address ranges (CIDRs). Allowable IP address ranges are the IP addresses that workers can use to access tasks.
This operation applies only to private workforces.
Parameters:
-
workforce_name
(Optional[WorkforceName], default:
None
)
–
The name of the private workforce whose access you want to restrict. WorkforceName is automatically set to default when a workforce is created and cannot be modified.
Raises:
Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
| async def describe_workforce(
self,
*,
config_overrides: Optional[AsyncSageMakerClientConfig] = None,
workforce_name: Optional[
"capo_sagemaker.types.workforce_name.WorkforceName"
] = None,
) -> "capo_sagemaker.types.describe_workforce_response.DescribeWorkforceResponse":
"""<p>Lists private workforce information, including workforce name, Amazon Resource Name (ARN), and, if applicable, allowed IP address ranges (<a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html">CIDRs</a>). Allowable IP address ranges are the IP addresses that workers can use to access tasks. </p> <important> <p>This operation applies only to private workforces.</p> </important>
Args:
workforce_name: <p>The name of the private workforce whose access you want to restrict. <code>WorkforceName</code> is automatically set to <code>default</code> when a workforce is created and cannot be modified. </p>
Raises:
capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_sagemaker.types.describe_workforce_request.DescribeWorkforceRequest]",
) -> AsyncOperationResponse[
"capo_sagemaker.types.describe_workforce_response.DescribeWorkforceResponse"
]:
import capo_sagemaker._operations.sage_maker.describe_workforce
(
output,
http_response,
) = await capo_sagemaker._operations.sage_maker.describe_workforce.async_describe_workforce(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeWorkforce")
)
input_: capo_sagemaker.types.describe_workforce_request.DescribeWorkforceRequest = {}
if workforce_name is not None:
input_["workforce_name"] = workforce_name
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|