Skip to content

Commit

Permalink
service/codepipeline: support encryption keys in AWS CodePipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
lsegal committed Aug 25, 2015
1 parent 22ed727 commit 530494f
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 13 deletions.
38 changes: 31 additions & 7 deletions apis/codepipeline/2015-07-09/api-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
"endpointPrefix":"codepipeline",
"jsonVersion":"1.1",
"serviceAbbreviation":"CodePipeline",
"serviceFullName":"CodePipeline Service",
"serviceFullName":"AWS CodePipeline",
"signatureVersion":"v4",
"signingName":"codepipeline",
"targetPrefix":"CodePipeline_20150709",
"timestampFormat":"unixTimestamp",
"protocol":"json"
},
"operations":{
Expand Down Expand Up @@ -847,7 +845,8 @@
],
"members":{
"type":{"shape":"ArtifactStoreType"},
"location":{"shape":"ArtifactStoreLocation"}
"location":{"shape":"ArtifactStoreLocation"},
"encryptionKey":{"shape":"EncryptionKey"}
}
},
"ArtifactStoreLocation":{
Expand Down Expand Up @@ -998,6 +997,26 @@
}
},
"Enabled":{"type":"boolean"},
"EncryptionKey":{
"type":"structure",
"required":[
"id",
"type"
],
"members":{
"id":{"shape":"EncryptionKeyId"},
"type":{"shape":"EncryptionKeyType"}
}
},
"EncryptionKeyId":{
"type":"string",
"min":1,
"max":100
},
"EncryptionKeyType":{
"type":"string",
"enum":["KMS"]
},
"ErrorDetails":{
"type":"structure",
"members":{
Expand All @@ -1017,7 +1036,10 @@
"ExecutionSummary":{"type":"string"},
"FailureDetails":{
"type":"structure",
"required":["type"],
"required":[
"type",
"message"
],
"members":{
"type":{"shape":"FailureType"},
"message":{"shape":"Message"},
Expand Down Expand Up @@ -1179,7 +1201,8 @@
"inputArtifacts":{"shape":"ArtifactList"},
"outputArtifacts":{"shape":"ArtifactList"},
"artifactCredentials":{"shape":"AWSSessionCredentials"},
"continuationToken":{"shape":"ContinuationToken"}
"continuationToken":{"shape":"ContinuationToken"},
"encryptionKey":{"shape":"EncryptionKey"}
}
},
"JobDetails":{
Expand Down Expand Up @@ -1573,7 +1596,8 @@
"inputArtifacts":{"shape":"ArtifactList"},
"outputArtifacts":{"shape":"ArtifactList"},
"artifactCredentials":{"shape":"AWSSessionCredentials"},
"continuationToken":{"shape":"ContinuationToken"}
"continuationToken":{"shape":"ContinuationToken"},
"encryptionKey":{"shape":"EncryptionKey"}
}
},
"ThirdPartyJobDetails":{
Expand Down
20 changes: 20 additions & 0 deletions apis/codepipeline/2015-07-09/docs-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,26 @@
"TransitionState$enabled": "<p>Whether the transition between stages is enabled (true) or disabled (false).</p>"
}
},
"EncryptionKey": {
"base": "<p>Represents information about the AWS Key Management Service (AWS KMS) key used to encrypt data in the artifact store.</p>",
"refs": {
"ArtifactStore$encryptionKey": "<p>The AWS Key Management Service (AWS KMS) key used to encrypt the data in the artifact store. If this is undefined, the default key for Amazon S3 is used.</p>",
"JobData$encryptionKey": null,
"ThirdPartyJobData$encryptionKey": "<p>The AWS Key Management Service (AWS KMS) key used to encrypt and decrypt data in the artifact store for the pipeline.</p>"
}
},
"EncryptionKeyId": {
"base": null,
"refs": {
"EncryptionKey$id": "<p>The ID of the AWS KMS key.</p>"
}
},
"EncryptionKeyType": {
"base": null,
"refs": {
"EncryptionKey$type": "<p>The type of AWS KMS key, such as a customer master key.</p>"
}
},
"ErrorDetails": {
"base": "<p>Represents information about an error in AWS CodePipeline.</p>",
"refs": {
Expand Down
48 changes: 46 additions & 2 deletions service/codepipeline/api.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.

// Package codepipeline provides a client for CodePipeline Service.
// Package codepipeline provides a client for AWS CodePipeline.
package codepipeline

import (
Expand Down Expand Up @@ -1251,6 +1251,11 @@ func (s ArtifactLocation) GoString() string {
// Amazon S3 bucket is created manually, it must meet the requirements for AWS
// CodePipeline. For more information, see the Concepts.
type ArtifactStore struct {
// The AWS Key Management Service (AWS KMS) key used to encrypt the data in
// the artifact store. If this is undefined, the default key for Amazon S3 is
// used.
EncryptionKey *EncryptionKey `locationName:"encryptionKey" type:"structure"`

// The location for storing the artifacts for a pipeline, such as an S3 bucket
// or folder.
Location *string `locationName:"location" type:"string" required:"true"`
Expand Down Expand Up @@ -1628,6 +1633,32 @@ func (s EnableStageTransitionOutput) GoString() string {
return s.String()
}

// Represents information about the AWS Key Management Service (AWS KMS) key
// used to encrypt data in the artifact store.
type EncryptionKey struct {
// The ID of the AWS KMS key.
Id *string `locationName:"id" type:"string" required:"true"`

// The type of AWS KMS key, such as a customer master key.
Type *string `locationName:"type" type:"string" required:"true" enum:"EncryptionKeyType"`

metadataEncryptionKey `json:"-" xml:"-"`
}

type metadataEncryptionKey struct {
SDKShapeTraits bool `type:"structure"`
}

// String returns the string representation
func (s EncryptionKey) String() string {
return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s EncryptionKey) GoString() string {
return s.String()
}

// Represents information about an error in AWS CodePipeline.
type ErrorDetails struct {
// The system ID or error number code of the error.
Expand Down Expand Up @@ -1690,7 +1721,7 @@ type FailureDetails struct {
ExternalExecutionId *string `locationName:"externalExecutionId" type:"string"`

// The message about the failure.
Message *string `locationName:"message" type:"string"`
Message *string `locationName:"message" type:"string" required:"true"`

// The type of the failure.
Type *string `locationName:"type" type:"string" required:"true" enum:"FailureType"`
Expand Down Expand Up @@ -1996,6 +2027,10 @@ type JobData struct {
// job requires in order to continue the job asynchronously.
ContinuationToken *string `locationName:"continuationToken" type:"string"`

// Represents information about the AWS Key Management Service (AWS KMS) key
// used to encrypt data in the artifact store.
EncryptionKey *EncryptionKey `locationName:"encryptionKey" type:"structure"`

// The artifact supplied to the job.
InputArtifacts []*Artifact `locationName:"inputArtifacts" type:"list"`

Expand Down Expand Up @@ -2833,6 +2868,10 @@ type ThirdPartyJobData struct {
// job requires in order to continue the job asynchronously.
ContinuationToken *string `locationName:"continuationToken" type:"string"`

// The AWS Key Management Service (AWS KMS) key used to encrypt and decrypt
// data in the artifact store for the pipeline.
EncryptionKey *EncryptionKey `locationName:"encryptionKey" type:"structure"`

// The name of the artifact that will be worked upon by the action, if any.
// This name might be system-generated, such as "MyApp", or might be defined
// by the user when the action is created. The input artifact name must match
Expand Down Expand Up @@ -3027,6 +3066,11 @@ const (
BlockerTypeSchedule = "Schedule"
)

const (
// @enum EncryptionKeyType
EncryptionKeyTypeKms = "KMS"
)

const (
// @enum FailureType
FailureTypeJobFailed = "JobFailed"
Expand Down
2 changes: 1 addition & 1 deletion service/codepipeline/codepipelineiface/interface.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.

// Package codepipelineiface provides an interface for the CodePipeline Service.
// Package codepipelineiface provides an interface for the AWS CodePipeline.
package codepipelineiface

import (
Expand Down
12 changes: 10 additions & 2 deletions service/codepipeline/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ func ExampleCodePipeline_CreatePipeline() {
ArtifactStore: &codepipeline.ArtifactStore{ // Required
Location: aws.String("ArtifactStoreLocation"), // Required
Type: aws.String("ArtifactStoreType"), // Required
EncryptionKey: &codepipeline.EncryptionKey{
Id: aws.String("EncryptionKeyId"), // Required
Type: aws.String("EncryptionKeyType"), // Required
},
},
Name: aws.String("PipelineName"), // Required
RoleArn: aws.String("RoleArn"), // Required
Expand Down Expand Up @@ -457,9 +461,9 @@ func ExampleCodePipeline_PutJobFailureResult() {

params := &codepipeline.PutJobFailureResultInput{
FailureDetails: &codepipeline.FailureDetails{ // Required
Message: aws.String("Message"), // Required
Type: aws.String("FailureType"), // Required
ExternalExecutionId: aws.String("ExecutionId"),
Message: aws.String("Message"),
},
JobId: aws.String("JobId"), // Required
}
Expand Down Expand Up @@ -511,9 +515,9 @@ func ExampleCodePipeline_PutThirdPartyJobFailureResult() {
params := &codepipeline.PutThirdPartyJobFailureResultInput{
ClientToken: aws.String("ClientToken"), // Required
FailureDetails: &codepipeline.FailureDetails{ // Required
Message: aws.String("Message"), // Required
Type: aws.String("FailureType"), // Required
ExternalExecutionId: aws.String("ExecutionId"),
Message: aws.String("Message"),
},
JobId: aws.String("ThirdPartyJobId"), // Required
}
Expand Down Expand Up @@ -587,6 +591,10 @@ func ExampleCodePipeline_UpdatePipeline() {
ArtifactStore: &codepipeline.ArtifactStore{ // Required
Location: aws.String("ArtifactStoreLocation"), // Required
Type: aws.String("ArtifactStoreType"), // Required
EncryptionKey: &codepipeline.EncryptionKey{
Id: aws.String("EncryptionKeyId"), // Required
Type: aws.String("EncryptionKeyType"), // Required
},
},
Name: aws.String("PipelineName"), // Required
RoleArn: aws.String("RoleArn"), // Required
Expand Down
1 change: 0 additions & 1 deletion service/codepipeline/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ func New(config *aws.Config) *CodePipeline {
ServiceInfo: serviceinfo.ServiceInfo{
Config: defaults.DefaultConfig.Merge(config),
ServiceName: "codepipeline",
SigningName: "codepipeline",
APIVersion: "2015-07-09",
JSONVersion: "1.1",
TargetPrefix: "CodePipeline_20150709",
Expand Down

0 comments on commit 530494f

Please sign in to comment.