Skip to content

accept_grant async

accept_grant(
    grant_arn: Arn,
    *,
    config_overrides: Optional[AsyncLicenseManagerClientConfig] = None,
) -> AcceptGrantResponse

Accepts the specified grant.

Parameters:

  • grant_arn (Arn) –

    Amazon Resource Name (ARN) of the grant.

Raises:

Source code in docs_src/capo_license_manager/_services/async_license_manager.py
async def accept_grant(
    self,
    grant_arn: "capo_license_manager.types.arn.Arn",
    *,
    config_overrides: Optional[AsyncLicenseManagerClientConfig] = None,
) -> "capo_license_manager.types.accept_grant_response.AcceptGrantResponse":
    """<p>Accepts the specified grant.</p>

    Args:
        grant_arn: <p>Amazon Resource Name (ARN) of the grant.</p>

    Raises:
        capo_license_manager.errors.access_denied_exception.AccessDeniedException: <p>Access to resource denied.</p>
        capo_license_manager.errors.authorization_exception.AuthorizationException: <p>The Amazon Web Services user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
        capo_license_manager.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One or more parameter values are not valid.</p>
        capo_license_manager.errors.rate_limit_exceeded_exception.RateLimitExceededException: <p>Too many requests have been submitted. Try again after a brief wait.</p>
        capo_license_manager.errors.resource_limit_exceeded_exception.ResourceLimitExceededException: <p>Your resource limits have been exceeded.</p>
        capo_license_manager.errors.server_internal_exception.ServerInternalException: <p>The server experienced an internal error. Try again.</p>
        capo_license_manager.errors.validation_exception.ValidationException: <p>The provided input is not valid. Try your request again.</p>
        capo_license_manager.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_license_manager.types.accept_grant_request.AcceptGrantRequest]",
    ) -> AsyncOperationResponse[
        "capo_license_manager.types.accept_grant_response.AcceptGrantResponse"
    ]:
        import capo_license_manager._operations.aws_license_manager.accept_grant

        (
            output,
            http_response,
        ) = await capo_license_manager._operations.aws_license_manager.accept_grant.async_accept_grant(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AcceptGrant")
    )
    input_: capo_license_manager.types.accept_grant_request.AcceptGrantRequest = {
        "grant_arn": grant_arn
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output