mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Upgrade AWS SDK to the latest version
This commit is contained in:
+391
-131
@@ -1,6 +1,5 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package codebuild provides a client for AWS CodeBuild.
|
||||
package codebuild
|
||||
|
||||
import (
|
||||
@@ -12,23 +11,101 @@ import (
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
)
|
||||
|
||||
const opBatchDeleteBuilds = "BatchDeleteBuilds"
|
||||
|
||||
// BatchDeleteBuildsRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the BatchDeleteBuilds operation. The "output" return
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// See BatchDeleteBuilds for more information on using the BatchDeleteBuilds
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
//
|
||||
// // Example sending a request using the BatchDeleteBuildsRequest method.
|
||||
// req, resp := client.BatchDeleteBuildsRequest(params)
|
||||
//
|
||||
// err := req.Send()
|
||||
// if err == nil { // resp is now filled
|
||||
// fmt.Println(resp)
|
||||
// }
|
||||
//
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchDeleteBuilds
|
||||
func (c *CodeBuild) BatchDeleteBuildsRequest(input *BatchDeleteBuildsInput) (req *request.Request, output *BatchDeleteBuildsOutput) {
|
||||
op := &request.Operation{
|
||||
Name: opBatchDeleteBuilds,
|
||||
HTTPMethod: "POST",
|
||||
HTTPPath: "/",
|
||||
}
|
||||
|
||||
if input == nil {
|
||||
input = &BatchDeleteBuildsInput{}
|
||||
}
|
||||
|
||||
output = &BatchDeleteBuildsOutput{}
|
||||
req = c.newRequest(op, input, output)
|
||||
return
|
||||
}
|
||||
|
||||
// BatchDeleteBuilds API operation for AWS CodeBuild.
|
||||
//
|
||||
// Deletes one or more builds.
|
||||
//
|
||||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||||
// with awserr.Error's Code and Message methods to get detailed information about
|
||||
// the error.
|
||||
//
|
||||
// See the AWS API reference guide for AWS CodeBuild's
|
||||
// API operation BatchDeleteBuilds for usage and error information.
|
||||
//
|
||||
// Returned Error Codes:
|
||||
// * ErrCodeInvalidInputException "InvalidInputException"
|
||||
// The input value that was provided is not valid.
|
||||
//
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchDeleteBuilds
|
||||
func (c *CodeBuild) BatchDeleteBuilds(input *BatchDeleteBuildsInput) (*BatchDeleteBuildsOutput, error) {
|
||||
req, out := c.BatchDeleteBuildsRequest(input)
|
||||
return out, req.Send()
|
||||
}
|
||||
|
||||
// BatchDeleteBuildsWithContext is the same as BatchDeleteBuilds with the addition of
|
||||
// the ability to pass a context and additional request options.
|
||||
//
|
||||
// See BatchDeleteBuilds for details on how to use this API operation.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *CodeBuild) BatchDeleteBuildsWithContext(ctx aws.Context, input *BatchDeleteBuildsInput, opts ...request.Option) (*BatchDeleteBuildsOutput, error) {
|
||||
req, out := c.BatchDeleteBuildsRequest(input)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return out, req.Send()
|
||||
}
|
||||
|
||||
const opBatchGetBuilds = "BatchGetBuilds"
|
||||
|
||||
// BatchGetBuildsRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the BatchGetBuilds operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See BatchGetBuilds for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the BatchGetBuilds method directly
|
||||
// instead.
|
||||
// See BatchGetBuilds for more information on using the BatchGetBuilds
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the BatchGetBuildsRequest method.
|
||||
// req, resp := client.BatchGetBuildsRequest(params)
|
||||
@@ -96,19 +173,18 @@ const opBatchGetProjects = "BatchGetProjects"
|
||||
|
||||
// BatchGetProjectsRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the BatchGetProjects operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See BatchGetProjects for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the BatchGetProjects method directly
|
||||
// instead.
|
||||
// See BatchGetProjects for more information on using the BatchGetProjects
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the BatchGetProjectsRequest method.
|
||||
// req, resp := client.BatchGetProjectsRequest(params)
|
||||
@@ -176,19 +252,18 @@ const opCreateProject = "CreateProject"
|
||||
|
||||
// CreateProjectRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the CreateProject operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See CreateProject for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the CreateProject method directly
|
||||
// instead.
|
||||
// See CreateProject for more information on using the CreateProject
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the CreateProjectRequest method.
|
||||
// req, resp := client.CreateProjectRequest(params)
|
||||
@@ -263,19 +338,18 @@ const opDeleteProject = "DeleteProject"
|
||||
|
||||
// DeleteProjectRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the DeleteProject operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See DeleteProject for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the DeleteProject method directly
|
||||
// instead.
|
||||
// See DeleteProject for more information on using the DeleteProject
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the DeleteProjectRequest method.
|
||||
// req, resp := client.DeleteProjectRequest(params)
|
||||
@@ -343,19 +417,18 @@ const opListBuilds = "ListBuilds"
|
||||
|
||||
// ListBuildsRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the ListBuilds operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See ListBuilds for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the ListBuilds method directly
|
||||
// instead.
|
||||
// See ListBuilds for more information on using the ListBuilds
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the ListBuildsRequest method.
|
||||
// req, resp := client.ListBuildsRequest(params)
|
||||
@@ -423,19 +496,18 @@ const opListBuildsForProject = "ListBuildsForProject"
|
||||
|
||||
// ListBuildsForProjectRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the ListBuildsForProject operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See ListBuildsForProject for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the ListBuildsForProject method directly
|
||||
// instead.
|
||||
// See ListBuildsForProject for more information on using the ListBuildsForProject
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the ListBuildsForProjectRequest method.
|
||||
// req, resp := client.ListBuildsForProjectRequest(params)
|
||||
@@ -507,19 +579,18 @@ const opListCuratedEnvironmentImages = "ListCuratedEnvironmentImages"
|
||||
|
||||
// ListCuratedEnvironmentImagesRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the ListCuratedEnvironmentImages operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See ListCuratedEnvironmentImages for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the ListCuratedEnvironmentImages method directly
|
||||
// instead.
|
||||
// See ListCuratedEnvironmentImages for more information on using the ListCuratedEnvironmentImages
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the ListCuratedEnvironmentImagesRequest method.
|
||||
// req, resp := client.ListCuratedEnvironmentImagesRequest(params)
|
||||
@@ -582,19 +653,18 @@ const opListProjects = "ListProjects"
|
||||
|
||||
// ListProjectsRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the ListProjects operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See ListProjects for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the ListProjects method directly
|
||||
// instead.
|
||||
// See ListProjects for more information on using the ListProjects
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the ListProjectsRequest method.
|
||||
// req, resp := client.ListProjectsRequest(params)
|
||||
@@ -663,19 +733,18 @@ const opStartBuild = "StartBuild"
|
||||
|
||||
// StartBuildRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the StartBuild operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See StartBuild for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the StartBuild method directly
|
||||
// instead.
|
||||
// See StartBuild for more information on using the StartBuild
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the StartBuildRequest method.
|
||||
// req, resp := client.StartBuildRequest(params)
|
||||
@@ -749,19 +818,18 @@ const opStopBuild = "StopBuild"
|
||||
|
||||
// StopBuildRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the StopBuild operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See StopBuild for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the StopBuild method directly
|
||||
// instead.
|
||||
// See StopBuild for more information on using the StopBuild
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the StopBuildRequest method.
|
||||
// req, resp := client.StopBuildRequest(params)
|
||||
@@ -832,19 +900,18 @@ const opUpdateProject = "UpdateProject"
|
||||
|
||||
// UpdateProjectRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the UpdateProject operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See UpdateProject for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the UpdateProject method directly
|
||||
// instead.
|
||||
// See UpdateProject for more information on using the UpdateProject
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the UpdateProjectRequest method.
|
||||
// req, resp := client.UpdateProjectRequest(params)
|
||||
@@ -911,6 +978,81 @@ func (c *CodeBuild) UpdateProjectWithContext(ctx aws.Context, input *UpdateProje
|
||||
return out, req.Send()
|
||||
}
|
||||
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchDeleteBuildsInput
|
||||
type BatchDeleteBuildsInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// The IDs of the builds to delete.
|
||||
//
|
||||
// Ids is a required field
|
||||
Ids []*string `locationName:"ids" min:"1" type:"list" required:"true"`
|
||||
}
|
||||
|
||||
// String returns the string representation
|
||||
func (s BatchDeleteBuildsInput) String() string {
|
||||
return awsutil.Prettify(s)
|
||||
}
|
||||
|
||||
// GoString returns the string representation
|
||||
func (s BatchDeleteBuildsInput) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// Validate inspects the fields of the type to determine if they are valid.
|
||||
func (s *BatchDeleteBuildsInput) Validate() error {
|
||||
invalidParams := request.ErrInvalidParams{Context: "BatchDeleteBuildsInput"}
|
||||
if s.Ids == nil {
|
||||
invalidParams.Add(request.NewErrParamRequired("Ids"))
|
||||
}
|
||||
if s.Ids != nil && len(s.Ids) < 1 {
|
||||
invalidParams.Add(request.NewErrParamMinLen("Ids", 1))
|
||||
}
|
||||
|
||||
if invalidParams.Len() > 0 {
|
||||
return invalidParams
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetIds sets the Ids field's value.
|
||||
func (s *BatchDeleteBuildsInput) SetIds(v []*string) *BatchDeleteBuildsInput {
|
||||
s.Ids = v
|
||||
return s
|
||||
}
|
||||
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchDeleteBuildsOutput
|
||||
type BatchDeleteBuildsOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// The IDs of the builds that were successfully deleted.
|
||||
BuildsDeleted []*string `locationName:"buildsDeleted" min:"1" type:"list"`
|
||||
|
||||
// Information about any builds that could not be successfully deleted.
|
||||
BuildsNotDeleted []*BuildNotDeleted `locationName:"buildsNotDeleted" type:"list"`
|
||||
}
|
||||
|
||||
// String returns the string representation
|
||||
func (s BatchDeleteBuildsOutput) String() string {
|
||||
return awsutil.Prettify(s)
|
||||
}
|
||||
|
||||
// GoString returns the string representation
|
||||
func (s BatchDeleteBuildsOutput) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// SetBuildsDeleted sets the BuildsDeleted field's value.
|
||||
func (s *BatchDeleteBuildsOutput) SetBuildsDeleted(v []*string) *BatchDeleteBuildsOutput {
|
||||
s.BuildsDeleted = v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetBuildsNotDeleted sets the BuildsNotDeleted field's value.
|
||||
func (s *BatchDeleteBuildsOutput) SetBuildsNotDeleted(v []*BuildNotDeleted) *BatchDeleteBuildsOutput {
|
||||
s.BuildsNotDeleted = v
|
||||
return s
|
||||
}
|
||||
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchGetBuildsInput
|
||||
type BatchGetBuildsInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
@@ -1299,6 +1441,40 @@ func (s *BuildArtifacts) SetSha256sum(v string) *BuildArtifacts {
|
||||
return s
|
||||
}
|
||||
|
||||
// Information about a build that could not be successfully deleted.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BuildNotDeleted
|
||||
type BuildNotDeleted struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// The ID of the build that could not be successfully deleted.
|
||||
Id *string `locationName:"id" min:"1" type:"string"`
|
||||
|
||||
// Additional information about the build that could not be successfully deleted.
|
||||
StatusCode *string `locationName:"statusCode" type:"string"`
|
||||
}
|
||||
|
||||
// String returns the string representation
|
||||
func (s BuildNotDeleted) String() string {
|
||||
return awsutil.Prettify(s)
|
||||
}
|
||||
|
||||
// GoString returns the string representation
|
||||
func (s BuildNotDeleted) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// SetId sets the Id field's value.
|
||||
func (s *BuildNotDeleted) SetId(v string) *BuildNotDeleted {
|
||||
s.Id = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetStatusCode sets the StatusCode field's value.
|
||||
func (s *BuildNotDeleted) SetStatusCode(v string) *BuildNotDeleted {
|
||||
s.StatusCode = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// Information about a stage for a build.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BuildPhase
|
||||
type BuildPhase struct {
|
||||
@@ -1452,7 +1628,7 @@ type CreateProjectInput struct {
|
||||
// How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait
|
||||
// until timing out any build that has not been marked as completed. The default
|
||||
// is 60 minutes.
|
||||
TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" min:"1" type:"integer"`
|
||||
TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" min:"5" type:"integer"`
|
||||
}
|
||||
|
||||
// String returns the string representation
|
||||
@@ -1489,8 +1665,8 @@ func (s *CreateProjectInput) Validate() error {
|
||||
if s.Source == nil {
|
||||
invalidParams.Add(request.NewErrParamRequired("Source"))
|
||||
}
|
||||
if s.TimeoutInMinutes != nil && *s.TimeoutInMinutes < 1 {
|
||||
invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutes", 1))
|
||||
if s.TimeoutInMinutes != nil && *s.TimeoutInMinutes < 5 {
|
||||
invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutes", 5))
|
||||
}
|
||||
if s.Artifacts != nil {
|
||||
if err := s.Artifacts.Validate(); err != nil {
|
||||
@@ -1773,8 +1949,21 @@ type EnvironmentVariable struct {
|
||||
// Name is a required field
|
||||
Name *string `locationName:"name" min:"1" type:"string" required:"true"`
|
||||
|
||||
// The type of environment variable. Valid values include:
|
||||
//
|
||||
// * PARAMETER_STORE: An environment variable stored in Amazon EC2 Systems
|
||||
// Manager Parameter Store.
|
||||
//
|
||||
// * PLAINTEXT: An environment variable in plaintext format.
|
||||
Type *string `locationName:"type" type:"string" enum:"EnvironmentVariableType"`
|
||||
|
||||
// The value of the environment variable.
|
||||
//
|
||||
// We strongly discourage using environment variables to store sensitive values,
|
||||
// especially AWS secret key IDs and secret access keys. Environment variables
|
||||
// can be displayed in plain text using tools such as the AWS CodeBuild console
|
||||
// and the AWS Command Line Interface (AWS CLI).
|
||||
//
|
||||
// Value is a required field
|
||||
Value *string `locationName:"value" type:"string" required:"true"`
|
||||
}
|
||||
@@ -1814,6 +2003,12 @@ func (s *EnvironmentVariable) SetName(v string) *EnvironmentVariable {
|
||||
return s
|
||||
}
|
||||
|
||||
// SetType sets the Type field's value.
|
||||
func (s *EnvironmentVariable) SetType(v string) *EnvironmentVariable {
|
||||
s.Type = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetValue sets the Value field's value.
|
||||
func (s *EnvironmentVariable) SetValue(v string) *EnvironmentVariable {
|
||||
s.Value = &v
|
||||
@@ -2288,7 +2483,7 @@ type Project struct {
|
||||
// How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait
|
||||
// before timing out any related build that did not get marked as completed.
|
||||
// The default is 60 minutes.
|
||||
TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" min:"1" type:"integer"`
|
||||
TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" min:"5" type:"integer"`
|
||||
}
|
||||
|
||||
// String returns the string representation
|
||||
@@ -2564,6 +2759,23 @@ type ProjectEnvironment struct {
|
||||
// Image is a required field
|
||||
Image *string `locationName:"image" min:"1" type:"string" required:"true"`
|
||||
|
||||
// If set to true, enables running the Docker daemon inside a Docker container;
|
||||
// otherwise, false or not specified (the default). This value must be set to
|
||||
// true only if this build project will be used to build Docker images, and
|
||||
// the specified build environment image is not one provided by AWS CodeBuild
|
||||
// with Docker support. Otherwise, all associated builds that attempt to interact
|
||||
// with the Docker daemon will fail. Note that you must also start the Docker
|
||||
// daemon so that your builds can interact with it as needed. One way to do
|
||||
// this is to initialize the Docker daemon in the install phase of your build
|
||||
// spec by running the following build commands. (Do not run the following build
|
||||
// commands if the specified build environment image is provided by AWS CodeBuild
|
||||
// with Docker support.)
|
||||
//
|
||||
// - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375
|
||||
// --storage-driver=overlay& - timeout -t 15 sh -c "until docker info; do echo
|
||||
// .; sleep 1; done"
|
||||
PrivilegedMode *bool `locationName:"privilegedMode" type:"boolean"`
|
||||
|
||||
// The type of build environment to use for related builds.
|
||||
//
|
||||
// Type is a required field
|
||||
@@ -2630,6 +2842,12 @@ func (s *ProjectEnvironment) SetImage(v string) *ProjectEnvironment {
|
||||
return s
|
||||
}
|
||||
|
||||
// SetPrivilegedMode sets the PrivilegedMode field's value.
|
||||
func (s *ProjectEnvironment) SetPrivilegedMode(v bool) *ProjectEnvironment {
|
||||
s.PrivilegedMode = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetType sets the Type field's value.
|
||||
func (s *ProjectEnvironment) SetType(v string) *ProjectEnvironment {
|
||||
s.Type = &v
|
||||
@@ -2646,7 +2864,7 @@ type ProjectSource struct {
|
||||
//
|
||||
// This information is for the AWS CodeBuild console's use only. Your code should
|
||||
// not get or set this information directly (unless the build project's source
|
||||
// type value is GITHUB).
|
||||
// type value is BITBUCKET or GITHUB).
|
||||
Auth *SourceAuth `locationName:"auth" type:"structure"`
|
||||
|
||||
// The build spec declaration to use for the builds in this build project.
|
||||
@@ -2674,17 +2892,33 @@ type ProjectSource struct {
|
||||
// * For source code in a GitHub repository, the HTTPS clone URL to the repository
|
||||
// that contains the source and the build spec. Also, you must connect your
|
||||
// AWS account to your GitHub account. To do this, use the AWS CodeBuild
|
||||
// console to begin creating a build project, and follow the on-screen instructions
|
||||
// to complete the connection. (After you have connected to your GitHub account,
|
||||
// you do not need to finish creating the build project, and you may then
|
||||
// leave the AWS CodeBuild console.) To instruct AWS CodeBuild to then use
|
||||
// this connection, in the source object, set the auth object's type value
|
||||
// to OAUTH.
|
||||
// console to begin creating a build project. When you use the console to
|
||||
// connect (or reconnect) with GitHub, on the GitHub Authorize application
|
||||
// page that displays, for Organization access, choose Request access next
|
||||
// to each repository you want to allow AWS CodeBuild to have access to.
|
||||
// Then choose Authorize application. (After you have connected to your GitHub
|
||||
// account, you do not need to finish creating the build project, and you
|
||||
// may then leave the AWS CodeBuild console.) To instruct AWS CodeBuild to
|
||||
// then use this connection, in the source object, set the auth object's
|
||||
// type value to OAUTH.
|
||||
//
|
||||
// * For source code in a Bitbucket repository, the HTTPS clone URL to the
|
||||
// repository that contains the source and the build spec. Also, you must
|
||||
// connect your AWS account to your Bitbucket account. To do this, use the
|
||||
// AWS CodeBuild console to begin creating a build project. When you use
|
||||
// the console to connect (or reconnect) with Bitbucket, on the Bitbucket
|
||||
// Confirm access to your account page that displays, choose Grant access.
|
||||
// (After you have connected to your Bitbucket account, you do not need to
|
||||
// finish creating the build project, and you may then leave the AWS CodeBuild
|
||||
// console.) To instruct AWS CodeBuild to then use this connection, in the
|
||||
// source object, set the auth object's type value to OAUTH.
|
||||
Location *string `locationName:"location" type:"string"`
|
||||
|
||||
// The type of repository that contains the source code to be built. Valid values
|
||||
// include:
|
||||
//
|
||||
// * BITBUCKET: The source code is in a Bitbucket repository.
|
||||
//
|
||||
// * CODECOMMIT: The source code is in an AWS CodeCommit repository.
|
||||
//
|
||||
// * CODEPIPELINE: The source code settings are specified in the source action
|
||||
@@ -2756,7 +2990,7 @@ func (s *ProjectSource) SetType(v string) *ProjectSource {
|
||||
//
|
||||
// This information is for the AWS CodeBuild console's use only. Your code should
|
||||
// not get or set this information directly (unless the build project's source
|
||||
// type value is GITHUB).
|
||||
// type value is BITBUCKET or GITHUB).
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/SourceAuth
|
||||
type SourceAuth struct {
|
||||
_ struct{} `type:"structure"`
|
||||
@@ -2830,7 +3064,19 @@ type StartBuildInput struct {
|
||||
// A version of the build input to be built, for this build only. If not specified,
|
||||
// the latest version will be used. If specified, must be one of:
|
||||
//
|
||||
// * For AWS CodeCommit or GitHub: the commit ID to use.
|
||||
// * For AWS CodeCommit: the commit ID to use.
|
||||
//
|
||||
// * For GitHub: the commit ID, pull request ID, branch name, or tag name
|
||||
// that corresponds to the version of the source code you want to build.
|
||||
// If a pull request ID is specified, it must use the format pr/pull-request-ID
|
||||
// (for example pr/25). If a branch name is specified, the branch's HEAD
|
||||
// commit ID will be used. If not specified, the default branch's HEAD commit
|
||||
// ID will be used.
|
||||
//
|
||||
// * For Bitbucket: the commit ID, branch name, or tag name that corresponds
|
||||
// to the version of the source code you want to build. If a branch name
|
||||
// is specified, the branch's HEAD commit ID will be used. If not specified,
|
||||
// the default branch's HEAD commit ID will be used.
|
||||
//
|
||||
// * For Amazon Simple Storage Service (Amazon S3): the version ID of the
|
||||
// object representing the build input ZIP file to use.
|
||||
@@ -2838,7 +3084,7 @@ type StartBuildInput struct {
|
||||
|
||||
// The number of build timeout minutes, from 5 to 480 (8 hours), that overrides,
|
||||
// for this build only, the latest setting already defined in the build project.
|
||||
TimeoutInMinutesOverride *int64 `locationName:"timeoutInMinutesOverride" min:"1" type:"integer"`
|
||||
TimeoutInMinutesOverride *int64 `locationName:"timeoutInMinutesOverride" min:"5" type:"integer"`
|
||||
}
|
||||
|
||||
// String returns the string representation
|
||||
@@ -2860,8 +3106,8 @@ func (s *StartBuildInput) Validate() error {
|
||||
if s.ProjectName != nil && len(*s.ProjectName) < 1 {
|
||||
invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
|
||||
}
|
||||
if s.TimeoutInMinutesOverride != nil && *s.TimeoutInMinutesOverride < 1 {
|
||||
invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutesOverride", 1))
|
||||
if s.TimeoutInMinutesOverride != nil && *s.TimeoutInMinutesOverride < 5 {
|
||||
invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutesOverride", 5))
|
||||
}
|
||||
if s.ArtifactsOverride != nil {
|
||||
if err := s.ArtifactsOverride.Validate(); err != nil {
|
||||
@@ -3108,7 +3354,7 @@ type UpdateProjectInput struct {
|
||||
|
||||
// The replacement value in minutes, from 5 to 480 (8 hours), for AWS CodeBuild
|
||||
// to wait before timing out any related build that did not get marked as completed.
|
||||
TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" min:"1" type:"integer"`
|
||||
TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" min:"5" type:"integer"`
|
||||
}
|
||||
|
||||
// String returns the string representation
|
||||
@@ -3136,8 +3382,8 @@ func (s *UpdateProjectInput) Validate() error {
|
||||
if s.ServiceRole != nil && len(*s.ServiceRole) < 1 {
|
||||
invalidParams.Add(request.NewErrParamMinLen("ServiceRole", 1))
|
||||
}
|
||||
if s.TimeoutInMinutes != nil && *s.TimeoutInMinutes < 1 {
|
||||
invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutes", 1))
|
||||
if s.TimeoutInMinutes != nil && *s.TimeoutInMinutes < 5 {
|
||||
invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutes", 5))
|
||||
}
|
||||
if s.Artifacts != nil {
|
||||
if err := s.Artifacts.Validate(); err != nil {
|
||||
@@ -3324,6 +3570,14 @@ const (
|
||||
EnvironmentTypeLinuxContainer = "LINUX_CONTAINER"
|
||||
)
|
||||
|
||||
const (
|
||||
// EnvironmentVariableTypePlaintext is a EnvironmentVariableType enum value
|
||||
EnvironmentVariableTypePlaintext = "PLAINTEXT"
|
||||
|
||||
// EnvironmentVariableTypeParameterStore is a EnvironmentVariableType enum value
|
||||
EnvironmentVariableTypeParameterStore = "PARAMETER_STORE"
|
||||
)
|
||||
|
||||
const (
|
||||
// LanguageTypeJava is a LanguageType enum value
|
||||
LanguageTypeJava = "JAVA"
|
||||
@@ -3346,6 +3600,9 @@ const (
|
||||
// LanguageTypeAndroid is a LanguageType enum value
|
||||
LanguageTypeAndroid = "ANDROID"
|
||||
|
||||
// LanguageTypeDotnet is a LanguageType enum value
|
||||
LanguageTypeDotnet = "DOTNET"
|
||||
|
||||
// LanguageTypeBase is a LanguageType enum value
|
||||
LanguageTypeBase = "BASE"
|
||||
)
|
||||
@@ -3397,6 +3654,9 @@ const (
|
||||
|
||||
// SourceTypeS3 is a SourceType enum value
|
||||
SourceTypeS3 = "S3"
|
||||
|
||||
// SourceTypeBitbucket is a SourceType enum value
|
||||
SourceTypeBitbucket = "BITBUCKET"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
+8
-4
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package codebuildiface provides an interface to enable mocking the AWS CodeBuild service client
|
||||
// for testing your code.
|
||||
@@ -21,12 +21,12 @@ import (
|
||||
//
|
||||
// The best way to use this interface is so the SDK's service client's calls
|
||||
// can be stubbed out for unit testing your code with the SDK without needing
|
||||
// to inject custom request handlers into the the SDK's request pipeline.
|
||||
// to inject custom request handlers into the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // AWS CodeBuild.
|
||||
// func myFunc(svc codebuildiface.CodeBuildAPI) bool {
|
||||
// // Make svc.BatchGetBuilds request
|
||||
// // Make svc.BatchDeleteBuilds request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
@@ -42,7 +42,7 @@ import (
|
||||
// type mockCodeBuildClient struct {
|
||||
// codebuildiface.CodeBuildAPI
|
||||
// }
|
||||
// func (m *mockCodeBuildClient) BatchGetBuilds(input *codebuild.BatchGetBuildsInput) (*codebuild.BatchGetBuildsOutput, error) {
|
||||
// func (m *mockCodeBuildClient) BatchDeleteBuilds(input *codebuild.BatchDeleteBuildsInput) (*codebuild.BatchDeleteBuildsOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
@@ -60,6 +60,10 @@ import (
|
||||
// and waiters. Its suggested to use the pattern above for testing, or using
|
||||
// tooling to generate mocks to satisfy the interfaces.
|
||||
type CodeBuildAPI interface {
|
||||
BatchDeleteBuilds(*codebuild.BatchDeleteBuildsInput) (*codebuild.BatchDeleteBuildsOutput, error)
|
||||
BatchDeleteBuildsWithContext(aws.Context, *codebuild.BatchDeleteBuildsInput, ...request.Option) (*codebuild.BatchDeleteBuildsOutput, error)
|
||||
BatchDeleteBuildsRequest(*codebuild.BatchDeleteBuildsInput) (*request.Request, *codebuild.BatchDeleteBuildsOutput)
|
||||
|
||||
BatchGetBuilds(*codebuild.BatchGetBuildsInput) (*codebuild.BatchGetBuildsOutput, error)
|
||||
BatchGetBuildsWithContext(aws.Context, *codebuild.BatchGetBuildsInput, ...request.Option) (*codebuild.BatchGetBuildsOutput, error)
|
||||
BatchGetBuildsRequest(*codebuild.BatchGetBuildsInput) (*request.Request, *codebuild.BatchGetBuildsOutput)
|
||||
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package codebuild provides the client and types for making API
|
||||
// requests to AWS CodeBuild.
|
||||
//
|
||||
// AWS CodeBuild is a fully managed build service in the cloud. AWS CodeBuild
|
||||
// compiles your source code, runs unit tests, and produces artifacts that are
|
||||
// ready to deploy. AWS 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 Apach
|
||||
// Maven, Gradle, and more. You can also fully customize build environments
|
||||
// in AWS CodeBuild to use your own build tools. AWS CodeBuild scales automatically
|
||||
// to meet peak build requests, and you pay only for the build time you consume.
|
||||
// For more information about AWS CodeBuild, see the AWS CodeBuild User Guide.
|
||||
//
|
||||
// AWS CodeBuild supports these operations:
|
||||
//
|
||||
// * BatchDeleteBuilds: Deletes one or more builds.
|
||||
//
|
||||
// * BatchGetProjects: Gets information about one or more build projects.
|
||||
// A build project defines how AWS CodeBuild will run a build. This includes
|
||||
// information such as where to get the source code to build, the build environment
|
||||
// to use, the build commands to run, and where to store the build output.
|
||||
// A build environment represents a combination of operating system, programming
|
||||
// language runtime, and tools that AWS CodeBuild will use to run a build.
|
||||
// Also, you can add tags to build projects to help manage your resources
|
||||
// and costs.
|
||||
//
|
||||
// * CreateProject: Creates a build project.
|
||||
//
|
||||
// * DeleteProject: Deletes a build project.
|
||||
//
|
||||
// * ListProjects: Gets a list of build project names, with each build project
|
||||
// name representing a single build project.
|
||||
//
|
||||
// * UpdateProject: Changes the settings of an existing build project.
|
||||
//
|
||||
// * BatchGetBuilds: Gets information about one or more builds.
|
||||
//
|
||||
// * ListBuilds: Gets a list of build IDs, with each build ID representing
|
||||
// a single build.
|
||||
//
|
||||
// * ListBuildsForProject: Gets a list of build IDs for the specified build
|
||||
// project, with each build ID representing a single build.
|
||||
//
|
||||
// * StartBuild: Starts running a build.
|
||||
//
|
||||
// * StopBuild: Attempts to stop running a build.
|
||||
//
|
||||
// * ListCuratedEnvironmentImages: Gets information about Docker images that
|
||||
// are managed by AWS CodeBuild.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06 for more information on this service.
|
||||
//
|
||||
// See codebuild package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/codebuild/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To AWS CodeBuild with the SDK use the New function to create
|
||||
// a new service client. With that client you can make API requests to the service.
|
||||
// These clients are safe to use concurrently.
|
||||
//
|
||||
// See the SDK's documentation for more information on how to use the SDK.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||
//
|
||||
// See aws.Config documentation for more information on configuring SDK clients.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||
//
|
||||
// See the AWS CodeBuild client CodeBuild for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/codebuild/#New
|
||||
package codebuild
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package codebuild
|
||||
|
||||
|
||||
+35
-331
@@ -1,354 +1,58 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package codebuild_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/codebuild"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
var _ strings.Reader
|
||||
var _ aws.Config
|
||||
|
||||
func ExampleCodeBuild_BatchGetBuilds() {
|
||||
sess := session.Must(session.NewSession())
|
||||
func parseTime(layout, value string) *time.Time {
|
||||
t, err := time.Parse(layout, value)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return &t
|
||||
}
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.BatchGetBuildsInput{
|
||||
Ids: []*string{ // Required
|
||||
aws.String("NonEmptyString"), // Required
|
||||
// More values...
|
||||
// To get information about builds
|
||||
//
|
||||
// The following example gets information about builds with the specified build IDs.
|
||||
func ExampleCodeBuild_BatchGetBuilds_shared00() {
|
||||
svc := codebuild.New(session.New())
|
||||
input := &codebuild.BatchGetBuildsInput{
|
||||
Ids: []*string{
|
||||
aws.String("codebuild-demo-project:9b0ac37f-d19e-4254-9079-f47e9a389eEX"),
|
||||
aws.String("codebuild-demo-project:b79a46f7-1473-4636-a23f-da9c45c208EX"),
|
||||
},
|
||||
}
|
||||
resp, err := svc.BatchGetBuilds(params)
|
||||
|
||||
result, err := svc.BatchGetBuilds(input)
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
if aerr, ok := err.(awserr.Error); ok {
|
||||
switch aerr.Code() {
|
||||
case codebuild.ErrCodeInvalidInputException:
|
||||
fmt.Println(codebuild.ErrCodeInvalidInputException, aerr.Error())
|
||||
default:
|
||||
fmt.Println(aerr.Error())
|
||||
}
|
||||
} else {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCodeBuild_BatchGetProjects() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.BatchGetProjectsInput{
|
||||
Names: []*string{ // Required
|
||||
aws.String("NonEmptyString"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.BatchGetProjects(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCodeBuild_CreateProject() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.CreateProjectInput{
|
||||
Artifacts: &codebuild.ProjectArtifacts{ // Required
|
||||
Type: aws.String("ArtifactsType"), // Required
|
||||
Location: aws.String("String"),
|
||||
Name: aws.String("String"),
|
||||
NamespaceType: aws.String("ArtifactNamespace"),
|
||||
Packaging: aws.String("ArtifactPackaging"),
|
||||
Path: aws.String("String"),
|
||||
},
|
||||
Environment: &codebuild.ProjectEnvironment{ // Required
|
||||
ComputeType: aws.String("ComputeType"), // Required
|
||||
Image: aws.String("NonEmptyString"), // Required
|
||||
Type: aws.String("EnvironmentType"), // Required
|
||||
EnvironmentVariables: []*codebuild.EnvironmentVariable{
|
||||
{ // Required
|
||||
Name: aws.String("NonEmptyString"), // Required
|
||||
Value: aws.String("String"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
Name: aws.String("ProjectName"), // Required
|
||||
Source: &codebuild.ProjectSource{ // Required
|
||||
Type: aws.String("SourceType"), // Required
|
||||
Auth: &codebuild.SourceAuth{
|
||||
Type: aws.String("SourceAuthType"), // Required
|
||||
Resource: aws.String("String"),
|
||||
},
|
||||
Buildspec: aws.String("String"),
|
||||
Location: aws.String("String"),
|
||||
},
|
||||
Description: aws.String("ProjectDescription"),
|
||||
EncryptionKey: aws.String("NonEmptyString"),
|
||||
ServiceRole: aws.String("NonEmptyString"),
|
||||
Tags: []*codebuild.Tag{
|
||||
{ // Required
|
||||
Key: aws.String("KeyInput"),
|
||||
Value: aws.String("ValueInput"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
TimeoutInMinutes: aws.Int64(1),
|
||||
}
|
||||
resp, err := svc.CreateProject(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCodeBuild_DeleteProject() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.DeleteProjectInput{
|
||||
Name: aws.String("NonEmptyString"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteProject(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCodeBuild_ListBuilds() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.ListBuildsInput{
|
||||
NextToken: aws.String("String"),
|
||||
SortOrder: aws.String("SortOrderType"),
|
||||
}
|
||||
resp, err := svc.ListBuilds(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCodeBuild_ListBuildsForProject() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.ListBuildsForProjectInput{
|
||||
ProjectName: aws.String("NonEmptyString"), // Required
|
||||
NextToken: aws.String("String"),
|
||||
SortOrder: aws.String("SortOrderType"),
|
||||
}
|
||||
resp, err := svc.ListBuildsForProject(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCodeBuild_ListCuratedEnvironmentImages() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
var params *codebuild.ListCuratedEnvironmentImagesInput
|
||||
resp, err := svc.ListCuratedEnvironmentImages(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCodeBuild_ListProjects() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.ListProjectsInput{
|
||||
NextToken: aws.String("NonEmptyString"),
|
||||
SortBy: aws.String("ProjectSortByType"),
|
||||
SortOrder: aws.String("SortOrderType"),
|
||||
}
|
||||
resp, err := svc.ListProjects(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCodeBuild_StartBuild() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.StartBuildInput{
|
||||
ProjectName: aws.String("NonEmptyString"), // Required
|
||||
ArtifactsOverride: &codebuild.ProjectArtifacts{
|
||||
Type: aws.String("ArtifactsType"), // Required
|
||||
Location: aws.String("String"),
|
||||
Name: aws.String("String"),
|
||||
NamespaceType: aws.String("ArtifactNamespace"),
|
||||
Packaging: aws.String("ArtifactPackaging"),
|
||||
Path: aws.String("String"),
|
||||
},
|
||||
BuildspecOverride: aws.String("String"),
|
||||
EnvironmentVariablesOverride: []*codebuild.EnvironmentVariable{
|
||||
{ // Required
|
||||
Name: aws.String("NonEmptyString"), // Required
|
||||
Value: aws.String("String"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
SourceVersion: aws.String("String"),
|
||||
TimeoutInMinutesOverride: aws.Int64(1),
|
||||
}
|
||||
resp, err := svc.StartBuild(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCodeBuild_StopBuild() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.StopBuildInput{
|
||||
Id: aws.String("NonEmptyString"), // Required
|
||||
}
|
||||
resp, err := svc.StopBuild(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCodeBuild_UpdateProject() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.UpdateProjectInput{
|
||||
Name: aws.String("NonEmptyString"), // Required
|
||||
Artifacts: &codebuild.ProjectArtifacts{
|
||||
Type: aws.String("ArtifactsType"), // Required
|
||||
Location: aws.String("String"),
|
||||
Name: aws.String("String"),
|
||||
NamespaceType: aws.String("ArtifactNamespace"),
|
||||
Packaging: aws.String("ArtifactPackaging"),
|
||||
Path: aws.String("String"),
|
||||
},
|
||||
Description: aws.String("ProjectDescription"),
|
||||
EncryptionKey: aws.String("NonEmptyString"),
|
||||
Environment: &codebuild.ProjectEnvironment{
|
||||
ComputeType: aws.String("ComputeType"), // Required
|
||||
Image: aws.String("NonEmptyString"), // Required
|
||||
Type: aws.String("EnvironmentType"), // Required
|
||||
EnvironmentVariables: []*codebuild.EnvironmentVariable{
|
||||
{ // Required
|
||||
Name: aws.String("NonEmptyString"), // Required
|
||||
Value: aws.String("String"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
ServiceRole: aws.String("NonEmptyString"),
|
||||
Source: &codebuild.ProjectSource{
|
||||
Type: aws.String("SourceType"), // Required
|
||||
Auth: &codebuild.SourceAuth{
|
||||
Type: aws.String("SourceAuthType"), // Required
|
||||
Resource: aws.String("String"),
|
||||
},
|
||||
Buildspec: aws.String("String"),
|
||||
Location: aws.String("String"),
|
||||
},
|
||||
Tags: []*codebuild.Tag{
|
||||
{ // Required
|
||||
Key: aws.String("KeyInput"),
|
||||
Value: aws.String("ValueInput"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
TimeoutInMinutes: aws.Int64(1),
|
||||
}
|
||||
resp, err := svc.UpdateProject(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
fmt.Println(result)
|
||||
}
|
||||
|
||||
+6
-47
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package codebuild
|
||||
|
||||
@@ -11,53 +11,12 @@ import (
|
||||
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
|
||||
)
|
||||
|
||||
// AWS CodeBuild is a fully managed build service in the cloud. AWS CodeBuild
|
||||
// compiles your source code, runs unit tests, and produces artifacts that are
|
||||
// ready to deploy. AWS 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 Apach
|
||||
// Maven, Gradle, and more. You can also fully customize build environments
|
||||
// in AWS CodeBuild to use your own build tools. AWS CodeBuild scales automatically
|
||||
// to meet peak build requests, and you pay only for the build time you consume.
|
||||
// For more information about AWS CodeBuild, see the AWS CodeBuild User Guide.
|
||||
// CodeBuild provides the API operation methods for making requests to
|
||||
// AWS CodeBuild. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// AWS CodeBuild supports these operations:
|
||||
//
|
||||
// * BatchGetProjects: Gets information about one or more build projects.
|
||||
// A build project defines how AWS CodeBuild will run a build. This includes
|
||||
// information such as where to get the source code to build, the build environment
|
||||
// to use, the build commands to run, and where to store the build output.
|
||||
// A build environment represents a combination of operating system, programming
|
||||
// language runtime, and tools that AWS CodeBuild will use to run a build.
|
||||
// Also, you can add tags to build projects to help manage your resources
|
||||
// and costs.
|
||||
//
|
||||
// * CreateProject: Creates a build project.
|
||||
//
|
||||
// * DeleteProject: Deletes a build project.
|
||||
//
|
||||
// * ListProjects: Gets a list of build project names, with each build project
|
||||
// name representing a single build project.
|
||||
//
|
||||
// * UpdateProject: Changes the settings of an existing build project.
|
||||
//
|
||||
// * BatchGetBuilds: Gets information about one or more builds.
|
||||
//
|
||||
// * ListBuilds: Gets a list of build IDs, with each build ID representing
|
||||
// a single build.
|
||||
//
|
||||
// * ListBuildsForProject: Gets a list of build IDs for the specified build
|
||||
// project, with each build ID representing a single build.
|
||||
//
|
||||
// * StartBuild: Starts running a build.
|
||||
//
|
||||
// * StopBuild: Attempts to stop running a build.
|
||||
//
|
||||
// * ListCuratedEnvironmentImages: Gets information about Docker images that
|
||||
// are managed by AWS CodeBuild.
|
||||
// The service client's operations are safe to be used concurrently.
|
||||
// It is not safe to mutate any of the client's properties though.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06
|
||||
// CodeBuild methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type CodeBuild struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user