mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
update vendor/ dir to latest w/o heroku, moby
had to lock a lot of things in place
This commit is contained in:
4927
vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go
generated
vendored
4927
vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go
generated
vendored
File diff suppressed because it is too large
Load Diff
166
vendor/github.com/aws/aws-sdk-go/service/codedeploy/codedeployiface/interface.go
generated
vendored
166
vendor/github.com/aws/aws-sdk-go/service/codedeploy/codedeployiface/interface.go
generated
vendored
@@ -1,166 +0,0 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
// Package codedeployiface provides an interface for the AWS CodeDeploy.
|
||||
package codedeployiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/codedeploy"
|
||||
)
|
||||
|
||||
// CodeDeployAPI is the interface type for codedeploy.CodeDeploy.
|
||||
type CodeDeployAPI interface {
|
||||
AddTagsToOnPremisesInstancesRequest(*codedeploy.AddTagsToOnPremisesInstancesInput) (*request.Request, *codedeploy.AddTagsToOnPremisesInstancesOutput)
|
||||
|
||||
AddTagsToOnPremisesInstances(*codedeploy.AddTagsToOnPremisesInstancesInput) (*codedeploy.AddTagsToOnPremisesInstancesOutput, error)
|
||||
|
||||
BatchGetApplicationRevisionsRequest(*codedeploy.BatchGetApplicationRevisionsInput) (*request.Request, *codedeploy.BatchGetApplicationRevisionsOutput)
|
||||
|
||||
BatchGetApplicationRevisions(*codedeploy.BatchGetApplicationRevisionsInput) (*codedeploy.BatchGetApplicationRevisionsOutput, error)
|
||||
|
||||
BatchGetApplicationsRequest(*codedeploy.BatchGetApplicationsInput) (*request.Request, *codedeploy.BatchGetApplicationsOutput)
|
||||
|
||||
BatchGetApplications(*codedeploy.BatchGetApplicationsInput) (*codedeploy.BatchGetApplicationsOutput, error)
|
||||
|
||||
BatchGetDeploymentGroupsRequest(*codedeploy.BatchGetDeploymentGroupsInput) (*request.Request, *codedeploy.BatchGetDeploymentGroupsOutput)
|
||||
|
||||
BatchGetDeploymentGroups(*codedeploy.BatchGetDeploymentGroupsInput) (*codedeploy.BatchGetDeploymentGroupsOutput, error)
|
||||
|
||||
BatchGetDeploymentInstancesRequest(*codedeploy.BatchGetDeploymentInstancesInput) (*request.Request, *codedeploy.BatchGetDeploymentInstancesOutput)
|
||||
|
||||
BatchGetDeploymentInstances(*codedeploy.BatchGetDeploymentInstancesInput) (*codedeploy.BatchGetDeploymentInstancesOutput, error)
|
||||
|
||||
BatchGetDeploymentsRequest(*codedeploy.BatchGetDeploymentsInput) (*request.Request, *codedeploy.BatchGetDeploymentsOutput)
|
||||
|
||||
BatchGetDeployments(*codedeploy.BatchGetDeploymentsInput) (*codedeploy.BatchGetDeploymentsOutput, error)
|
||||
|
||||
BatchGetOnPremisesInstancesRequest(*codedeploy.BatchGetOnPremisesInstancesInput) (*request.Request, *codedeploy.BatchGetOnPremisesInstancesOutput)
|
||||
|
||||
BatchGetOnPremisesInstances(*codedeploy.BatchGetOnPremisesInstancesInput) (*codedeploy.BatchGetOnPremisesInstancesOutput, error)
|
||||
|
||||
CreateApplicationRequest(*codedeploy.CreateApplicationInput) (*request.Request, *codedeploy.CreateApplicationOutput)
|
||||
|
||||
CreateApplication(*codedeploy.CreateApplicationInput) (*codedeploy.CreateApplicationOutput, error)
|
||||
|
||||
CreateDeploymentRequest(*codedeploy.CreateDeploymentInput) (*request.Request, *codedeploy.CreateDeploymentOutput)
|
||||
|
||||
CreateDeployment(*codedeploy.CreateDeploymentInput) (*codedeploy.CreateDeploymentOutput, error)
|
||||
|
||||
CreateDeploymentConfigRequest(*codedeploy.CreateDeploymentConfigInput) (*request.Request, *codedeploy.CreateDeploymentConfigOutput)
|
||||
|
||||
CreateDeploymentConfig(*codedeploy.CreateDeploymentConfigInput) (*codedeploy.CreateDeploymentConfigOutput, error)
|
||||
|
||||
CreateDeploymentGroupRequest(*codedeploy.CreateDeploymentGroupInput) (*request.Request, *codedeploy.CreateDeploymentGroupOutput)
|
||||
|
||||
CreateDeploymentGroup(*codedeploy.CreateDeploymentGroupInput) (*codedeploy.CreateDeploymentGroupOutput, error)
|
||||
|
||||
DeleteApplicationRequest(*codedeploy.DeleteApplicationInput) (*request.Request, *codedeploy.DeleteApplicationOutput)
|
||||
|
||||
DeleteApplication(*codedeploy.DeleteApplicationInput) (*codedeploy.DeleteApplicationOutput, error)
|
||||
|
||||
DeleteDeploymentConfigRequest(*codedeploy.DeleteDeploymentConfigInput) (*request.Request, *codedeploy.DeleteDeploymentConfigOutput)
|
||||
|
||||
DeleteDeploymentConfig(*codedeploy.DeleteDeploymentConfigInput) (*codedeploy.DeleteDeploymentConfigOutput, error)
|
||||
|
||||
DeleteDeploymentGroupRequest(*codedeploy.DeleteDeploymentGroupInput) (*request.Request, *codedeploy.DeleteDeploymentGroupOutput)
|
||||
|
||||
DeleteDeploymentGroup(*codedeploy.DeleteDeploymentGroupInput) (*codedeploy.DeleteDeploymentGroupOutput, error)
|
||||
|
||||
DeregisterOnPremisesInstanceRequest(*codedeploy.DeregisterOnPremisesInstanceInput) (*request.Request, *codedeploy.DeregisterOnPremisesInstanceOutput)
|
||||
|
||||
DeregisterOnPremisesInstance(*codedeploy.DeregisterOnPremisesInstanceInput) (*codedeploy.DeregisterOnPremisesInstanceOutput, error)
|
||||
|
||||
GetApplicationRequest(*codedeploy.GetApplicationInput) (*request.Request, *codedeploy.GetApplicationOutput)
|
||||
|
||||
GetApplication(*codedeploy.GetApplicationInput) (*codedeploy.GetApplicationOutput, error)
|
||||
|
||||
GetApplicationRevisionRequest(*codedeploy.GetApplicationRevisionInput) (*request.Request, *codedeploy.GetApplicationRevisionOutput)
|
||||
|
||||
GetApplicationRevision(*codedeploy.GetApplicationRevisionInput) (*codedeploy.GetApplicationRevisionOutput, error)
|
||||
|
||||
GetDeploymentRequest(*codedeploy.GetDeploymentInput) (*request.Request, *codedeploy.GetDeploymentOutput)
|
||||
|
||||
GetDeployment(*codedeploy.GetDeploymentInput) (*codedeploy.GetDeploymentOutput, error)
|
||||
|
||||
GetDeploymentConfigRequest(*codedeploy.GetDeploymentConfigInput) (*request.Request, *codedeploy.GetDeploymentConfigOutput)
|
||||
|
||||
GetDeploymentConfig(*codedeploy.GetDeploymentConfigInput) (*codedeploy.GetDeploymentConfigOutput, error)
|
||||
|
||||
GetDeploymentGroupRequest(*codedeploy.GetDeploymentGroupInput) (*request.Request, *codedeploy.GetDeploymentGroupOutput)
|
||||
|
||||
GetDeploymentGroup(*codedeploy.GetDeploymentGroupInput) (*codedeploy.GetDeploymentGroupOutput, error)
|
||||
|
||||
GetDeploymentInstanceRequest(*codedeploy.GetDeploymentInstanceInput) (*request.Request, *codedeploy.GetDeploymentInstanceOutput)
|
||||
|
||||
GetDeploymentInstance(*codedeploy.GetDeploymentInstanceInput) (*codedeploy.GetDeploymentInstanceOutput, error)
|
||||
|
||||
GetOnPremisesInstanceRequest(*codedeploy.GetOnPremisesInstanceInput) (*request.Request, *codedeploy.GetOnPremisesInstanceOutput)
|
||||
|
||||
GetOnPremisesInstance(*codedeploy.GetOnPremisesInstanceInput) (*codedeploy.GetOnPremisesInstanceOutput, error)
|
||||
|
||||
ListApplicationRevisionsRequest(*codedeploy.ListApplicationRevisionsInput) (*request.Request, *codedeploy.ListApplicationRevisionsOutput)
|
||||
|
||||
ListApplicationRevisions(*codedeploy.ListApplicationRevisionsInput) (*codedeploy.ListApplicationRevisionsOutput, error)
|
||||
|
||||
ListApplicationRevisionsPages(*codedeploy.ListApplicationRevisionsInput, func(*codedeploy.ListApplicationRevisionsOutput, bool) bool) error
|
||||
|
||||
ListApplicationsRequest(*codedeploy.ListApplicationsInput) (*request.Request, *codedeploy.ListApplicationsOutput)
|
||||
|
||||
ListApplications(*codedeploy.ListApplicationsInput) (*codedeploy.ListApplicationsOutput, error)
|
||||
|
||||
ListApplicationsPages(*codedeploy.ListApplicationsInput, func(*codedeploy.ListApplicationsOutput, bool) bool) error
|
||||
|
||||
ListDeploymentConfigsRequest(*codedeploy.ListDeploymentConfigsInput) (*request.Request, *codedeploy.ListDeploymentConfigsOutput)
|
||||
|
||||
ListDeploymentConfigs(*codedeploy.ListDeploymentConfigsInput) (*codedeploy.ListDeploymentConfigsOutput, error)
|
||||
|
||||
ListDeploymentConfigsPages(*codedeploy.ListDeploymentConfigsInput, func(*codedeploy.ListDeploymentConfigsOutput, bool) bool) error
|
||||
|
||||
ListDeploymentGroupsRequest(*codedeploy.ListDeploymentGroupsInput) (*request.Request, *codedeploy.ListDeploymentGroupsOutput)
|
||||
|
||||
ListDeploymentGroups(*codedeploy.ListDeploymentGroupsInput) (*codedeploy.ListDeploymentGroupsOutput, error)
|
||||
|
||||
ListDeploymentGroupsPages(*codedeploy.ListDeploymentGroupsInput, func(*codedeploy.ListDeploymentGroupsOutput, bool) bool) error
|
||||
|
||||
ListDeploymentInstancesRequest(*codedeploy.ListDeploymentInstancesInput) (*request.Request, *codedeploy.ListDeploymentInstancesOutput)
|
||||
|
||||
ListDeploymentInstances(*codedeploy.ListDeploymentInstancesInput) (*codedeploy.ListDeploymentInstancesOutput, error)
|
||||
|
||||
ListDeploymentInstancesPages(*codedeploy.ListDeploymentInstancesInput, func(*codedeploy.ListDeploymentInstancesOutput, bool) bool) error
|
||||
|
||||
ListDeploymentsRequest(*codedeploy.ListDeploymentsInput) (*request.Request, *codedeploy.ListDeploymentsOutput)
|
||||
|
||||
ListDeployments(*codedeploy.ListDeploymentsInput) (*codedeploy.ListDeploymentsOutput, error)
|
||||
|
||||
ListDeploymentsPages(*codedeploy.ListDeploymentsInput, func(*codedeploy.ListDeploymentsOutput, bool) bool) error
|
||||
|
||||
ListOnPremisesInstancesRequest(*codedeploy.ListOnPremisesInstancesInput) (*request.Request, *codedeploy.ListOnPremisesInstancesOutput)
|
||||
|
||||
ListOnPremisesInstances(*codedeploy.ListOnPremisesInstancesInput) (*codedeploy.ListOnPremisesInstancesOutput, error)
|
||||
|
||||
RegisterApplicationRevisionRequest(*codedeploy.RegisterApplicationRevisionInput) (*request.Request, *codedeploy.RegisterApplicationRevisionOutput)
|
||||
|
||||
RegisterApplicationRevision(*codedeploy.RegisterApplicationRevisionInput) (*codedeploy.RegisterApplicationRevisionOutput, error)
|
||||
|
||||
RegisterOnPremisesInstanceRequest(*codedeploy.RegisterOnPremisesInstanceInput) (*request.Request, *codedeploy.RegisterOnPremisesInstanceOutput)
|
||||
|
||||
RegisterOnPremisesInstance(*codedeploy.RegisterOnPremisesInstanceInput) (*codedeploy.RegisterOnPremisesInstanceOutput, error)
|
||||
|
||||
RemoveTagsFromOnPremisesInstancesRequest(*codedeploy.RemoveTagsFromOnPremisesInstancesInput) (*request.Request, *codedeploy.RemoveTagsFromOnPremisesInstancesOutput)
|
||||
|
||||
RemoveTagsFromOnPremisesInstances(*codedeploy.RemoveTagsFromOnPremisesInstancesInput) (*codedeploy.RemoveTagsFromOnPremisesInstancesOutput, error)
|
||||
|
||||
StopDeploymentRequest(*codedeploy.StopDeploymentInput) (*request.Request, *codedeploy.StopDeploymentOutput)
|
||||
|
||||
StopDeployment(*codedeploy.StopDeploymentInput) (*codedeploy.StopDeploymentOutput, error)
|
||||
|
||||
UpdateApplicationRequest(*codedeploy.UpdateApplicationInput) (*request.Request, *codedeploy.UpdateApplicationOutput)
|
||||
|
||||
UpdateApplication(*codedeploy.UpdateApplicationInput) (*codedeploy.UpdateApplicationOutput, error)
|
||||
|
||||
UpdateDeploymentGroupRequest(*codedeploy.UpdateDeploymentGroupInput) (*request.Request, *codedeploy.UpdateDeploymentGroupOutput)
|
||||
|
||||
UpdateDeploymentGroup(*codedeploy.UpdateDeploymentGroupInput) (*codedeploy.UpdateDeploymentGroupOutput, error)
|
||||
}
|
||||
|
||||
var _ CodeDeployAPI = (*codedeploy.CodeDeploy)(nil)
|
||||
891
vendor/github.com/aws/aws-sdk-go/service/codedeploy/examples_test.go
generated
vendored
891
vendor/github.com/aws/aws-sdk-go/service/codedeploy/examples_test.go
generated
vendored
@@ -1,891 +0,0 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package codedeploy_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/codedeploy"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleCodeDeploy_AddTagsToOnPremisesInstances() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.AddTagsToOnPremisesInstancesInput{
|
||||
InstanceNames: []*string{ // Required
|
||||
aws.String("InstanceName"), // Required
|
||||
// More values...
|
||||
},
|
||||
Tags: []*codedeploy.Tag{ // Required
|
||||
{ // Required
|
||||
Key: aws.String("Key"),
|
||||
Value: aws.String("Value"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.AddTagsToOnPremisesInstances(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 ExampleCodeDeploy_BatchGetApplicationRevisions() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.BatchGetApplicationRevisionsInput{
|
||||
ApplicationName: aws.String("ApplicationName"), // Required
|
||||
Revisions: []*codedeploy.RevisionLocation{ // Required
|
||||
{ // Required
|
||||
GitHubLocation: &codedeploy.GitHubLocation{
|
||||
CommitId: aws.String("CommitId"),
|
||||
Repository: aws.String("Repository"),
|
||||
},
|
||||
RevisionType: aws.String("RevisionLocationType"),
|
||||
S3Location: &codedeploy.S3Location{
|
||||
Bucket: aws.String("S3Bucket"),
|
||||
BundleType: aws.String("BundleType"),
|
||||
ETag: aws.String("ETag"),
|
||||
Key: aws.String("S3Key"),
|
||||
Version: aws.String("VersionId"),
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.BatchGetApplicationRevisions(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 ExampleCodeDeploy_BatchGetApplications() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.BatchGetApplicationsInput{
|
||||
ApplicationNames: []*string{
|
||||
aws.String("ApplicationName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.BatchGetApplications(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 ExampleCodeDeploy_BatchGetDeploymentGroups() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.BatchGetDeploymentGroupsInput{
|
||||
ApplicationName: aws.String("ApplicationName"), // Required
|
||||
DeploymentGroupNames: []*string{ // Required
|
||||
aws.String("DeploymentGroupName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.BatchGetDeploymentGroups(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 ExampleCodeDeploy_BatchGetDeploymentInstances() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.BatchGetDeploymentInstancesInput{
|
||||
DeploymentId: aws.String("DeploymentId"), // Required
|
||||
InstanceIds: []*string{ // Required
|
||||
aws.String("InstanceId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.BatchGetDeploymentInstances(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 ExampleCodeDeploy_BatchGetDeployments() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.BatchGetDeploymentsInput{
|
||||
DeploymentIds: []*string{
|
||||
aws.String("DeploymentId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.BatchGetDeployments(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 ExampleCodeDeploy_BatchGetOnPremisesInstances() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.BatchGetOnPremisesInstancesInput{
|
||||
InstanceNames: []*string{
|
||||
aws.String("InstanceName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.BatchGetOnPremisesInstances(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 ExampleCodeDeploy_CreateApplication() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.CreateApplicationInput{
|
||||
ApplicationName: aws.String("ApplicationName"), // Required
|
||||
}
|
||||
resp, err := svc.CreateApplication(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 ExampleCodeDeploy_CreateDeployment() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.CreateDeploymentInput{
|
||||
ApplicationName: aws.String("ApplicationName"), // Required
|
||||
DeploymentConfigName: aws.String("DeploymentConfigName"),
|
||||
DeploymentGroupName: aws.String("DeploymentGroupName"),
|
||||
Description: aws.String("Description"),
|
||||
IgnoreApplicationStopFailures: aws.Bool(true),
|
||||
Revision: &codedeploy.RevisionLocation{
|
||||
GitHubLocation: &codedeploy.GitHubLocation{
|
||||
CommitId: aws.String("CommitId"),
|
||||
Repository: aws.String("Repository"),
|
||||
},
|
||||
RevisionType: aws.String("RevisionLocationType"),
|
||||
S3Location: &codedeploy.S3Location{
|
||||
Bucket: aws.String("S3Bucket"),
|
||||
BundleType: aws.String("BundleType"),
|
||||
ETag: aws.String("ETag"),
|
||||
Key: aws.String("S3Key"),
|
||||
Version: aws.String("VersionId"),
|
||||
},
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateDeployment(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 ExampleCodeDeploy_CreateDeploymentConfig() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.CreateDeploymentConfigInput{
|
||||
DeploymentConfigName: aws.String("DeploymentConfigName"), // Required
|
||||
MinimumHealthyHosts: &codedeploy.MinimumHealthyHosts{
|
||||
Type: aws.String("MinimumHealthyHostsType"),
|
||||
Value: aws.Int64(1),
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateDeploymentConfig(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 ExampleCodeDeploy_CreateDeploymentGroup() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.CreateDeploymentGroupInput{
|
||||
ApplicationName: aws.String("ApplicationName"), // Required
|
||||
DeploymentGroupName: aws.String("DeploymentGroupName"), // Required
|
||||
ServiceRoleArn: aws.String("Role"), // Required
|
||||
AutoScalingGroups: []*string{
|
||||
aws.String("AutoScalingGroupName"), // Required
|
||||
// More values...
|
||||
},
|
||||
DeploymentConfigName: aws.String("DeploymentConfigName"),
|
||||
Ec2TagFilters: []*codedeploy.EC2TagFilter{
|
||||
{ // Required
|
||||
Key: aws.String("Key"),
|
||||
Type: aws.String("EC2TagFilterType"),
|
||||
Value: aws.String("Value"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
OnPremisesInstanceTagFilters: []*codedeploy.TagFilter{
|
||||
{ // Required
|
||||
Key: aws.String("Key"),
|
||||
Type: aws.String("TagFilterType"),
|
||||
Value: aws.String("Value"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
TriggerConfigurations: []*codedeploy.TriggerConfig{
|
||||
{ // Required
|
||||
TriggerEvents: []*string{
|
||||
aws.String("TriggerEventType"), // Required
|
||||
// More values...
|
||||
},
|
||||
TriggerName: aws.String("TriggerName"),
|
||||
TriggerTargetArn: aws.String("TriggerTargetArn"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateDeploymentGroup(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 ExampleCodeDeploy_DeleteApplication() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.DeleteApplicationInput{
|
||||
ApplicationName: aws.String("ApplicationName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteApplication(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 ExampleCodeDeploy_DeleteDeploymentConfig() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.DeleteDeploymentConfigInput{
|
||||
DeploymentConfigName: aws.String("DeploymentConfigName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteDeploymentConfig(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 ExampleCodeDeploy_DeleteDeploymentGroup() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.DeleteDeploymentGroupInput{
|
||||
ApplicationName: aws.String("ApplicationName"), // Required
|
||||
DeploymentGroupName: aws.String("DeploymentGroupName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteDeploymentGroup(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 ExampleCodeDeploy_DeregisterOnPremisesInstance() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.DeregisterOnPremisesInstanceInput{
|
||||
InstanceName: aws.String("InstanceName"), // Required
|
||||
}
|
||||
resp, err := svc.DeregisterOnPremisesInstance(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 ExampleCodeDeploy_GetApplication() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.GetApplicationInput{
|
||||
ApplicationName: aws.String("ApplicationName"), // Required
|
||||
}
|
||||
resp, err := svc.GetApplication(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 ExampleCodeDeploy_GetApplicationRevision() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.GetApplicationRevisionInput{
|
||||
ApplicationName: aws.String("ApplicationName"), // Required
|
||||
Revision: &codedeploy.RevisionLocation{ // Required
|
||||
GitHubLocation: &codedeploy.GitHubLocation{
|
||||
CommitId: aws.String("CommitId"),
|
||||
Repository: aws.String("Repository"),
|
||||
},
|
||||
RevisionType: aws.String("RevisionLocationType"),
|
||||
S3Location: &codedeploy.S3Location{
|
||||
Bucket: aws.String("S3Bucket"),
|
||||
BundleType: aws.String("BundleType"),
|
||||
ETag: aws.String("ETag"),
|
||||
Key: aws.String("S3Key"),
|
||||
Version: aws.String("VersionId"),
|
||||
},
|
||||
},
|
||||
}
|
||||
resp, err := svc.GetApplicationRevision(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 ExampleCodeDeploy_GetDeployment() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.GetDeploymentInput{
|
||||
DeploymentId: aws.String("DeploymentId"), // Required
|
||||
}
|
||||
resp, err := svc.GetDeployment(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 ExampleCodeDeploy_GetDeploymentConfig() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.GetDeploymentConfigInput{
|
||||
DeploymentConfigName: aws.String("DeploymentConfigName"), // Required
|
||||
}
|
||||
resp, err := svc.GetDeploymentConfig(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 ExampleCodeDeploy_GetDeploymentGroup() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.GetDeploymentGroupInput{
|
||||
ApplicationName: aws.String("ApplicationName"), // Required
|
||||
DeploymentGroupName: aws.String("DeploymentGroupName"), // Required
|
||||
}
|
||||
resp, err := svc.GetDeploymentGroup(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 ExampleCodeDeploy_GetDeploymentInstance() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.GetDeploymentInstanceInput{
|
||||
DeploymentId: aws.String("DeploymentId"), // Required
|
||||
InstanceId: aws.String("InstanceId"), // Required
|
||||
}
|
||||
resp, err := svc.GetDeploymentInstance(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 ExampleCodeDeploy_GetOnPremisesInstance() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.GetOnPremisesInstanceInput{
|
||||
InstanceName: aws.String("InstanceName"), // Required
|
||||
}
|
||||
resp, err := svc.GetOnPremisesInstance(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 ExampleCodeDeploy_ListApplicationRevisions() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.ListApplicationRevisionsInput{
|
||||
ApplicationName: aws.String("ApplicationName"), // Required
|
||||
Deployed: aws.String("ListStateFilterAction"),
|
||||
NextToken: aws.String("NextToken"),
|
||||
S3Bucket: aws.String("S3Bucket"),
|
||||
S3KeyPrefix: aws.String("S3Key"),
|
||||
SortBy: aws.String("ApplicationRevisionSortBy"),
|
||||
SortOrder: aws.String("SortOrder"),
|
||||
}
|
||||
resp, err := svc.ListApplicationRevisions(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 ExampleCodeDeploy_ListApplications() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.ListApplicationsInput{
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListApplications(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 ExampleCodeDeploy_ListDeploymentConfigs() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.ListDeploymentConfigsInput{
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListDeploymentConfigs(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 ExampleCodeDeploy_ListDeploymentGroups() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.ListDeploymentGroupsInput{
|
||||
ApplicationName: aws.String("ApplicationName"), // Required
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListDeploymentGroups(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 ExampleCodeDeploy_ListDeploymentInstances() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.ListDeploymentInstancesInput{
|
||||
DeploymentId: aws.String("DeploymentId"), // Required
|
||||
InstanceStatusFilter: []*string{
|
||||
aws.String("InstanceStatus"), // Required
|
||||
// More values...
|
||||
},
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListDeploymentInstances(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 ExampleCodeDeploy_ListDeployments() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.ListDeploymentsInput{
|
||||
ApplicationName: aws.String("ApplicationName"),
|
||||
CreateTimeRange: &codedeploy.TimeRange{
|
||||
End: aws.Time(time.Now()),
|
||||
Start: aws.Time(time.Now()),
|
||||
},
|
||||
DeploymentGroupName: aws.String("DeploymentGroupName"),
|
||||
IncludeOnlyStatuses: []*string{
|
||||
aws.String("DeploymentStatus"), // Required
|
||||
// More values...
|
||||
},
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListDeployments(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 ExampleCodeDeploy_ListOnPremisesInstances() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.ListOnPremisesInstancesInput{
|
||||
NextToken: aws.String("NextToken"),
|
||||
RegistrationStatus: aws.String("RegistrationStatus"),
|
||||
TagFilters: []*codedeploy.TagFilter{
|
||||
{ // Required
|
||||
Key: aws.String("Key"),
|
||||
Type: aws.String("TagFilterType"),
|
||||
Value: aws.String("Value"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.ListOnPremisesInstances(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 ExampleCodeDeploy_RegisterApplicationRevision() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.RegisterApplicationRevisionInput{
|
||||
ApplicationName: aws.String("ApplicationName"), // Required
|
||||
Revision: &codedeploy.RevisionLocation{ // Required
|
||||
GitHubLocation: &codedeploy.GitHubLocation{
|
||||
CommitId: aws.String("CommitId"),
|
||||
Repository: aws.String("Repository"),
|
||||
},
|
||||
RevisionType: aws.String("RevisionLocationType"),
|
||||
S3Location: &codedeploy.S3Location{
|
||||
Bucket: aws.String("S3Bucket"),
|
||||
BundleType: aws.String("BundleType"),
|
||||
ETag: aws.String("ETag"),
|
||||
Key: aws.String("S3Key"),
|
||||
Version: aws.String("VersionId"),
|
||||
},
|
||||
},
|
||||
Description: aws.String("Description"),
|
||||
}
|
||||
resp, err := svc.RegisterApplicationRevision(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 ExampleCodeDeploy_RegisterOnPremisesInstance() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.RegisterOnPremisesInstanceInput{
|
||||
IamUserArn: aws.String("IamUserArn"), // Required
|
||||
InstanceName: aws.String("InstanceName"), // Required
|
||||
}
|
||||
resp, err := svc.RegisterOnPremisesInstance(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 ExampleCodeDeploy_RemoveTagsFromOnPremisesInstances() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.RemoveTagsFromOnPremisesInstancesInput{
|
||||
InstanceNames: []*string{ // Required
|
||||
aws.String("InstanceName"), // Required
|
||||
// More values...
|
||||
},
|
||||
Tags: []*codedeploy.Tag{ // Required
|
||||
{ // Required
|
||||
Key: aws.String("Key"),
|
||||
Value: aws.String("Value"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.RemoveTagsFromOnPremisesInstances(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 ExampleCodeDeploy_StopDeployment() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.StopDeploymentInput{
|
||||
DeploymentId: aws.String("DeploymentId"), // Required
|
||||
}
|
||||
resp, err := svc.StopDeployment(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 ExampleCodeDeploy_UpdateApplication() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.UpdateApplicationInput{
|
||||
ApplicationName: aws.String("ApplicationName"),
|
||||
NewApplicationName: aws.String("ApplicationName"),
|
||||
}
|
||||
resp, err := svc.UpdateApplication(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 ExampleCodeDeploy_UpdateDeploymentGroup() {
|
||||
svc := codedeploy.New(session.New())
|
||||
|
||||
params := &codedeploy.UpdateDeploymentGroupInput{
|
||||
ApplicationName: aws.String("ApplicationName"), // Required
|
||||
CurrentDeploymentGroupName: aws.String("DeploymentGroupName"), // Required
|
||||
AutoScalingGroups: []*string{
|
||||
aws.String("AutoScalingGroupName"), // Required
|
||||
// More values...
|
||||
},
|
||||
DeploymentConfigName: aws.String("DeploymentConfigName"),
|
||||
Ec2TagFilters: []*codedeploy.EC2TagFilter{
|
||||
{ // Required
|
||||
Key: aws.String("Key"),
|
||||
Type: aws.String("EC2TagFilterType"),
|
||||
Value: aws.String("Value"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
NewDeploymentGroupName: aws.String("DeploymentGroupName"),
|
||||
OnPremisesInstanceTagFilters: []*codedeploy.TagFilter{
|
||||
{ // Required
|
||||
Key: aws.String("Key"),
|
||||
Type: aws.String("TagFilterType"),
|
||||
Value: aws.String("Value"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ServiceRoleArn: aws.String("Role"),
|
||||
TriggerConfigurations: []*codedeploy.TriggerConfig{
|
||||
{ // Required
|
||||
TriggerEvents: []*string{
|
||||
aws.String("TriggerEventType"), // Required
|
||||
// More values...
|
||||
},
|
||||
TriggerName: aws.String("TriggerName"),
|
||||
TriggerTargetArn: aws.String("TriggerTargetArn"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdateDeploymentGroup(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)
|
||||
}
|
||||
135
vendor/github.com/aws/aws-sdk-go/service/codedeploy/service.go
generated
vendored
135
vendor/github.com/aws/aws-sdk-go/service/codedeploy/service.go
generated
vendored
@@ -1,135 +0,0 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package codedeploy
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/client"
|
||||
"github.com/aws/aws-sdk-go/aws/client/metadata"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
|
||||
)
|
||||
|
||||
// Overview This reference guide provides descriptions of the AWS CodeDeploy
|
||||
// APIs. For more information about AWS CodeDeploy, see the AWS CodeDeploy User
|
||||
// Guide (docs.aws.amazon.com/codedeploy/latest/userguide).
|
||||
//
|
||||
// Using the APIs You can use the AWS CodeDeploy APIs to work with the following:
|
||||
//
|
||||
// Applications are unique identifiers used by AWS CodeDeploy to ensure the
|
||||
// correct combinations of revisions, deployment configurations, and deployment
|
||||
// groups are being referenced during deployments.
|
||||
//
|
||||
// You can use the AWS CodeDeploy APIs to create, delete, get, list, and update
|
||||
// applications.
|
||||
//
|
||||
// Deployment configurations are sets of deployment rules and success and
|
||||
// failure conditions used by AWS CodeDeploy during deployments.
|
||||
//
|
||||
// You can use the AWS CodeDeploy APIs to create, delete, get, and list deployment
|
||||
// configurations.
|
||||
//
|
||||
// Deployment groups are groups of instances to which application revisions
|
||||
// can be deployed.
|
||||
//
|
||||
// You can use the AWS CodeDeploy APIs to create, delete, get, list, and update
|
||||
// deployment groups.
|
||||
//
|
||||
// Instances represent Amazon EC2 instances to which application revisions
|
||||
// are deployed. Instances are identified by their Amazon EC2 tags or Auto Scaling
|
||||
// group names. Instances belong to deployment groups.
|
||||
//
|
||||
// You can use the AWS CodeDeploy APIs to get and list instance.
|
||||
//
|
||||
// Deployments represent the process of deploying revisions to instances.
|
||||
//
|
||||
// You can use the AWS CodeDeploy APIs to create, get, list, and stop deployments.
|
||||
//
|
||||
// Application revisions are archive files stored in Amazon S3 buckets or
|
||||
// GitHub repositories. These revisions contain source content (such as source
|
||||
// code, web pages, executable files, and deployment scripts) along with an
|
||||
// application specification (AppSpec) file. (The AppSpec file is unique to
|
||||
// AWS CodeDeploy; it defines the deployment actions you want AWS CodeDeploy
|
||||
// to execute.) Ffor application revisions stored in Amazon S3 buckets, an application
|
||||
// revision is uniquely identified by its Amazon S3 object key and its ETag,
|
||||
// version, or both. For application revisions stored in GitHub repositories,
|
||||
// an application revision is uniquely identified by its repository name and
|
||||
// commit ID. Application revisions are deployed through deployment groups.
|
||||
//
|
||||
// You can use the AWS CodeDeploy APIs to get, list, and register application
|
||||
// revisions.
|
||||
//The service client's operations are safe to be used concurrently.
|
||||
// It is not safe to mutate any of the client's properties though.
|
||||
type CodeDeploy struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
// Used for custom client initialization logic
|
||||
var initClient func(*client.Client)
|
||||
|
||||
// Used for custom request initialization logic
|
||||
var initRequest func(*request.Request)
|
||||
|
||||
// A ServiceName is the name of the service the client will make API calls to.
|
||||
const ServiceName = "codedeploy"
|
||||
|
||||
// New creates a new instance of the CodeDeploy client with a session.
|
||||
// If additional configuration is needed for the client instance use the optional
|
||||
// aws.Config parameter to add your extra config.
|
||||
//
|
||||
// Example:
|
||||
// // Create a CodeDeploy client from just a session.
|
||||
// svc := codedeploy.New(mySession)
|
||||
//
|
||||
// // Create a CodeDeploy client with additional configuration
|
||||
// svc := codedeploy.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CodeDeploy {
|
||||
c := p.ClientConfig(ServiceName, cfgs...)
|
||||
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *CodeDeploy {
|
||||
svc := &CodeDeploy{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2014-10-06",
|
||||
JSONVersion: "1.1",
|
||||
TargetPrefix: "CodeDeploy_20141006",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a CodeDeploy operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *CodeDeploy) newRequest(op *request.Operation, params, data interface{}) *request.Request {
|
||||
req := c.NewRequest(op, params, data)
|
||||
|
||||
// Run custom request initialization if present
|
||||
if initRequest != nil {
|
||||
initRequest(req)
|
||||
}
|
||||
|
||||
return req
|
||||
}
|
||||
Reference in New Issue
Block a user