Skip to content

start_access_request

start_access_request(
    reason: String1to256,
    targets: Targets,
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    tags: Optional[TagList] = None,
) -> StartAccessRequestResponse

Starts the workflow for just-in-time node access sessions.

Parameters:

  • reason (String1to256) –

    A brief description explaining why you are requesting access to the node.

  • targets (Targets) –

    The node you are requesting access to.

  • tags (Optional[TagList], default: None ) –

    Key-value pairs of metadata you want to assign to the access request.

Raises:

  • AccessDeniedException –

    The requester doesn't have permissions to perform the requested operation.

  • InternalServerError –

    An error occurred on the server side.

  • ResourceNotFoundException –

    The specified parameter to be shared could not be found.

  • ServiceQuotaExceededException –

    The request exceeds the service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your Amazon Web Services account.

  • ThrottlingException –

    The request or operation couldn't be performed because the service is throttling requests.

  • ValidationException –

    The request isn't valid. Verify that you entered valid contents for the command and try again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_ssm/_services/ssm.py
def start_access_request(
    self,
    reason: "capo_ssm.types.string1to256.String1to256",
    targets: "capo_ssm.types.targets.Targets",
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    tags: Optional["capo_ssm.types.tag_list.TagList"] = None,
) -> "capo_ssm.types.start_access_request_response.StartAccessRequestResponse":
    """<p>Starts the workflow for just-in-time node access sessions.</p>

    Args:
        reason: <p>A brief description explaining why you are requesting access to the node.</p>
        targets: <p>The node you are requesting access to.</p>
        tags: <p>Key-value pairs of metadata you want to assign to the access request.</p>

    Raises:
        capo_ssm.errors.access_denied_exception.AccessDeniedException: <p>The requester doesn't have permissions to perform the requested operation.</p>
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified parameter to be shared could not be found.</p>
        capo_ssm.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request exceeds the service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your Amazon Web Services account.</p>
        capo_ssm.errors.throttling_exception.ThrottlingException: <p>The request or operation couldn't be performed because the service is throttling requests.</p>
        capo_ssm.errors.validation_exception.ValidationException: <p>The request isn't valid. Verify that you entered valid contents for the command and try again.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm.types.start_access_request_request.StartAccessRequestRequest]",
    ) -> OperationResponse[
        "capo_ssm.types.start_access_request_response.StartAccessRequestResponse"
    ]:
        import capo_ssm._operations.amazon_ssm.start_access_request

        output, http_response = (
            capo_ssm._operations.amazon_ssm.start_access_request.start_access_request(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartAccessRequest")
    )
    input_: capo_ssm.types.start_access_request_request.StartAccessRequestRequest = {
        "reason": reason,
        "targets": targets,
    }
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output