private ProgressEvent describeRepository()

in aws-codeartifact-repository/src/main/java/software/amazon/codeartifact/repository/ReadHandler.java [107:129]


    private ProgressEvent<ResourceModel, CallbackContext> describeRepository(
        AmazonWebServicesClientProxy proxy,
        ProgressEvent<ResourceModel, CallbackContext> progress,
        ResourceHandlerRequest<ResourceModel> request,
        ProxyClient<CodeartifactClient> proxyClient
    ) {
        return proxy.initiate("AWS-CodeArtifact-Repository::Repository", proxyClient, progress.getResourceModel(),
            progress.getCallbackContext())
            .translateToServiceRequest(Translator::translateToReadRequest)
            .makeServiceCall((awsRequest, client) -> {
                DescribeRepositoryResponse awsResponse = null;
                try {
                    awsResponse = client.injectCredentialsAndInvokeV2(awsRequest, proxyClient.client()::describeRepository);
                } catch (final AwsServiceException e) {
                    String repositoryName = request.getDesiredResourceState().getRepositoryName();
                    Translator.throwCfnException(e, Constants.DESCRIBE_REPOSITORY, repositoryName);
                }
                logger.log(String.format("%s has successfully been read.", ResourceModel.TYPE_NAME));
                return awsResponse;
            })
            .done((describeRepositoryRequest, describeRepositoryResponse, proxyInvocation, resourceModel, context) ->
                ProgressEvent.progress(Translator.translateFromReadResponse(describeRepositoryResponse), context));
    }