Skip to content

get_artifact_url async

get_artifact_url(
    artifact_id: ArtifactId,
    *,
    config_overrides: Optional[AsyncAmplifyClientConfig] = None,
) -> GetArtifactUrlResult

Returns the artifact info that corresponds to an artifact id.

Parameters:

  • artifact_id (ArtifactId) –

    The unique ID for an artifact.

Raises:

Source code in docs_src/capo_amplify/_services/async_amplify.py
async def get_artifact_url(
    self,
    artifact_id: "capo_amplify.types.artifact_id.ArtifactId",
    *,
    config_overrides: Optional[AsyncAmplifyClientConfig] = None,
) -> "capo_amplify.types.get_artifact_url_result.GetArtifactUrlResult":
    """<p>Returns the artifact info that corresponds to an artifact id. </p>

    Args:
        artifact_id: <p>The unique ID for an artifact. </p>

    Raises:
        capo_amplify.errors.bad_request_exception.BadRequestException: <p>A request contains unexpected data. </p>
        capo_amplify.errors.internal_failure_exception.InternalFailureException: <p>The service failed to perform an operation due to an internal issue. </p>
        capo_amplify.errors.limit_exceeded_exception.LimitExceededException: <p>A resource could not be created because service quotas were exceeded. </p>
        capo_amplify.errors.not_found_exception.NotFoundException: <p>An entity was not found during an operation. </p>
        capo_amplify.errors.unauthorized_exception.UnauthorizedException: <p>An operation failed due to a lack of access. </p>
        capo_amplify.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_amplify.types.get_artifact_url_request.GetArtifactUrlRequest]",
    ) -> AsyncOperationResponse[
        "capo_amplify.types.get_artifact_url_result.GetArtifactUrlResult"
    ]:
        import capo_amplify._operations.amplify.get_artifact_url

        (
            output,
            http_response,
        ) = await capo_amplify._operations.amplify.get_artifact_url.async_get_artifact_url(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetArtifactUrl")
    )
    input_: capo_amplify.types.get_artifact_url_request.GetArtifactUrlRequest = {
        "artifact_id": artifact_id
    }

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