Skip to content

create_partner_app_presigned_url async

create_partner_app_presigned_url(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    arn: Optional[PartnerAppArn] = None,
    expires_in_seconds: Optional[ExpiresInSeconds] = None,
    session_expiration_duration_in_seconds: Optional[
        SessionExpirationDurationInSeconds
    ] = None,
) -> CreatePartnerAppPresignedUrlResponse

Creates a presigned URL to access an Amazon SageMaker Partner AI App.

Parameters:

  • arn (Optional[PartnerAppArn], default: None ) –

    The ARN of the SageMaker Partner AI App to create the presigned URL for.

  • expires_in_seconds (Optional[ExpiresInSeconds], default: None ) –

    The time that will pass before the presigned URL expires.

  • session_expiration_duration_in_seconds (Optional[SessionExpirationDurationInSeconds], default: None ) –

    Indicates how long the Amazon SageMaker Partner AI App session can be accessed for after logging in.

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def create_partner_app_presigned_url(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    arn: Optional["capo_sagemaker.types.partner_app_arn.PartnerAppArn"] = None,
    expires_in_seconds: Optional[
        "capo_sagemaker.types.expires_in_seconds.ExpiresInSeconds"
    ] = None,
    session_expiration_duration_in_seconds: Optional[
        "capo_sagemaker.types.session_expiration_duration_in_seconds.SessionExpirationDurationInSeconds"
    ] = None,
) -> "capo_sagemaker.types.create_partner_app_presigned_url_response.CreatePartnerAppPresignedUrlResponse":
    """<p>Creates a presigned URL to access an Amazon SageMaker Partner AI App.</p>

    Args:
        arn: <p>The ARN of the SageMaker Partner AI App to create the presigned URL for.</p>
        expires_in_seconds: <p>The time that will pass before the presigned URL expires.</p>
        session_expiration_duration_in_seconds: <p>Indicates how long the Amazon SageMaker Partner AI App session can be accessed for after logging in.</p>

    Raises:
        capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.create_partner_app_presigned_url_request.CreatePartnerAppPresignedUrlRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.create_partner_app_presigned_url_response.CreatePartnerAppPresignedUrlResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.create_partner_app_presigned_url

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.create_partner_app_presigned_url.async_create_partner_app_presigned_url(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreatePartnerAppPresignedUrl")
    )
    input_: capo_sagemaker.types.create_partner_app_presigned_url_request.CreatePartnerAppPresignedUrlRequest = {}
    if arn is not None:
        input_["arn"] = arn
    if expires_in_seconds is not None:
        input_["expires_in_seconds"] = expires_in_seconds
    if session_expiration_duration_in_seconds is not None:
        input_["session_expiration_duration_in_seconds"] = (
            session_expiration_duration_in_seconds
        )

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