com.amazonaws.services.codeartifact.AWSCodeArtifactClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codeartifact Show documentation
/*
* Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.codeartifact;
import org.w3c.dom.*;
import java.net.*;
import java.util.*;
import javax.annotation.Generated;
import org.apache.commons.logging.*;
import com.amazonaws.*;
import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.auth.*;
import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.internal.auth.*;
import com.amazonaws.metrics.*;
import com.amazonaws.regions.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.protocol.json.*;
import com.amazonaws.util.AWSRequestMetrics.Field;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.client.builder.AdvancedConfig;
import com.amazonaws.services.codeartifact.AWSCodeArtifactClientBuilder;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.codeartifact.model.*;
import com.amazonaws.services.codeartifact.model.transform.*;
/**
* Client for accessing CodeArtifact. All service calls made using this client are blocking, and will not return until
* the service call completes.
*
*
* AWS CodeArtifact is a fully managed artifact repository compatible with language-native package managers and build
* tools such as npm, Apache Maven, and pip. You can use CodeArtifact to share packages with development teams and pull
* packages. Packages can be pulled from both public and CodeArtifact repositories. You can also create an upstream
* relationship between a CodeArtifact repository and another repository, which effectively merges their contents from
* the point of view of a package manager client.
*
*
* AWS CodeArtifact Components
*
*
* Use the information in this guide to help you work with the following CodeArtifact components:
*
*
* -
*
* Repository: A CodeArtifact repository contains a set of package
* versions, each of which maps to a set of assets, or files. Repositories are polyglot, so a single repository can
* contain packages of any supported type. Each repository exposes endpoints for fetching and publishing packages using
* tools like the npm
CLI, the Maven CLI ( mvn
), and pip
* . You can create up to 100 repositories per AWS account.
*
*
* -
*
* Domain: Repositories are aggregated into a higher-level entity known as a domain. All package assets
* and metadata are stored in the domain, but are consumed through repositories. A given package asset, such as a Maven
* JAR file, is stored once per domain, no matter how many repositories it's present in. All of the assets and metadata
* in a domain are encrypted with the same customer master key (CMK) stored in AWS Key Management Service (AWS KMS).
*
*
* Each repository is a member of a single domain and can't be moved to a different domain.
*
*
* The domain allows organizational policy to be applied across multiple repositories, such as which accounts can access
* repositories in the domain, and which public repositories can be used as sources of packages.
*
*
* Although an organization can have multiple domains, we recommend a single production domain that contains all
* published artifacts so that teams can find and share packages across their organization.
*
*
* -
*
* Package: A package is a bundle of software and the metadata required to resolve dependencies and
* install the software. CodeArtifact supports npm, PyPI, and Maven package formats.
*
*
* In CodeArtifact, a package consists of:
*
*
* -
*
* A name (for example, webpack
is the name of a popular npm package)
*
*
* -
*
* An optional namespace (for example, @types
in @types/node
)
*
*
* -
*
* A set of versions (for example, 1.0.0
, 1.0.1
, 1.0.2
, etc.)
*
*
* -
*
* Package-level metadata (for example, npm tags)
*
*
*
*
* -
*
* Package version: A version of a package, such as @types/node 12.6.9
. The version number format
* and semantics vary for different package formats. For example, npm package versions must conform to the Semantic Versioning specification. In CodeArtifact, a package version consists of the
* version identifier, metadata at the package version level, and a set of assets.
*
*
* -
*
* Upstream repository: One repository is upstream of another when the package versions in it can be
* accessed from the repository endpoint of the downstream repository, effectively merging the contents of the two
* repositories from the point of view of a client. CodeArtifact allows creating an upstream relationship between two
* repositories.
*
*
* -
*
* Asset: An individual file stored in CodeArtifact associated with a package version, such as an npm
* .tgz
file or Maven POM and JAR files.
*
*
*
*
* CodeArtifact supports these operations:
*
*
* -
*
* AssociateExternalConnection
: Adds an existing external connection to a repository.
*
*
* -
*
* CopyPackageVersions
: Copies package versions from one repository to another repository in the same
* domain.
*
*
* -
*
* CreateDomain
: Creates a domain
*
*
* -
*
* CreateRepository
: Creates a CodeArtifact repository in a domain.
*
*
* -
*
* DeleteDomain
: Deletes a domain. You cannot delete a domain that contains repositories.
*
*
* -
*
* DeleteDomainPermissionsPolicy
: Deletes the resource policy that is set on a domain.
*
*
* -
*
* DeletePackageVersions
: Deletes versions of a package. After a package has been deleted, it can be
* republished, but its assets and metadata cannot be restored because they have been permanently removed from storage.
*
*
* -
*
* DeleteRepository
: Deletes a repository.
*
*
* -
*
* DeleteRepositoryPermissionsPolicy
: Deletes the resource policy that is set on a repository.
*
*
* -
*
* DescribeDomain
: Returns a DomainDescription
object that contains information about the
* requested domain.
*
*
* -
*
* DescribePackageVersion
: Returns a
* PackageVersionDescription
* object that contains details about a package version.
*
*
* -
*
* DescribeRepository
: Returns a RepositoryDescription
object that contains detailed
* information about the requested repository.
*
*
* -
*
* DisposePackageVersions
: Disposes versions of a package. A package version with the status
* Disposed
cannot be restored because they have been permanently removed from storage.
*
*
* -
*
* DisassociateExternalConnection
: Removes an existing external connection from a repository.
*
*
* -
*
* GetAuthorizationToken
: Generates a temporary authorization token for accessing repositories in the
* domain. The token expires the authorization period has passed. The default authorization period is 12 hours and can
* be customized to any length with a maximum of 12 hours.
*
*
* -
*
* GetDomainPermissionsPolicy
: Returns the policy of a resource that is attached to the specified domain.
*
*
* -
*
* GetPackageVersionAsset
: Returns the contents of an asset that is in a package version.
*
*
* -
*
* GetPackageVersionReadme
: Gets the readme file or descriptive text for a package version.
*
*
* -
*
* GetRepositoryEndpoint
: Returns the endpoint of a repository for a specific package format. A repository
* has one endpoint for each package format:
*
*
* -
*
* npm
*
*
* -
*
* pypi
*
*
* -
*
* maven
*
*
*
*
* -
*
* GetRepositoryPermissionsPolicy
: Returns the resource policy that is set on a repository.
*
*
* -
*
* ListDomains
: Returns a list of DomainSummary
objects. Each returned
* DomainSummary
object contains information about a domain.
*
*
* -
*
* ListPackages
: Lists the packages in a repository.
*
*
* -
*
* ListPackageVersionAssets
: Lists the assets for a given package version.
*
*
* -
*
* ListPackageVersionDependencies
: Returns a list of the direct dependencies for a package version.
*
*
* -
*
* ListPackageVersions
: Returns a list of package versions for a specified package in a repository.
*
*
* -
*
* ListRepositories
: Returns a list of repositories owned by the AWS account that called this method.
*
*
* -
*
* ListRepositoriesInDomain
: Returns a list of the repositories in a domain.
*
*
* -
*
* PutDomainPermissionsPolicy
: Attaches a resource policy to a domain.
*
*
* -
*
* PutRepositoryPermissionsPolicy
: Sets the resource policy on a repository that specifies permissions to
* access it.
*
*
* -
*
* UpdatePackageVersionsStatus
: Updates the status of one or more versions of a package.
*
*
* -
*
* UpdateRepository
: Updates the properties of a repository.
*
*
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSCodeArtifactClient extends AmazonWebServiceClient implements AWSCodeArtifact {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AWSCodeArtifact.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "codeartifact";
/** Client configuration factory providing ClientConfigurations tailored to this client */
protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory();
private final AdvancedConfig advancedConfig;
private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory(
new JsonClientMetadata()
.withProtocolVersion("1.1")
.withSupportsCbor(false)
.withSupportsIon(false)
.withContentTypeOverride("")
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller(
com.amazonaws.services.codeartifact.model.transform.AccessDeniedExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller(
com.amazonaws.services.codeartifact.model.transform.ConflictExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller(
com.amazonaws.services.codeartifact.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller(
com.amazonaws.services.codeartifact.model.transform.ThrottlingExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller(
com.amazonaws.services.codeartifact.model.transform.ValidationExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ServiceQuotaExceededException").withExceptionUnmarshaller(
com.amazonaws.services.codeartifact.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller(
com.amazonaws.services.codeartifact.model.transform.InternalServerExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.codeartifact.model.AWSCodeArtifactException.class));
public static AWSCodeArtifactClientBuilder builder() {
return AWSCodeArtifactClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on CodeArtifact using the specified parameters.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AWSCodeArtifactClient(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on CodeArtifact using the specified parameters.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AWSCodeArtifactClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) {
super(clientParams);
this.awsCredentialsProvider = clientParams.getCredentialsProvider();
this.advancedConfig = clientParams.getAdvancedConfig();
init();
}
private void init() {
setServiceNameIntern(DEFAULT_SIGNING_NAME);
setEndpointPrefix(ENDPOINT_PREFIX);
// calling this.setEndPoint(...) will also modify the signer accordingly
setEndpoint("codeartifact.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/codeartifact/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/codeartifact/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
*
* Adds an existing external connection to a repository. One external connection is allowed per repository.
*
*
*
* A repository can have one or more upstream repositories, or an external connection.
*
*
*
* @param associateExternalConnectionRequest
* @return Result of the AssociateExternalConnection operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ServiceQuotaExceededException
* The operation did not succeed because it would have exceeded a service limit for your account.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.AssociateExternalConnection
* @see AWS API Documentation
*/
@Override
public AssociateExternalConnectionResult associateExternalConnection(AssociateExternalConnectionRequest request) {
request = beforeClientExecution(request);
return executeAssociateExternalConnection(request);
}
@SdkInternalApi
final AssociateExternalConnectionResult executeAssociateExternalConnection(AssociateExternalConnectionRequest associateExternalConnectionRequest) {
ExecutionContext executionContext = createExecutionContext(associateExternalConnectionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AssociateExternalConnectionRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(associateExternalConnectionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssociateExternalConnection");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AssociateExternalConnectionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Copies package versions from one repository to another repository in the same domain.
*
*
*
* You must specify versions
or versionRevisions
. You cannot specify both.
*
*
*
* @param copyPackageVersionsRequest
* @return Result of the CopyPackageVersions operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ServiceQuotaExceededException
* The operation did not succeed because it would have exceeded a service limit for your account.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.CopyPackageVersions
* @see AWS API Documentation
*/
@Override
public CopyPackageVersionsResult copyPackageVersions(CopyPackageVersionsRequest request) {
request = beforeClientExecution(request);
return executeCopyPackageVersions(request);
}
@SdkInternalApi
final CopyPackageVersionsResult executeCopyPackageVersions(CopyPackageVersionsRequest copyPackageVersionsRequest) {
ExecutionContext executionContext = createExecutionContext(copyPackageVersionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CopyPackageVersionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(copyPackageVersionsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CopyPackageVersions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CopyPackageVersionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a domain. CodeArtifact domains make it easier to manage multiple repositories across an
* organization. You can use a domain to apply permissions across many repositories owned by different AWS accounts.
* An asset is stored only once in a domain, even if it's in multiple repositories.
*
*
* Although you can have multiple domains, we recommend a single production domain that contains all published
* artifacts so that your development teams can find and share packages. You can use a second pre-production domain
* to test changes to the production domain configuration.
*
*
* @param createDomainRequest
* @return Result of the CreateDomain operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ServiceQuotaExceededException
* The operation did not succeed because it would have exceeded a service limit for your account.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.CreateDomain
* @see AWS API
* Documentation
*/
@Override
public CreateDomainResult createDomain(CreateDomainRequest request) {
request = beforeClientExecution(request);
return executeCreateDomain(request);
}
@SdkInternalApi
final CreateDomainResult executeCreateDomain(CreateDomainRequest createDomainRequest) {
ExecutionContext executionContext = createExecutionContext(createDomainRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateDomainRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createDomainRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDomain");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDomainResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a repository.
*
*
* @param createRepositoryRequest
* @return Result of the CreateRepository operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ServiceQuotaExceededException
* The operation did not succeed because it would have exceeded a service limit for your account.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.CreateRepository
* @see AWS
* API Documentation
*/
@Override
public CreateRepositoryResult createRepository(CreateRepositoryRequest request) {
request = beforeClientExecution(request);
return executeCreateRepository(request);
}
@SdkInternalApi
final CreateRepositoryResult executeCreateRepository(CreateRepositoryRequest createRepositoryRequest) {
ExecutionContext executionContext = createExecutionContext(createRepositoryRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateRepositoryRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createRepositoryRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateRepository");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateRepositoryResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a domain. You cannot delete a domain that contains repositories. If you want to delete a domain with
* repositories, first delete its repositories.
*
*
* @param deleteDomainRequest
* @return Result of the DeleteDomain operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.DeleteDomain
* @see AWS API
* Documentation
*/
@Override
public DeleteDomainResult deleteDomain(DeleteDomainRequest request) {
request = beforeClientExecution(request);
return executeDeleteDomain(request);
}
@SdkInternalApi
final DeleteDomainResult executeDeleteDomain(DeleteDomainRequest deleteDomainRequest) {
ExecutionContext executionContext = createExecutionContext(deleteDomainRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteDomainRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteDomainRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDomain");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteDomainResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the resource policy set on a domain.
*
*
* @param deleteDomainPermissionsPolicyRequest
* @return Result of the DeleteDomainPermissionsPolicy operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.DeleteDomainPermissionsPolicy
* @see AWS API Documentation
*/
@Override
public DeleteDomainPermissionsPolicyResult deleteDomainPermissionsPolicy(DeleteDomainPermissionsPolicyRequest request) {
request = beforeClientExecution(request);
return executeDeleteDomainPermissionsPolicy(request);
}
@SdkInternalApi
final DeleteDomainPermissionsPolicyResult executeDeleteDomainPermissionsPolicy(DeleteDomainPermissionsPolicyRequest deleteDomainPermissionsPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(deleteDomainPermissionsPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteDomainPermissionsPolicyRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteDomainPermissionsPolicyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDomainPermissionsPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteDomainPermissionsPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes one or more versions of a package. A deleted package version cannot be restored in your repository. If
* you want to remove a package version from your repository and be able to restore it later, set its status to
* Archived
. Archived packages cannot be downloaded from a repository and don't show up with list
* package APIs (for example,
* ListackageVersions
* ), but you can restore them using
* UpdatePackageVersionsStatus
* .
*
*
* @param deletePackageVersionsRequest
* @return Result of the DeletePackageVersions operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.DeletePackageVersions
* @see AWS API Documentation
*/
@Override
public DeletePackageVersionsResult deletePackageVersions(DeletePackageVersionsRequest request) {
request = beforeClientExecution(request);
return executeDeletePackageVersions(request);
}
@SdkInternalApi
final DeletePackageVersionsResult executeDeletePackageVersions(DeletePackageVersionsRequest deletePackageVersionsRequest) {
ExecutionContext executionContext = createExecutionContext(deletePackageVersionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeletePackageVersionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePackageVersionsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePackageVersions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeletePackageVersionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a repository.
*
*
* @param deleteRepositoryRequest
* @return Result of the DeleteRepository operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.DeleteRepository
* @see AWS
* API Documentation
*/
@Override
public DeleteRepositoryResult deleteRepository(DeleteRepositoryRequest request) {
request = beforeClientExecution(request);
return executeDeleteRepository(request);
}
@SdkInternalApi
final DeleteRepositoryResult executeDeleteRepository(DeleteRepositoryRequest deleteRepositoryRequest) {
ExecutionContext executionContext = createExecutionContext(deleteRepositoryRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteRepositoryRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteRepositoryRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteRepository");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteRepositoryResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the resource policy that is set on a repository. After a resource policy is deleted, the permissions
* allowed and denied by the deleted policy are removed. The effect of deleting a resource policy might not be
* immediate.
*
*
*
* Use DeleteRepositoryPermissionsPolicy
with caution. After a policy is deleted, AWS users, roles, and
* accounts lose permissions to perform the repository actions granted by the deleted policy.
*
*
*
* @param deleteRepositoryPermissionsPolicyRequest
* @return Result of the DeleteRepositoryPermissionsPolicy operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.DeleteRepositoryPermissionsPolicy
* @see AWS API Documentation
*/
@Override
public DeleteRepositoryPermissionsPolicyResult deleteRepositoryPermissionsPolicy(DeleteRepositoryPermissionsPolicyRequest request) {
request = beforeClientExecution(request);
return executeDeleteRepositoryPermissionsPolicy(request);
}
@SdkInternalApi
final DeleteRepositoryPermissionsPolicyResult executeDeleteRepositoryPermissionsPolicy(
DeleteRepositoryPermissionsPolicyRequest deleteRepositoryPermissionsPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(deleteRepositoryPermissionsPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteRepositoryPermissionsPolicyRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteRepositoryPermissionsPolicyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteRepositoryPermissionsPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteRepositoryPermissionsPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a
* DomainDescription
object that contains information about the requested domain.
*
*
* @param describeDomainRequest
* @return Result of the DescribeDomain operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.DescribeDomain
* @see AWS
* API Documentation
*/
@Override
public DescribeDomainResult describeDomain(DescribeDomainRequest request) {
request = beforeClientExecution(request);
return executeDescribeDomain(request);
}
@SdkInternalApi
final DescribeDomainResult executeDescribeDomain(DescribeDomainRequest describeDomainRequest) {
ExecutionContext executionContext = createExecutionContext(describeDomainRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeDomainRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeDomainRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDomain");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeDomainResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a
* PackageVersionDescription
object that contains information about the requested package version.
*
*
* @param describePackageVersionRequest
* @return Result of the DescribePackageVersion operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.DescribePackageVersion
* @see AWS API Documentation
*/
@Override
public DescribePackageVersionResult describePackageVersion(DescribePackageVersionRequest request) {
request = beforeClientExecution(request);
return executeDescribePackageVersion(request);
}
@SdkInternalApi
final DescribePackageVersionResult executeDescribePackageVersion(DescribePackageVersionRequest describePackageVersionRequest) {
ExecutionContext executionContext = createExecutionContext(describePackageVersionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribePackageVersionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describePackageVersionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribePackageVersion");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribePackageVersionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a RepositoryDescription
object that contains detailed information about the requested
* repository.
*
*
* @param describeRepositoryRequest
* @return Result of the DescribeRepository operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.DescribeRepository
* @see AWS API Documentation
*/
@Override
public DescribeRepositoryResult describeRepository(DescribeRepositoryRequest request) {
request = beforeClientExecution(request);
return executeDescribeRepository(request);
}
@SdkInternalApi
final DescribeRepositoryResult executeDescribeRepository(DescribeRepositoryRequest describeRepositoryRequest) {
ExecutionContext executionContext = createExecutionContext(describeRepositoryRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeRepositoryRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeRepositoryRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeRepository");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeRepositoryResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Removes an existing external connection from a repository.
*
*
* @param disassociateExternalConnectionRequest
* @return Result of the DisassociateExternalConnection operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ServiceQuotaExceededException
* The operation did not succeed because it would have exceeded a service limit for your account.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.DisassociateExternalConnection
* @see AWS API Documentation
*/
@Override
public DisassociateExternalConnectionResult disassociateExternalConnection(DisassociateExternalConnectionRequest request) {
request = beforeClientExecution(request);
return executeDisassociateExternalConnection(request);
}
@SdkInternalApi
final DisassociateExternalConnectionResult executeDisassociateExternalConnection(DisassociateExternalConnectionRequest disassociateExternalConnectionRequest) {
ExecutionContext executionContext = createExecutionContext(disassociateExternalConnectionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DisassociateExternalConnectionRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(disassociateExternalConnectionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociateExternalConnection");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DisassociateExternalConnectionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the assets in package versions and sets the package versions' status to Disposed
. A disposed
* package version cannot be restored in your repository because its assets are deleted.
*
*
* To view all disposed package versions in a repository, use
* ListackageVersions
* and set the
* status
* parameter to Disposed
.
*
*
* To view information about a disposed package version, use
* ListPackageVersions
* and set the
* status
* parameter to Disposed
.
*
*
* @param disposePackageVersionsRequest
* @return Result of the DisposePackageVersions operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.DisposePackageVersions
* @see AWS API Documentation
*/
@Override
public DisposePackageVersionsResult disposePackageVersions(DisposePackageVersionsRequest request) {
request = beforeClientExecution(request);
return executeDisposePackageVersions(request);
}
@SdkInternalApi
final DisposePackageVersionsResult executeDisposePackageVersions(DisposePackageVersionsRequest disposePackageVersionsRequest) {
ExecutionContext executionContext = createExecutionContext(disposePackageVersionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DisposePackageVersionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(disposePackageVersionsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisposePackageVersions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DisposePackageVersionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Generates a temporary authentication token for accessing repositories in the domain. This API requires the
* codeartifact:GetAuthorizationToken
and sts:GetServiceBearerToken
permissions.
*
*
*
* CodeArtifact authorization tokens are valid for a period of 12 hours when created with the login
* command. You can call login
periodically to refresh the token. When you create an authorization
* token with the GetAuthorizationToken
API, you can set a custom authorization period, up to a maximum
* of 12 hours, with the durationSeconds
parameter.
*
*
* The authorization period begins after login
or GetAuthorizationToken
is called. If
* login
or GetAuthorizationToken
is called while assuming a role, the token lifetime is
* independent of the maximum session duration of the role. For example, if you call sts assume-role
* and specify a session duration of 15 minutes, then generate a CodeArtifact authorization token, the token will be
* valid for the full authorization period even though this is longer than the 15-minute session duration.
*
*
* See Using IAM Roles for more
* information on controlling session duration.
*
*
*
* @param getAuthorizationTokenRequest
* @return Result of the GetAuthorizationToken operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.GetAuthorizationToken
* @see AWS API Documentation
*/
@Override
public GetAuthorizationTokenResult getAuthorizationToken(GetAuthorizationTokenRequest request) {
request = beforeClientExecution(request);
return executeGetAuthorizationToken(request);
}
@SdkInternalApi
final GetAuthorizationTokenResult executeGetAuthorizationToken(GetAuthorizationTokenRequest getAuthorizationTokenRequest) {
ExecutionContext executionContext = createExecutionContext(getAuthorizationTokenRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetAuthorizationTokenRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getAuthorizationTokenRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetAuthorizationToken");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new GetAuthorizationTokenResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns the resource policy attached to the specified domain.
*
*
*
* The policy is a resource-based policy, not an identity-based policy. For more information, see Identity-based
* policies and resource-based policies in the AWS Identity and Access Management User Guide.
*
*
*
* @param getDomainPermissionsPolicyRequest
* @return Result of the GetDomainPermissionsPolicy operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.GetDomainPermissionsPolicy
* @see AWS API Documentation
*/
@Override
public GetDomainPermissionsPolicyResult getDomainPermissionsPolicy(GetDomainPermissionsPolicyRequest request) {
request = beforeClientExecution(request);
return executeGetDomainPermissionsPolicy(request);
}
@SdkInternalApi
final GetDomainPermissionsPolicyResult executeGetDomainPermissionsPolicy(GetDomainPermissionsPolicyRequest getDomainPermissionsPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(getDomainPermissionsPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetDomainPermissionsPolicyRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(getDomainPermissionsPolicyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetDomainPermissionsPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new GetDomainPermissionsPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns an asset (or file) that is in a package. For example, for a Maven package version, use
* GetPackageVersionAsset
to download a JAR
file, a POM
file, or any other
* assets in the package version.
*
*
* @param getPackageVersionAssetRequest
* @return Result of the GetPackageVersionAsset operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.GetPackageVersionAsset
* @see AWS API Documentation
*/
@Override
public GetPackageVersionAssetResult getPackageVersionAsset(GetPackageVersionAssetRequest request) {
request = beforeClientExecution(request);
return executeGetPackageVersionAsset(request);
}
@SdkInternalApi
final GetPackageVersionAssetResult executeGetPackageVersionAsset(GetPackageVersionAssetRequest getPackageVersionAssetRequest) {
ExecutionContext executionContext = createExecutionContext(getPackageVersionAssetRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetPackageVersionAssetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getPackageVersionAssetRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetPackageVersionAsset");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(false).withHasStreamingSuccessResponse(true),
new GetPackageVersionAssetResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
request.addHandlerContext(HandlerContextKey.HAS_STREAMING_OUTPUT, Boolean.TRUE);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets the readme file or descriptive text for a package version. For packages that do not contain a readme file,
* CodeArtifact extracts a description from a metadata file. For example, from the <description>
* element in the pom.xml
file of a Maven package.
*
*
* The returned text might contain formatting. For example, it might contain formatting for Markdown or
* reStructuredText.
*
*
* @param getPackageVersionReadmeRequest
* @return Result of the GetPackageVersionReadme operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.GetPackageVersionReadme
* @see AWS API Documentation
*/
@Override
public GetPackageVersionReadmeResult getPackageVersionReadme(GetPackageVersionReadmeRequest request) {
request = beforeClientExecution(request);
return executeGetPackageVersionReadme(request);
}
@SdkInternalApi
final GetPackageVersionReadmeResult executeGetPackageVersionReadme(GetPackageVersionReadmeRequest getPackageVersionReadmeRequest) {
ExecutionContext executionContext = createExecutionContext(getPackageVersionReadmeRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetPackageVersionReadmeRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(getPackageVersionReadmeRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetPackageVersionReadme");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new GetPackageVersionReadmeResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns the endpoint of a repository for a specific package format. A repository has one endpoint for each
* package format:
*
*
* -
*
* npm
*
*
* -
*
* pypi
*
*
* -
*
* maven
*
*
*
*
* @param getRepositoryEndpointRequest
* @return Result of the GetRepositoryEndpoint operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.GetRepositoryEndpoint
* @see AWS API Documentation
*/
@Override
public GetRepositoryEndpointResult getRepositoryEndpoint(GetRepositoryEndpointRequest request) {
request = beforeClientExecution(request);
return executeGetRepositoryEndpoint(request);
}
@SdkInternalApi
final GetRepositoryEndpointResult executeGetRepositoryEndpoint(GetRepositoryEndpointRequest getRepositoryEndpointRequest) {
ExecutionContext executionContext = createExecutionContext(getRepositoryEndpointRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetRepositoryEndpointRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getRepositoryEndpointRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetRepositoryEndpoint");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new GetRepositoryEndpointResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns the resource policy that is set on a repository.
*
*
* @param getRepositoryPermissionsPolicyRequest
* @return Result of the GetRepositoryPermissionsPolicy operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.GetRepositoryPermissionsPolicy
* @see AWS API Documentation
*/
@Override
public GetRepositoryPermissionsPolicyResult getRepositoryPermissionsPolicy(GetRepositoryPermissionsPolicyRequest request) {
request = beforeClientExecution(request);
return executeGetRepositoryPermissionsPolicy(request);
}
@SdkInternalApi
final GetRepositoryPermissionsPolicyResult executeGetRepositoryPermissionsPolicy(GetRepositoryPermissionsPolicyRequest getRepositoryPermissionsPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(getRepositoryPermissionsPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetRepositoryPermissionsPolicyRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(getRepositoryPermissionsPolicyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetRepositoryPermissionsPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new GetRepositoryPermissionsPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of
* DomainSummary
* objects for all domains owned by the AWS account that makes this call. Each returned DomainSummary
* object contains information about a domain.
*
*
* @param listDomainsRequest
* @return Result of the ListDomains operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.ListDomains
* @see AWS API
* Documentation
*/
@Override
public ListDomainsResult listDomains(ListDomainsRequest request) {
request = beforeClientExecution(request);
return executeListDomains(request);
}
@SdkInternalApi
final ListDomainsResult executeListDomains(ListDomainsRequest listDomainsRequest) {
ExecutionContext executionContext = createExecutionContext(listDomainsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListDomainsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listDomainsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDomains");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListDomainsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of
* AssetSummary
objects for assets in a package version.
*
*
* @param listPackageVersionAssetsRequest
* @return Result of the ListPackageVersionAssets operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.ListPackageVersionAssets
* @see AWS API Documentation
*/
@Override
public ListPackageVersionAssetsResult listPackageVersionAssets(ListPackageVersionAssetsRequest request) {
request = beforeClientExecution(request);
return executeListPackageVersionAssets(request);
}
@SdkInternalApi
final ListPackageVersionAssetsResult executeListPackageVersionAssets(ListPackageVersionAssetsRequest listPackageVersionAssetsRequest) {
ExecutionContext executionContext = createExecutionContext(listPackageVersionAssetsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListPackageVersionAssetsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(listPackageVersionAssetsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPackageVersionAssets");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListPackageVersionAssetsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns the direct dependencies for a package version. The dependencies are returned as
* PackageDependency
objects. CodeArtifact extracts the dependencies for a package version from
* the metadata file for the package format (for example, the package.json
file for npm packages and
* the pom.xml
file for Maven). Any package version dependencies that are not listed in the
* configuration file are not returned.
*
*
* @param listPackageVersionDependenciesRequest
* @return Result of the ListPackageVersionDependencies operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.ListPackageVersionDependencies
* @see AWS API Documentation
*/
@Override
public ListPackageVersionDependenciesResult listPackageVersionDependencies(ListPackageVersionDependenciesRequest request) {
request = beforeClientExecution(request);
return executeListPackageVersionDependencies(request);
}
@SdkInternalApi
final ListPackageVersionDependenciesResult executeListPackageVersionDependencies(ListPackageVersionDependenciesRequest listPackageVersionDependenciesRequest) {
ExecutionContext executionContext = createExecutionContext(listPackageVersionDependenciesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListPackageVersionDependenciesRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(listPackageVersionDependenciesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPackageVersionDependencies");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListPackageVersionDependenciesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of
* PackageVersionSummary
objects for package versions in a repository that match the request
* parameters.
*
*
* @param listPackageVersionsRequest
* @return Result of the ListPackageVersions operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.ListPackageVersions
* @see AWS API Documentation
*/
@Override
public ListPackageVersionsResult listPackageVersions(ListPackageVersionsRequest request) {
request = beforeClientExecution(request);
return executeListPackageVersions(request);
}
@SdkInternalApi
final ListPackageVersionsResult executeListPackageVersions(ListPackageVersionsRequest listPackageVersionsRequest) {
ExecutionContext executionContext = createExecutionContext(listPackageVersionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListPackageVersionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPackageVersionsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPackageVersions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPackageVersionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of
* PackageSummary
objects for packages in a repository that match the request parameters.
*
*
* @param listPackagesRequest
* @return Result of the ListPackages operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.ListPackages
* @see AWS API
* Documentation
*/
@Override
public ListPackagesResult listPackages(ListPackagesRequest request) {
request = beforeClientExecution(request);
return executeListPackages(request);
}
@SdkInternalApi
final ListPackagesResult executeListPackages(ListPackagesRequest listPackagesRequest) {
ExecutionContext executionContext = createExecutionContext(listPackagesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListPackagesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPackagesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPackages");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPackagesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of
* RepositorySummary
objects. Each RepositorySummary
contains information about a
* repository in the specified AWS account and that matches the input parameters.
*
*
* @param listRepositoriesRequest
* @return Result of the ListRepositories operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.ListRepositories
* @see AWS
* API Documentation
*/
@Override
public ListRepositoriesResult listRepositories(ListRepositoriesRequest request) {
request = beforeClientExecution(request);
return executeListRepositories(request);
}
@SdkInternalApi
final ListRepositoriesResult executeListRepositories(ListRepositoriesRequest listRepositoriesRequest) {
ExecutionContext executionContext = createExecutionContext(listRepositoriesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListRepositoriesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listRepositoriesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListRepositories");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListRepositoriesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of
* RepositorySummary
objects. Each RepositorySummary
contains information about a
* repository in the specified domain and that matches the input parameters.
*
*
* @param listRepositoriesInDomainRequest
* @return Result of the ListRepositoriesInDomain operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.ListRepositoriesInDomain
* @see AWS API Documentation
*/
@Override
public ListRepositoriesInDomainResult listRepositoriesInDomain(ListRepositoriesInDomainRequest request) {
request = beforeClientExecution(request);
return executeListRepositoriesInDomain(request);
}
@SdkInternalApi
final ListRepositoriesInDomainResult executeListRepositoriesInDomain(ListRepositoriesInDomainRequest listRepositoriesInDomainRequest) {
ExecutionContext executionContext = createExecutionContext(listRepositoriesInDomainRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListRepositoriesInDomainRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(listRepositoriesInDomainRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListRepositoriesInDomain");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListRepositoriesInDomainResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Sets a resource policy on a domain that specifies permissions to access it.
*
*
* @param putDomainPermissionsPolicyRequest
* @return Result of the PutDomainPermissionsPolicy operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ServiceQuotaExceededException
* The operation did not succeed because it would have exceeded a service limit for your account.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.PutDomainPermissionsPolicy
* @see AWS API Documentation
*/
@Override
public PutDomainPermissionsPolicyResult putDomainPermissionsPolicy(PutDomainPermissionsPolicyRequest request) {
request = beforeClientExecution(request);
return executePutDomainPermissionsPolicy(request);
}
@SdkInternalApi
final PutDomainPermissionsPolicyResult executePutDomainPermissionsPolicy(PutDomainPermissionsPolicyRequest putDomainPermissionsPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(putDomainPermissionsPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new PutDomainPermissionsPolicyRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(putDomainPermissionsPolicyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutDomainPermissionsPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new PutDomainPermissionsPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Sets the resource policy on a repository that specifies permissions to access it.
*
*
* @param putRepositoryPermissionsPolicyRequest
* @return Result of the PutRepositoryPermissionsPolicy operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ServiceQuotaExceededException
* The operation did not succeed because it would have exceeded a service limit for your account.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.PutRepositoryPermissionsPolicy
* @see AWS API Documentation
*/
@Override
public PutRepositoryPermissionsPolicyResult putRepositoryPermissionsPolicy(PutRepositoryPermissionsPolicyRequest request) {
request = beforeClientExecution(request);
return executePutRepositoryPermissionsPolicy(request);
}
@SdkInternalApi
final PutRepositoryPermissionsPolicyResult executePutRepositoryPermissionsPolicy(PutRepositoryPermissionsPolicyRequest putRepositoryPermissionsPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(putRepositoryPermissionsPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new PutRepositoryPermissionsPolicyRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(putRepositoryPermissionsPolicyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutRepositoryPermissionsPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new PutRepositoryPermissionsPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the status of one or more versions of a package.
*
*
* @param updatePackageVersionsStatusRequest
* @return Result of the UpdatePackageVersionsStatus operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.UpdatePackageVersionsStatus
* @see AWS API Documentation
*/
@Override
public UpdatePackageVersionsStatusResult updatePackageVersionsStatus(UpdatePackageVersionsStatusRequest request) {
request = beforeClientExecution(request);
return executeUpdatePackageVersionsStatus(request);
}
@SdkInternalApi
final UpdatePackageVersionsStatusResult executeUpdatePackageVersionsStatus(UpdatePackageVersionsStatusRequest updatePackageVersionsStatusRequest) {
ExecutionContext executionContext = createExecutionContext(updatePackageVersionsStatusRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdatePackageVersionsStatusRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(updatePackageVersionsStatusRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdatePackageVersionsStatus");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdatePackageVersionsStatusResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Update the properties of a repository.
*
*
* @param updateRepositoryRequest
* @return Result of the UpdateRepository operation returned by the service.
* @throws AccessDeniedException
* The operation did not succeed because of an unauthorized access attempt.
* @throws ConflictException
* The operation did not succeed because prerequisites are not met.
* @throws InternalServerException
* The operation did not succeed because of an error that occurred inside AWS CodeArtifact.
* @throws ResourceNotFoundException
* The operation did not succeed because the resource requested is not found in the service.
* @throws ServiceQuotaExceededException
* The operation did not succeed because it would have exceeded a service limit for your account.
* @throws ThrottlingException
* The operation did not succeed because too many requests are sent to the service.
* @throws ValidationException
* The operation did not succeed because a parameter in the request was sent with an invalid value.
* @sample AWSCodeArtifact.UpdateRepository
* @see AWS
* API Documentation
*/
@Override
public UpdateRepositoryResult updateRepository(UpdateRepositoryRequest request) {
request = beforeClientExecution(request);
return executeUpdateRepository(request);
}
@SdkInternalApi
final UpdateRepositoryResult executeUpdateRepository(UpdateRepositoryRequest updateRepositoryRequest) {
ExecutionContext executionContext = createExecutionContext(updateRepositoryRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateRepositoryRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateRepositoryRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateRepository");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateRepositoryResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* Returns additional metadata for a previously executed successful, request, typically used for debugging issues
* where a service isn't acting as expected. This data isn't considered part of the result data returned by an
* operation, so it's available through this separate, diagnostic interface.
*
* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic
* information for an executed request, you should use this method to retrieve it as soon as possible after
* executing the request.
*
* @param request
* The originally executed request
*
* @return The response metadata for the specified request, or null if none is available.
*/
public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) {
return client.getResponseMetadataForRequest(request);
}
/**
* Normal invoke with authentication. Credentials are required and may be overriden at the request level.
**/
private Response invoke(Request request, HttpResponseHandler> responseHandler,
ExecutionContext executionContext) {
return invoke(request, responseHandler, executionContext, null, null);
}
/**
* Normal invoke with authentication. Credentials are required and may be overriden at the request level.
**/
private Response invoke(Request request, HttpResponseHandler> responseHandler,
ExecutionContext executionContext, URI cachedEndpoint, URI uriFromEndpointTrait) {
executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider));
return doInvoke(request, responseHandler, executionContext, cachedEndpoint, uriFromEndpointTrait);
}
/**
* Invoke with no authentication. Credentials are not required and any credentials set on the client or request will
* be ignored for this operation.
**/
private Response anonymousInvoke(Request request,
HttpResponseHandler> responseHandler, ExecutionContext executionContext) {
return doInvoke(request, responseHandler, executionContext, null, null);
}
/**
* Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the
* ExecutionContext beforehand.
**/
private Response doInvoke(Request request, HttpResponseHandler> responseHandler,
ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) {
if (discoveredEndpoint != null) {
request.setEndpoint(discoveredEndpoint);
request.getOriginalRequest().getRequestClientOptions().appendUserAgent("endpoint-discovery");
} else if (uriFromEndpointTrait != null) {
request.setEndpoint(uriFromEndpointTrait);
} else {
request.setEndpoint(endpoint);
}
request.setTimeOffset(timeOffset);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata());
return client.execute(request, responseHandler, errorResponseHandler, executionContext);
}
@com.amazonaws.annotation.SdkInternalApi
static com.amazonaws.protocol.json.SdkJsonProtocolFactory getProtocolFactory() {
return protocolFactory;
}
}