JavaScript is disabled on your browser.
Skip navigation links

AWS SDK for Java 1.x API Reference - 1.12.795

We announced the upcoming end-of-support for AWS SDK for Java (v1). We recommend that you migrate to AWS SDK for Java v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
com.amazonaws.services.codebuild

Interface AWSCodeBuild

  • All Known Subinterfaces:
    AWSCodeBuildAsync
    All Known Implementing Classes:
    AbstractAWSCodeBuild, AbstractAWSCodeBuildAsync, AWSCodeBuildAsyncClient, AWSCodeBuildClient


    @Generated(value="com.amazonaws:aws-java-sdk-code-generator")
    public interface AWSCodeBuild
    Interface for accessing AWS CodeBuild.

    Note: Do not directly implement this interface, new methods are added to it regularly. Extend from AbstractAWSCodeBuild instead.

    CodeBuild

    CodeBuild is a fully managed build service in the cloud. CodeBuild compiles your source code, runs unit tests, and produces artifacts that are ready to deploy. CodeBuild eliminates the need to provision, manage, and scale your own build servers. It provides prepackaged build environments for the most popular programming languages and build tools, such as Apache Maven, Gradle, and more. You can also fully customize build environments in CodeBuild to use your own build tools. CodeBuild scales automatically to meet peak build requests. You pay only for the build time you consume. For more information about CodeBuild, see the CodeBuild User Guide.

    • Method Detail

      • setEndpoint

        @Deprecated
        void setEndpoint(String endpoint)
        Deprecated. use AwsClientBuilder#setEndpointConfiguration(AwsClientBuilder.EndpointConfiguration) for example: builder.setEndpointConfiguration(new EndpointConfiguration(endpoint, signingRegion));
        Overrides the default endpoint for this client ("codebuild.us-east-1.amazonaws.com"). Callers can use this method to control which AWS region they want to work with.

        Callers can pass in just the endpoint (ex: "codebuild.us-east-1.amazonaws.com") or a full URL, including the protocol (ex: "codebuild.us-east-1.amazonaws.com"). If the protocol is not specified here, the default protocol from this client's ClientConfiguration will be used, which by default is HTTPS.

        For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available endpoints for all AWS services, see: https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/java-dg-region-selection.html#region-selection- choose-endpoint

        This method is not threadsafe. An endpoint should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.

        Parameters:
        endpoint - The endpoint (ex: "codebuild.us-east-1.amazonaws.com") or a full URL, including the protocol (ex: "codebuild.us-east-1.amazonaws.com") of the region specific AWS endpoint this client will communicate with.
      • batchGetBuilds

        BatchGetBuildsResult batchGetBuilds(BatchGetBuildsRequest batchGetBuildsRequest)

        Gets information about one or more builds.

        Parameters:
        batchGetBuildsRequest -
        Returns:
        Result of the BatchGetBuilds operation returned by the service.
        Throws:
        InvalidInputException - The input value that was provided is not valid.
        See Also:
        AWS API Documentation

        Samples:
        • To get information about builds
          The following example gets information about builds with the specified build IDs.
          AWSCodeBuild client = AWSCodeBuildClientBuilder.standard().build();
          BatchGetBuildsRequest request = new BatchGetBuildsRequest().withIds("codebuild-demo-project:9b0ac37f-d19e-4254-9079-f47e9a389eEX",
           "codebuild-demo-project:b79a46f7-1473-4636-a23f-da9c45c208EX");
          BatchGetBuildsResult response = client.batchGetBuilds(request);
      • createWebhook

        CreateWebhookResult createWebhook(CreateWebhookRequest createWebhookRequest)

        For an existing CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, enables CodeBuild to start rebuilding the source code every time a code change is pushed to the repository.

        If you enable webhooks for an CodeBuild project, and the project is used as a build step in CodePipeline, then two identical builds are created for each commit. One build is triggered through webhooks, and one through CodePipeline. Because billing is on a per-build basis, you are billed for both builds. Therefore, if you are using CodePipeline, we recommend that you disable webhooks in CodeBuild. In the CodeBuild console, clear the Webhook box. For more information, see step 5 in Change a Build Project's Settings.

        Parameters:
        createWebhookRequest -
        Returns:
        Result of the CreateWebhook operation returned by the service.
        Throws:
        InvalidInputException - The input value that was provided is not valid.
        OAuthProviderException - There was a problem with the underlying OAuth provider.
        ResourceAlreadyExistsException - The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same settings already exists.
        ResourceNotFoundException - The specified Amazon Web Services resource cannot be found.
        See Also:
        AWS API Documentation
      • deleteWebhook

        DeleteWebhookResult deleteWebhook(DeleteWebhookRequest deleteWebhookRequest)

        For an existing CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, stops CodeBuild from rebuilding the source code every time a code change is pushed to the repository.

        Parameters:
        deleteWebhookRequest -
        Returns:
        Result of the DeleteWebhook operation returned by the service.
        Throws:
        InvalidInputException - The input value that was provided is not valid.
        ResourceNotFoundException - The specified Amazon Web Services resource cannot be found.
        OAuthProviderException - There was a problem with the underlying OAuth provider.
        See Also:
        AWS API Documentation
      • importSourceCredentials

        ImportSourceCredentialsResult importSourceCredentials(ImportSourceCredentialsRequest importSourceCredentialsRequest)

        Imports the source repository credentials for an CodeBuild project that has its source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository.

        Parameters:
        importSourceCredentialsRequest -
        Returns:
        Result of the ImportSourceCredentials operation returned by the service.
        Throws:
        InvalidInputException - The input value that was provided is not valid.
        AccountLimitExceededException - An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.
        ResourceAlreadyExistsException - The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same settings already exists.
        See Also:
        AWS API Documentation
      • listFleets

        ListFleetsResult listFleets(ListFleetsRequest listFleetsRequest)

        Gets a list of compute fleet names with each compute fleet name representing a single compute fleet.

        Parameters:
        listFleetsRequest -
        Returns:
        Result of the ListFleets operation returned by the service.
        Throws:
        InvalidInputException - The input value that was provided is not valid.
        See Also:
        AWS API Documentation
      • listProjects

        ListProjectsResult listProjects(ListProjectsRequest listProjectsRequest)

        Gets a list of build project names, with each build project name representing a single build project.

        Parameters:
        listProjectsRequest -
        Returns:
        Result of the ListProjects operation returned by the service.
        Throws:
        InvalidInputException - The input value that was provided is not valid.
        See Also:
        AWS API Documentation
      • startBuild

        StartBuildResult startBuild(StartBuildRequest startBuildRequest)

        Starts running a build with the settings defined in the project. These setting include: how to run a build, where to get the source code, which build environment to use, which build commands to run, and where to store the build output.

        You can also start a build run by overriding some of the build settings in the project. The overrides only apply for that specific start build request. The settings in the project are unaltered.

        Parameters:
        startBuildRequest -
        Returns:
        Result of the StartBuild operation returned by the service.
        Throws:
        InvalidInputException - The input value that was provided is not valid.
        ResourceNotFoundException - The specified Amazon Web Services resource cannot be found.
        AccountLimitExceededException - An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.
        See Also:
        AWS API Documentation
      • updateProjectVisibility

        UpdateProjectVisibilityResult updateProjectVisibility(UpdateProjectVisibilityRequest updateProjectVisibilityRequest)

        Changes the public visibility for a project. The project's build results, logs, and artifacts are available to the general public. For more information, see Public build projects in the CodeBuild User Guide.

        The following should be kept in mind when making your projects public:

        • All of a project's build results, logs, and artifacts, including builds that were run when the project was private, are available to the general public.

        • All build logs and artifacts are available to the public. Environment variables, source code, and other sensitive information may have been output to the build logs and artifacts. You must be careful about what information is output to the build logs. Some best practice are:

          • Do not store sensitive values in environment variables. We recommend that you use an Amazon EC2 Systems Manager Parameter Store or Secrets Manager to store sensitive values.

          • Follow Best practices for using webhooks in the CodeBuild User Guide to limit which entities can trigger a build, and do not store the buildspec in the project itself, to ensure that your webhooks are as secure as possible.

        • A malicious user can use public builds to distribute malicious artifacts. We recommend that you review all pull requests to verify that the pull request is a legitimate change. We also recommend that you validate any artifacts with their checksums to make sure that the correct artifacts are being downloaded.

        Parameters:
        updateProjectVisibilityRequest -
        Returns:
        Result of the UpdateProjectVisibility operation returned by the service.
        Throws:
        InvalidInputException - The input value that was provided is not valid.
        ResourceNotFoundException - The specified Amazon Web Services resource cannot be found.
        See Also:
        AWS API Documentation
      • shutdown

        void shutdown()
        Shuts down this client object, releasing any resources that might be held open. This is an optional method, and callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client has been shutdown, it should not be used to make any more requests.
      • getCachedResponseMetadata

        ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
        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 a request.

        Parameters:
        request - The originally executed request.
        Returns:
        The response metadata for the specified request, or null if none is available.
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /