Disassociates the user from an EC2 instance providing user-based subscriptions.
Parameters:
-
username
(Optional[str], default:
None
)
–
The user name from the Active Directory identity provider for the user.
-
instance_id
(Optional[str], default:
None
)
–
The ID of the EC2 instance which provides user-based subscriptions.
-
identity_provider
(Optional[IdentityProvider], default:
None
)
–
An object that specifies details for the Active Directory identity provider.
-
instance_user_arn
(Optional[Arn], default:
None
)
–
The Amazon Resource Name (ARN) of the user to disassociate from the EC2 instance.
-
domain
(Optional[str], default:
None
)
–
The domain name of the Active Directory that contains information for the user to disassociate.
Raises:
Source code in docs_src/capo_license_manager_user_subscriptions/_services/async_license_manager_user_subscriptions.py
| async def disassociate_user(
self,
*,
config_overrides: Optional[
AsyncLicenseManagerUserSubscriptionsClientConfig
] = None,
username: Optional[str] = None,
instance_id: Optional[str] = None,
identity_provider: Optional[
"capo_license_manager_user_subscriptions.types.identity_provider.IdentityProvider"
] = None,
instance_user_arn: Optional[
"capo_license_manager_user_subscriptions.types.arn.Arn"
] = None,
domain: Optional[str] = None,
) -> "capo_license_manager_user_subscriptions.types.disassociate_user_response.DisassociateUserResponse":
"""<p>Disassociates the user from an EC2 instance providing user-based subscriptions.</p>
Args:
username: <p>The user name from the Active Directory identity provider for the user.</p>
instance_id: <p>The ID of the EC2 instance which provides user-based subscriptions.</p>
identity_provider: <p>An object that specifies details for the Active Directory identity provider.</p>
instance_user_arn: <p>The Amazon Resource Name (ARN) of the user to disassociate from the EC2 instance.</p>
domain: <p>The domain name of the Active Directory that contains information for the user to disassociate.</p>
Raises:
capo_license_manager_user_subscriptions.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
capo_license_manager_user_subscriptions.errors.conflict_exception.ConflictException: <p>The request couldn't be completed because it conflicted with the current state of the resource.</p>
capo_license_manager_user_subscriptions.errors.internal_server_exception.InternalServerException: <p>An exception occurred with the service.</p>
capo_license_manager_user_subscriptions.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource couldn't be found.</p>
capo_license_manager_user_subscriptions.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request failed because a service quota is exceeded.</p>
capo_license_manager_user_subscriptions.errors.throttling_exception.ThrottlingException: <p>The request was denied because of request throttling. Retry the request.</p>
capo_license_manager_user_subscriptions.errors.validation_exception.ValidationException: <p>A parameter is not valid.</p>
capo_license_manager_user_subscriptions.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_license_manager_user_subscriptions.types.disassociate_user_request.DisassociateUserRequest]",
) -> AsyncOperationResponse[
"capo_license_manager_user_subscriptions.types.disassociate_user_response.DisassociateUserResponse"
]:
import capo_license_manager_user_subscriptions._operations.license_manager_user_subscriptions.disassociate_user
(
output,
http_response,
) = await capo_license_manager_user_subscriptions._operations.license_manager_user_subscriptions.disassociate_user.async_disassociate_user(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DisassociateUser")
)
input_: capo_license_manager_user_subscriptions.types.disassociate_user_request.DisassociateUserRequest = {}
if username is not None:
input_["username"] = username
if instance_id is not None:
input_["instance_id"] = instance_id
if identity_provider is not None:
input_["identity_provider"] = identity_provider
if instance_user_arn is not None:
input_["instance_user_arn"] = instance_user_arn
if domain is not None:
input_["domain"] = domain
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|