All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.codeartifact.AWSCodeArtifactClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for CodeArtifact module holds the client classes that are used for communicating with CodeArtifact Service

The newest version!
/*
 * Copyright 2019-2024 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.
 * 

*

* CodeArtifact is a fully managed artifact repository compatible with language-native package managers and build tools * such as npm, Apache Maven, pip, and dotnet. 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. *

*

* CodeArtifact concepts *

*
    *
  • *

    * 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 such as the npm CLI or the Maven CLI ( mvn ). For a list of supported * package managers, see the CodeArtifact User * Guide. *

    *
  • *
  • *

    * 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 Key Management Service (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, Maven, NuGet, Swift, Ruby, Cargo, and generic package formats. * For more information about the supported package formats and how to use CodeArtifact with them, see the CodeArtifact User Guide. *

    *

    * 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 group: A group of packages that match a specified definition. Package groups can be used to apply * configuration to multiple packages that match a defined pattern using package format, package namespace, and package * name. You can use package groups to more conveniently configure package origin controls for multiple packages. * Package origin controls are used to block or allow ingestion or publishing of new package versions, which protects * users from malicious actions known as dependency substitution attacks. *

    *
  • *
  • *

    * 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 supported API 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. *

    *
  • *
  • *

    * CreatePackageGroup: Creates a package group. *

    *
  • *
  • *

    * 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. *

    *
  • *
  • *

    * DeletePackage: Deletes a package and all associated package versions. *

    *
  • *
  • *

    * DeletePackageGroup: Deletes a package group. Does not delete packages or package versions that are * associated with a package group. *

    *
  • *
  • *

    * 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. *

    *
  • *
  • *

    * DescribePackage: Returns a PackageDescription object that contains details about a package. *

    *
  • *
  • *

    * DescribePackageGroup: Returns a PackageGroup object * that contains details about a package group. *

    *
  • *
  • *

    * 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. *

    *
  • *
  • *

    * GetAssociatedPackageGroup: Returns the most closely associated package group to the specified package. *

    *
  • *
  • *

    * 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: *

    *
      *
    • *

      * cargo *

      *
    • *
    • *

      * generic *

      *
    • *
    • *

      * maven *

      *
    • *
    • *

      * npm *

      *
    • *
    • *

      * nuget *

      *
    • *
    • *

      * pypi *

      *
    • *
    • *

      * ruby *

      *
    • *
    • *

      * swift *

      *
    • *
    *
  • *
  • *

    * GetRepositoryPermissionsPolicy: Returns the resource policy that is set on a repository. *

    *
  • *
  • *

    * ListAllowedRepositoriesForGroup: Lists the allowed repositories for a package group that has origin * configuration set to ALLOW_SPECIFIC_REPOSITORIES. *

    *
  • *
  • *

    * ListAssociatedPackages: Returns a list of packages associated with the requested package group. *

    *
  • *
  • *

    * ListDomains: Returns a list of DomainSummary objects. Each returned * DomainSummary object contains information about a domain. *

    *
  • *
  • *

    * ListPackages: Lists the packages in a repository. *

    *
  • *
  • *

    * ListPackageGroups: Returns a list of package groups in the requested domain. *

    *
  • *
  • *

    * 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 Amazon Web Services account that called * this method. *

    *
  • *
  • *

    * ListRepositoriesInDomain: Returns a list of the repositories in a domain. *

    *
  • *
  • *

    * ListSubPackageGroups: Returns a list of direct children of the specified package group. *

    *
  • *
  • *

    * PublishPackageVersion: Creates a new package version containing one or more assets. *

    *
  • *
  • *

    * PutDomainPermissionsPolicy: Attaches a resource policy to a domain. *

    *
  • *
  • *

    * PutPackageOriginConfiguration: Sets the package origin configuration for a package, which determine how * new versions of the package can be added to a specific repository. *

    *
  • *
  • *

    * PutRepositoryPermissionsPolicy: Sets the resource policy on a repository that specifies permissions to * access it. *

    *
  • *
  • *

    * UpdatePackageGroup: Updates a package group. This API cannot be used to update a package group's origin * configuration or pattern. *

    *
  • *
  • *

    * UpdatePackageGroupOriginConfiguration: Updates the package origin configuration for a package group. *

    *
  • *
  • *

    * 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("application/json") .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller( com.amazonaws.services.codeartifact.model.transform.ThrottlingExceptionUnmarshaller.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())) .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("ValidationException").withExceptionUnmarshaller( com.amazonaws.services.codeartifact.model.transform.ValidationExceptionUnmarshaller.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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 Amazon Web * Services 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 package group. For more information about creating package groups, including example CLI commands, see * Create a package group * in the CodeArtifact User Guide. *

* * @param createPackageGroupRequest * @return Result of the CreatePackageGroup 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 CodeArtifact. * @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. * @throws ResourceNotFoundException * The operation did not succeed because the resource requested is not found in the service. * @sample AWSCodeArtifact.CreatePackageGroup * @see AWS API Documentation */ @Override public CreatePackageGroupResult createPackageGroup(CreatePackageGroupRequest request) { request = beforeClientExecution(request); return executeCreatePackageGroup(request); } @SdkInternalApi final CreatePackageGroupResult executeCreatePackageGroup(CreatePackageGroupRequest createPackageGroupRequest) { ExecutionContext executionContext = createExecutionContext(createPackageGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreatePackageGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createPackageGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreatePackageGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreatePackageGroupResultJsonUnmarshaller()); 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 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.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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 a package and all associated package versions. A deleted package cannot be restored. To delete one or * more package versions, use the DeletePackageVersions API. *

* * @param deletePackageRequest * @return Result of the DeletePackage 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 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.DeletePackage * @see AWS API * Documentation */ @Override public DeletePackageResult deletePackage(DeletePackageRequest request) { request = beforeClientExecution(request); return executeDeletePackage(request); } @SdkInternalApi final DeletePackageResult executeDeletePackage(DeletePackageRequest deletePackageRequest) { ExecutionContext executionContext = createExecutionContext(deletePackageRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeletePackageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePackageRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePackage"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeletePackageResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a package group. Deleting a package group does not delete packages or package versions associated with * the package group. When a package group is deleted, the direct child package groups will become children of the * package group's direct parent package group. Therefore, if any of the child groups are inheriting any settings * from the parent, those settings could change. *

* * @param deletePackageGroupRequest * @return Result of the DeletePackageGroup 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 CodeArtifact. * @throws ServiceQuotaExceededException * The operation did not succeed because it would have exceeded a service limit for your account. * @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.DeletePackageGroup * @see AWS API Documentation */ @Override public DeletePackageGroupResult deletePackageGroup(DeletePackageGroupRequest request) { request = beforeClientExecution(request); return executeDeletePackageGroup(request); } @SdkInternalApi final DeletePackageGroupResult executeDeletePackageGroup(DeletePackageGroupRequest deletePackageGroupRequest) { ExecutionContext executionContext = createExecutionContext(deletePackageGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeletePackageGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePackageGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePackageGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeletePackageGroupResultJsonUnmarshaller()); 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, ListPackageVersions), 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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, Amazon Web Services * 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 * PackageDescription object that contains information about the requested package. *

* * @param describePackageRequest * @return Result of the DescribePackage 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 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.DescribePackage * @see AWS * API Documentation */ @Override public DescribePackageResult describePackage(DescribePackageRequest request) { request = beforeClientExecution(request); return executeDescribePackage(request); } @SdkInternalApi final DescribePackageResult executeDescribePackage(DescribePackageRequest describePackageRequest) { ExecutionContext executionContext = createExecutionContext(describePackageRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribePackageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describePackageRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribePackage"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribePackageResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a * PackageGroupDescription object that contains information about the requested package group. *

* * @param describePackageGroupRequest * @return Result of the DescribePackageGroup 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 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. * @throws ResourceNotFoundException * The operation did not succeed because the resource requested is not found in the service. * @sample AWSCodeArtifact.DescribePackageGroup * @see AWS API Documentation */ @Override public DescribePackageGroupResult describePackageGroup(DescribePackageGroupRequest request) { request = beforeClientExecution(request); return executeDescribePackageGroup(request); } @SdkInternalApi final DescribePackageGroupResult executeDescribePackageGroup(DescribePackageGroupRequest describePackageGroupRequest) { ExecutionContext executionContext = createExecutionContext(describePackageGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribePackageGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describePackageGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribePackageGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribePackageGroupResultJsonUnmarshaller()); 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 ListPackageVersions and set the status parameter to Disposed. *

*

* To view information about a disposed package version, use DescribePackageVersion. *

* * @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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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); } } /** *

* Returns the most closely associated package group to the specified package. This API does not require that the * package exist in any repository in the domain. As such, GetAssociatedPackageGroup can be used to see * which package group's origin configuration applies to a package before that package is in a repository. This can * be helpful to check if public packages are blocked without ingesting them. *

*

* For information package group association and matching, see Package group definition syntax and matching behavior in the CodeArtifact User Guide. *

* * @param getAssociatedPackageGroupRequest * @return Result of the GetAssociatedPackageGroup 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 CodeArtifact. * @throws ValidationException * The operation did not succeed because a parameter in the request was sent with an invalid value. * @throws ResourceNotFoundException * The operation did not succeed because the resource requested is not found in the service. * @sample AWSCodeArtifact.GetAssociatedPackageGroup * @see AWS API Documentation */ @Override public GetAssociatedPackageGroupResult getAssociatedPackageGroup(GetAssociatedPackageGroupRequest request) { request = beforeClientExecution(request); return executeGetAssociatedPackageGroup(request); } @SdkInternalApi final GetAssociatedPackageGroupResult executeGetAssociatedPackageGroup(GetAssociatedPackageGroupRequest getAssociatedPackageGroupRequest) { ExecutionContext executionContext = createExecutionContext(getAssociatedPackageGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetAssociatedPackageGroupRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getAssociatedPackageGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetAssociatedPackageGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetAssociatedPackageGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Generates a temporary authorization token for accessing repositories in the domain. This API requires the * codeartifact:GetAuthorizationToken and sts:GetServiceBearerToken permissions. For more * information about authorization tokens, see CodeArtifact authentication * and tokens. *

* *

* 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 IAM 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 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. * @throws ConflictException * The operation did not succeed because prerequisites are not met. * @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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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. *

*

* 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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: *

*
    *
  • *

    * cargo *

    *
  • *
  • *

    * generic *

    *
  • *
  • *

    * maven *

    *
  • *
  • *

    * npm *

    *
  • *
  • *

    * nuget *

    *
  • *
  • *

    * pypi *

    *
  • *
  • *

    * ruby *

    *
  • *
  • *

    * swift *

    *
  • *
* * @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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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); } } /** *

* Lists the repositories in the added repositories list of the specified restriction type for a package group. For * more information about restriction types and added repository lists, see Package group origin * controls in the CodeArtifact User Guide. *

* * @param listAllowedRepositoriesForGroupRequest * @return Result of the ListAllowedRepositoriesForGroup 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 CodeArtifact. * @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. * @throws ResourceNotFoundException * The operation did not succeed because the resource requested is not found in the service. * @sample AWSCodeArtifact.ListAllowedRepositoriesForGroup * @see AWS API Documentation */ @Override public ListAllowedRepositoriesForGroupResult listAllowedRepositoriesForGroup(ListAllowedRepositoriesForGroupRequest request) { request = beforeClientExecution(request); return executeListAllowedRepositoriesForGroup(request); } @SdkInternalApi final ListAllowedRepositoriesForGroupResult executeListAllowedRepositoriesForGroup( ListAllowedRepositoriesForGroupRequest listAllowedRepositoriesForGroupRequest) { ExecutionContext executionContext = createExecutionContext(listAllowedRepositoriesForGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListAllowedRepositoriesForGroupRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listAllowedRepositoriesForGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAllowedRepositoriesForGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAllowedRepositoriesForGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of packages associated with the requested package group. For information package group association * and matching, see Package group definition syntax and matching behavior in the CodeArtifact User Guide. *

* * @param listAssociatedPackagesRequest * @return Result of the ListAssociatedPackages 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 CodeArtifact. * @throws ValidationException * The operation did not succeed because a parameter in the request was sent with an invalid value. * @throws ResourceNotFoundException * The operation did not succeed because the resource requested is not found in the service. * @sample AWSCodeArtifact.ListAssociatedPackages * @see AWS API Documentation */ @Override public ListAssociatedPackagesResult listAssociatedPackages(ListAssociatedPackagesRequest request) { request = beforeClientExecution(request); return executeListAssociatedPackages(request); } @SdkInternalApi final ListAssociatedPackagesResult executeListAssociatedPackages(ListAssociatedPackagesRequest listAssociatedPackagesRequest) { ExecutionContext executionContext = createExecutionContext(listAssociatedPackagesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListAssociatedPackagesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAssociatedPackagesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAssociatedPackages"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAssociatedPackagesResultJsonUnmarshaller()); 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 Amazon Web Services 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 package groups in the requested domain. *

* * @param listPackageGroupsRequest * @return Result of the ListPackageGroups 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 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. * @throws ResourceNotFoundException * The operation did not succeed because the resource requested is not found in the service. * @sample AWSCodeArtifact.ListPackageGroups * @see AWS * API Documentation */ @Override public ListPackageGroupsResult listPackageGroups(ListPackageGroupsRequest request) { request = beforeClientExecution(request); return executeListPackageGroups(request); } @SdkInternalApi final ListPackageGroupsResult executeListPackageGroups(ListPackageGroupsRequest listPackageGroupsRequest) { ExecutionContext executionContext = createExecutionContext(listPackageGroupsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListPackageGroupsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPackageGroupsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPackageGroups"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPackageGroupsResultJsonUnmarshaller()); 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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. * Package versions of all statuses will be returned by default when calling list-package-versions with * no --status parameter. *

* * @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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 Amazon Web Services 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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); } } /** *

* Returns a list of direct children of the specified package group. *

*

* For information package group hierarchy, see Package group definition syntax and matching behavior in the CodeArtifact User Guide. *

* * @param listSubPackageGroupsRequest * @return Result of the ListSubPackageGroups 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 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. * @throws ResourceNotFoundException * The operation did not succeed because the resource requested is not found in the service. * @sample AWSCodeArtifact.ListSubPackageGroups * @see AWS API Documentation */ @Override public ListSubPackageGroupsResult listSubPackageGroups(ListSubPackageGroupsRequest request) { request = beforeClientExecution(request); return executeListSubPackageGroups(request); } @SdkInternalApi final ListSubPackageGroupsResult executeListSubPackageGroups(ListSubPackageGroupsRequest listSubPackageGroupsRequest) { ExecutionContext executionContext = createExecutionContext(listSubPackageGroupsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListSubPackageGroupsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listSubPackageGroupsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListSubPackageGroups"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListSubPackageGroupsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets information about Amazon Web Services tags for a specified Amazon Resource Name (ARN) in CodeArtifact. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws AccessDeniedException * The operation did not succeed because of an unauthorized access attempt. * @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.ListTagsForResource * @see AWS API Documentation */ @Override public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request) { request = beforeClientExecution(request); return executeListTagsForResource(request); } @SdkInternalApi final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) { ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListTagsForResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsForResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsForResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new package version containing one or more assets (or files). *

*

* The unfinished flag can be used to keep the package version in the Unfinished state * until all of its assets have been uploaded (see Package version status in the CodeArtifact user guide). To set the package version’s status to * Published, omit the unfinished flag when uploading the final asset, or set the status * using * UpdatePackageVersionStatus. Once a package version’s status is set to Published, it cannot * change back to Unfinished. *

* *

* Only generic packages can be published using this API. For more information, see Using generic packages in the * CodeArtifact User Guide. *

*
* * @param publishPackageVersionRequest * @return Result of the PublishPackageVersion 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 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.PublishPackageVersion * @see AWS API Documentation */ @Override public PublishPackageVersionResult publishPackageVersion(PublishPackageVersionRequest request) { request = beforeClientExecution(request); return executePublishPackageVersion(request); } @SdkInternalApi final PublishPackageVersionResult executePublishPackageVersion(PublishPackageVersionRequest publishPackageVersionRequest) { ExecutionContext executionContext = createExecutionContext(publishPackageVersionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PublishPackageVersionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(publishPackageVersionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PublishPackageVersion"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); request.addHandlerContext(HandlerContextKey.HAS_STREAMING_INPUT, Boolean.TRUE); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PublishPackageVersionResultJsonUnmarshaller()); 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. *

*

* When you call PutDomainPermissionsPolicy, the resource policy on the domain is ignored when * evaluting permissions. This ensures that the owner of a domain cannot lock themselves out of the domain, which * would prevent them from being able to update the resource policy. *

* * @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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 package origin configuration for a package. *

*

* The package origin configuration determines how new versions of a package can be added to a repository. You can * allow or block direct publishing of new package versions, or ingestion and retaining of new package versions from * an external connection or upstream source. For more information about package origin controls and configuration, * see Editing package * origin controls in the CodeArtifact User Guide. *

*

* PutPackageOriginConfiguration can be called on a package that doesn't yet exist in the repository. * When called on a package that does not exist, a package is created in the repository with no versions and the * requested restrictions are set on the package. This can be used to preemptively block ingesting or retaining any * versions from external connections or upstream repositories, or to block publishing any versions of the package * into the repository before connecting any package managers or publishers to the repository. *

* * @param putPackageOriginConfigurationRequest * @return Result of the PutPackageOriginConfiguration 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 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.PutPackageOriginConfiguration * @see AWS API Documentation */ @Override public PutPackageOriginConfigurationResult putPackageOriginConfiguration(PutPackageOriginConfigurationRequest request) { request = beforeClientExecution(request); return executePutPackageOriginConfiguration(request); } @SdkInternalApi final PutPackageOriginConfigurationResult executePutPackageOriginConfiguration(PutPackageOriginConfigurationRequest putPackageOriginConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(putPackageOriginConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutPackageOriginConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(putPackageOriginConfigurationRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutPackageOriginConfiguration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutPackageOriginConfigurationResultJsonUnmarshaller()); 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. *

*

* When you call PutRepositoryPermissionsPolicy, the resource policy on the repository is ignored when * evaluting permissions. This ensures that the owner of a repository cannot lock themselves out of the repository, * which would prevent them from being able to update the resource policy. *

* * @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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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); } } /** *

* Adds or updates tags for a resource in CodeArtifact. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws AccessDeniedException * The operation did not succeed because of an unauthorized access attempt. * @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.TagResource * @see AWS API * Documentation */ @Override public TagResourceResult tagResource(TagResourceRequest request) { request = beforeClientExecution(request); return executeTagResource(request); } @SdkInternalApi final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) { ExecutionContext executionContext = createExecutionContext(tagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes tags from a resource in CodeArtifact. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws AccessDeniedException * The operation did not succeed because of an unauthorized access attempt. * @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.UntagResource * @see AWS API * Documentation */ @Override public UntagResourceResult untagResource(UntagResourceRequest request) { request = beforeClientExecution(request); return executeUntagResource(request); } @SdkInternalApi final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) { ExecutionContext executionContext = createExecutionContext(untagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates a package group. This API cannot be used to update a package group's origin configuration or pattern. To * update a package group's origin configuration, use UpdatePackageGroupOriginConfiguration. *

* * @param updatePackageGroupRequest * @return Result of the UpdatePackageGroup 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 CodeArtifact. * @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. * @throws ResourceNotFoundException * The operation did not succeed because the resource requested is not found in the service. * @sample AWSCodeArtifact.UpdatePackageGroup * @see AWS API Documentation */ @Override public UpdatePackageGroupResult updatePackageGroup(UpdatePackageGroupRequest request) { request = beforeClientExecution(request); return executeUpdatePackageGroup(request); } @SdkInternalApi final UpdatePackageGroupResult executeUpdatePackageGroup(UpdatePackageGroupRequest updatePackageGroupRequest) { ExecutionContext executionContext = createExecutionContext(updatePackageGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdatePackageGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updatePackageGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdatePackageGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdatePackageGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the package origin configuration for a package group. *

*

* The package origin configuration determines how new versions of a package can be added to a repository. You can * allow or block direct publishing of new package versions, or ingestion and retaining of new package versions from * an external connection or upstream source. For more information about package group origin controls and * configuration, see Package group origin * controls in the CodeArtifact User Guide. *

* * @param updatePackageGroupOriginConfigurationRequest * @return Result of the UpdatePackageGroupOriginConfiguration 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 CodeArtifact. * @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. * @throws ResourceNotFoundException * The operation did not succeed because the resource requested is not found in the service. * @sample AWSCodeArtifact.UpdatePackageGroupOriginConfiguration * @see AWS API Documentation */ @Override public UpdatePackageGroupOriginConfigurationResult updatePackageGroupOriginConfiguration(UpdatePackageGroupOriginConfigurationRequest request) { request = beforeClientExecution(request); return executeUpdatePackageGroupOriginConfiguration(request); } @SdkInternalApi final UpdatePackageGroupOriginConfigurationResult executeUpdatePackageGroupOriginConfiguration( UpdatePackageGroupOriginConfigurationRequest updatePackageGroupOriginConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(updatePackageGroupOriginConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdatePackageGroupOriginConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(updatePackageGroupOriginConfigurationRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "codeartifact"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdatePackageGroupOriginConfiguration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdatePackageGroupOriginConfigurationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the status of one or more versions of a package. Using UpdatePackageVersionsStatus, you can * update the status of package versions to Archived, Published, or Unlisted. * To set the status of a package version to Disposed, use DisposePackageVersions. *

* * @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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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 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.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); 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; } @Override public void shutdown() { super.shutdown(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy