Starts setting up Agentic WorkSpaces for your account in the current Region. Setup is asynchronous. To track its progress, call GetAgenticAccountSetup. If setup fails, this operation doesn't return an error. Instead, GetAgenticAccountSetup returns the SETUP_FAILED status.
Parameters:
-
client_token
(Optional[IdempotencyToken], default:
None
)
–
A unique, case-sensitive identifier that you provide to make the request idempotent. A new token starts setup only when the status is NOT_SET_UP or SETUP_FAILED; otherwise the current setup is returned.
Raises:
Examples:
Example – Setting up an account for Agentic WorkSpaces
The following example starts agentic setup for the calling account. Setup runs asynchronously. To track its progress, call GetAgenticAccountSetup.
>>> client.start_agentic_account_setup(client_token='a1b2c3d4-5678-90ab-cdef-EXAMPLE11111')
Source code in docs_src/capo_workspaces/_services/work_spaces.py
| def start_agentic_account_setup(
self,
*,
config_overrides: Optional[WorkSpacesClientConfig] = None,
client_token: Optional[
"capo_workspaces.types.idempotency_token.IdempotencyToken"
] = None,
) -> "capo_workspaces.types.start_agentic_account_setup_result.StartAgenticAccountSetupResult":
"""<p>Starts setting up Agentic WorkSpaces for your account in the current Region. Setup is asynchronous. To track its progress, call <code>GetAgenticAccountSetup</code>. If setup fails, this operation doesn't return an error. Instead, <code>GetAgenticAccountSetup</code> returns the <code>SETUP_FAILED</code> status.</p>
Args:
client_token: <p>A unique, case-sensitive identifier that you provide to make the request idempotent. A new token starts setup only when the status is <code>NOT_SET_UP</code> or <code>SETUP_FAILED</code>; otherwise the current setup is returned.</p>
Raises:
capo_workspaces.errors.access_denied_exception.AccessDeniedException: <p>The user is not authorized to access a resource.</p>
capo_workspaces.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Retry the request with exponential backoff.</p>
capo_workspaces.errors.validation_exception.ValidationException: <p>Your request failed validation. Check the error message for the parameter that isn't valid.</p>
capo_workspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Example – Setting up an account for Agentic WorkSpaces
The following example starts agentic setup for the calling account. Setup runs asynchronously. To track its progress, call GetAgenticAccountSetup.
>>> client.start_agentic_account_setup(client_token='a1b2c3d4-5678-90ab-cdef-EXAMPLE11111')
"""
def _handler(
req: "OperationRequest[capo_workspaces.types.start_agentic_account_setup_request.StartAgenticAccountSetupRequest]",
) -> OperationResponse[
"capo_workspaces.types.start_agentic_account_setup_result.StartAgenticAccountSetupResult"
]:
if req.options.protocol == "awsJson1_1":
import capo_workspaces._operations.workspaces_service.aws_json1_1.start_agentic_account_setup
output, http_response = (
capo_workspaces._operations.workspaces_service.aws_json1_1.start_agentic_account_setup.start_agentic_account_setup(
req.options, req.input
)
)
elif req.options.protocol == "rpcv2Cbor":
import capo_workspaces._operations.workspaces_service.rpcv2_cbor.start_agentic_account_setup
output, http_response = (
capo_workspaces._operations.workspaces_service.rpcv2_cbor.start_agentic_account_setup.start_agentic_account_setup(
req.options, req.input
)
)
else:
raise ValueError(f"unknown protocol {req.options.protocol!r}")
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartAgenticAccountSetup")
)
input_: capo_workspaces.types.start_agentic_account_setup_request.StartAgenticAccountSetupRequest = {}
if client_token is None:
client_token = str(uuid.uuid4())
input_["client_token"] = client_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|