From 62aa2c583a402b113e032648a6ebd4aeea7e71e8 Mon Sep 17 00:00:00 2001 From: Erik Jansson Date: Wed, 22 Feb 2017 18:31:24 +0100 Subject: [PATCH] provider/aws: New resource codepipeline (#11814) * provider/aws: New resource codepipeline * Vendor aws/codepipeline * Add tests * Add docs * Bump codepipeline to v1.6.25 * Adjustments based on feedback * Force new resource on ID change * Improve tests * Switch update to read Since we don't require a second pass, only do a read. * Skip tests if GITHUB_TOKEN is not set --- builtin/providers/aws/config.go | 3 + .../aws/import_aws_codepipeline_test.go | 34 + builtin/providers/aws/provider.go | 1 + .../aws/resource_aws_codepipeline.go | 493 ++ .../aws/resource_aws_codepipeline_test.go | 316 + .../aws-sdk-go/service/codepipeline/api.go | 7130 +++++++++++++++++ .../aws-sdk-go/service/codepipeline/errors.go | 152 + .../service/codepipeline/service.go | 201 + vendor/vendor.json | 10 +- .../providers/aws/r/codepipeline.markdown | 147 + website/source/layouts/aws.erb | 11 + 11 files changed, 8497 insertions(+), 1 deletion(-) create mode 100644 builtin/providers/aws/import_aws_codepipeline_test.go create mode 100644 builtin/providers/aws/resource_aws_codepipeline.go create mode 100644 builtin/providers/aws/resource_aws_codepipeline_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go create mode 100644 website/source/docs/providers/aws/r/codepipeline.markdown diff --git a/builtin/providers/aws/config.go b/builtin/providers/aws/config.go index 1786285fc..e3608f53c 100644 --- a/builtin/providers/aws/config.go +++ b/builtin/providers/aws/config.go @@ -27,6 +27,7 @@ import ( "github.com/aws/aws-sdk-go/service/codebuild" "github.com/aws/aws-sdk-go/service/codecommit" "github.com/aws/aws-sdk-go/service/codedeploy" + "github.com/aws/aws-sdk-go/service/codepipeline" "github.com/aws/aws-sdk-go/service/configservice" "github.com/aws/aws-sdk-go/service/databasemigrationservice" "github.com/aws/aws-sdk-go/service/directoryservice" @@ -152,6 +153,7 @@ type AWSClient struct { codebuildconn *codebuild.CodeBuild codedeployconn *codedeploy.CodeDeploy codecommitconn *codecommit.CodeCommit + codepipelineconn *codepipeline.CodePipeline sfnconn *sfn.SFN ssmconn *ssm.SSM wafconn *waf.WAF @@ -285,6 +287,7 @@ func (c *Config) Client() (interface{}, error) { client.codedeployconn = codedeploy.New(sess) client.configconn = configservice.New(sess) client.dmsconn = databasemigrationservice.New(sess) + client.codepipelineconn = codepipeline.New(sess) client.dsconn = directoryservice.New(sess) client.dynamodbconn = dynamodb.New(dynamoSess) client.ec2conn = ec2.New(awsEc2Sess) diff --git a/builtin/providers/aws/import_aws_codepipeline_test.go b/builtin/providers/aws/import_aws_codepipeline_test.go new file mode 100644 index 000000000..5025fcddc --- /dev/null +++ b/builtin/providers/aws/import_aws_codepipeline_test.go @@ -0,0 +1,34 @@ +package aws + +import ( + "os" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSCodePipeline_Import_basic(t *testing.T) { + if os.Getenv("GITHUB_TOKEN") == "" { + t.Skip("Environment variable GITHUB_TOKEN is not set") + } + + name := acctest.RandString(10) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodePipelineDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSCodePipelineConfig_basic(name), + }, + + resource.TestStep{ + ResourceName: "aws_codepipeline.bar", + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} diff --git a/builtin/providers/aws/provider.go b/builtin/providers/aws/provider.go index 16e87ab39..c9a77f6cc 100644 --- a/builtin/providers/aws/provider.go +++ b/builtin/providers/aws/provider.go @@ -251,6 +251,7 @@ func Provider() terraform.ResourceProvider { "aws_codecommit_repository": resourceAwsCodeCommitRepository(), "aws_codecommit_trigger": resourceAwsCodeCommitTrigger(), "aws_codebuild_project": resourceAwsCodeBuildProject(), + "aws_codepipeline": resourceAwsCodePipeline(), "aws_customer_gateway": resourceAwsCustomerGateway(), "aws_db_event_subscription": resourceAwsDbEventSubscription(), "aws_db_instance": resourceAwsDbInstance(), diff --git a/builtin/providers/aws/resource_aws_codepipeline.go b/builtin/providers/aws/resource_aws_codepipeline.go new file mode 100644 index 000000000..22a77cd87 --- /dev/null +++ b/builtin/providers/aws/resource_aws_codepipeline.go @@ -0,0 +1,493 @@ +package aws + +import ( + "fmt" + "os" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/codepipeline" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsCodePipeline() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsCodePipelineCreate, + Read: resourceAwsCodePipelineRead, + Update: resourceAwsCodePipelineUpdate, + Delete: resourceAwsCodePipelineDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "role_arn": { + Type: schema.TypeString, + Required: true, + }, + + "artifact_store": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "location": { + Type: schema.TypeString, + Required: true, + }, + + "type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateAwsCodePipelineArtifactStoreType, + }, + + "encryption_key": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Required: true, + }, + + "type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateAwsCodePipelineEncryptionKeyType, + }, + }, + }, + }, + }, + }, + }, + "stage": { + Type: schema.TypeList, + MinItems: 2, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "action": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "configuration": { + Type: schema.TypeMap, + Optional: true, + }, + "category": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateAwsCodePipelineStageActionCategory, + }, + "owner": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateAwsCodePipelineStageActionOwner, + }, + "provider": { + Type: schema.TypeString, + Required: true, + }, + "version": { + Type: schema.TypeString, + Required: true, + }, + "input_artifacts": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "output_artifacts": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "name": { + Type: schema.TypeString, + Required: true, + }, + "role_arn": { + Type: schema.TypeString, + Optional: true, + }, + "run_order": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + }, + } +} +func validateAwsCodePipelineEncryptionKeyType(v interface{}, k string) (ws []string, errors []error) { + if v.(string) != "KMS" { + errors = append(errors, fmt.Errorf("CodePipeline: encryption_key type can only be KMS")) + } + return +} + +func validateAwsCodePipelineArtifactStoreType(v interface{}, k string) (ws []string, errors []error) { + if v.(string) != "S3" { + errors = append(errors, fmt.Errorf("CodePipeline: artifact_store type can only be S3")) + } + return +} + +func validateAwsCodePipelineStageActionCategory(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + types := map[string]bool{ + "Source": true, + "Build": true, + "Deploy": true, + "Test": true, + "Invoke": true, + "Approval": true, + } + + if !types[value] { + errors = append(errors, fmt.Errorf("CodePipeline: category can only be one of Source | Build | Deploy | Test | Invoke | Approval")) + } + return +} + +func validateAwsCodePipelineStageActionOwner(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + types := map[string]bool{ + "AWS": true, + "ThirdParty": true, + "Custom": true, + } + + if !types[value] { + errors = append(errors, fmt.Errorf("CodePipeline: owner can only be one of AWS | ThirdParty | Custom")) + } + return +} + +func validateAwsCodePipelineStageActionConfiguration(v interface{}, k string) (ws []string, errors []error) { + for k := range v.(map[string]interface{}) { + if k == "OAuthToken" { + errors = append(errors, fmt.Errorf("CodePipeline: OAuthToken should be set as environment variable 'GITHUB_TOKEN'")) + } + } + return +} + +func resourceAwsCodePipelineCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codepipelineconn + params := &codepipeline.CreatePipelineInput{ + Pipeline: expandAwsCodePipeline(d), + } + + var resp *codepipeline.CreatePipelineOutput + err := resource.Retry(2*time.Minute, func() *resource.RetryError { + var err error + + resp, err = conn.CreatePipeline(params) + + if err != nil { + return resource.RetryableError(err) + } + + return resource.NonRetryableError(err) + }) + if err != nil { + return fmt.Errorf("[ERROR] Error creating CodePipeline: %s", err) + } + if resp.Pipeline == nil { + return fmt.Errorf("[ERROR] Error creating CodePipeline: invalid response from AWS") + } + + d.SetId(*resp.Pipeline.Name) + return resourceAwsCodePipelineRead(d, meta) +} + +func expandAwsCodePipeline(d *schema.ResourceData) *codepipeline.PipelineDeclaration { + pipelineArtifactStore := expandAwsCodePipelineArtifactStore(d) + pipelineStages := expandAwsCodePipelineStages(d) + + pipeline := codepipeline.PipelineDeclaration{ + Name: aws.String(d.Get("name").(string)), + RoleArn: aws.String(d.Get("role_arn").(string)), + ArtifactStore: pipelineArtifactStore, + Stages: pipelineStages, + } + return &pipeline +} +func expandAwsCodePipelineArtifactStore(d *schema.ResourceData) *codepipeline.ArtifactStore { + configs := d.Get("artifact_store").([]interface{}) + data := configs[0].(map[string]interface{}) + pipelineArtifactStore := codepipeline.ArtifactStore{ + Location: aws.String(data["location"].(string)), + Type: aws.String(data["type"].(string)), + } + tek := data["encryption_key"].([]interface{}) + if len(tek) > 0 { + vk := tek[0].(map[string]interface{}) + ek := codepipeline.EncryptionKey{ + Type: aws.String(vk["type"].(string)), + Id: aws.String(vk["id"].(string)), + } + pipelineArtifactStore.EncryptionKey = &ek + } + return &pipelineArtifactStore +} + +func flattenAwsCodePipelineArtifactStore(artifactStore *codepipeline.ArtifactStore) []interface{} { + values := map[string]interface{}{} + values["type"] = *artifactStore.Type + values["location"] = *artifactStore.Location + if artifactStore.EncryptionKey != nil { + as := map[string]interface{}{ + "id": *artifactStore.EncryptionKey.Id, + "type": *artifactStore.EncryptionKey.Type, + } + values["encryption_key"] = []interface{}{as} + } + return []interface{}{values} +} + +func expandAwsCodePipelineStages(d *schema.ResourceData) []*codepipeline.StageDeclaration { + configs := d.Get("stage").([]interface{}) + pipelineStages := []*codepipeline.StageDeclaration{} + + for _, stage := range configs { + data := stage.(map[string]interface{}) + a := data["action"].([]interface{}) + actions := expandAwsCodePipelineActions(a) + pipelineStages = append(pipelineStages, &codepipeline.StageDeclaration{ + Name: aws.String(data["name"].(string)), + Actions: actions, + }) + } + return pipelineStages +} + +func flattenAwsCodePipelineStages(stages []*codepipeline.StageDeclaration) []interface{} { + stagesList := []interface{}{} + for _, stage := range stages { + values := map[string]interface{}{} + values["name"] = *stage.Name + values["action"] = flattenAwsCodePipelineStageActions(stage.Actions) + stagesList = append(stagesList, values) + } + return stagesList + +} + +func expandAwsCodePipelineActions(s []interface{}) []*codepipeline.ActionDeclaration { + actions := []*codepipeline.ActionDeclaration{} + for _, config := range s { + data := config.(map[string]interface{}) + + conf := expandAwsCodePipelineStageActionConfiguration(data["configuration"].(map[string]interface{})) + if data["provider"].(string) == "GitHub" { + githubToken := os.Getenv("GITHUB_TOKEN") + if githubToken != "" { + conf["OAuthToken"] = aws.String(githubToken) + } + + } + + action := codepipeline.ActionDeclaration{ + ActionTypeId: &codepipeline.ActionTypeId{ + Category: aws.String(data["category"].(string)), + Owner: aws.String(data["owner"].(string)), + + Provider: aws.String(data["provider"].(string)), + Version: aws.String(data["version"].(string)), + }, + Name: aws.String(data["name"].(string)), + Configuration: conf, + } + + oa := data["output_artifacts"].([]interface{}) + if len(oa) > 0 { + outputArtifacts := expandAwsCodePipelineActionsOutputArtifacts(oa) + action.OutputArtifacts = outputArtifacts + + } + ia := data["input_artifacts"].([]interface{}) + if len(ia) > 0 { + inputArtifacts := expandAwsCodePipelineActionsInputArtifacts(ia) + action.InputArtifacts = inputArtifacts + + } + ro := data["run_order"].(int) + if ro > 0 { + action.RunOrder = aws.Int64(int64(ro)) + } + actions = append(actions, &action) + } + return actions +} + +func flattenAwsCodePipelineStageActions(actions []*codepipeline.ActionDeclaration) []interface{} { + actionsList := []interface{}{} + for _, action := range actions { + values := map[string]interface{}{ + "category": *action.ActionTypeId.Category, + "owner": *action.ActionTypeId.Owner, + "provider": *action.ActionTypeId.Provider, + "version": *action.ActionTypeId.Version, + "name": *action.Name, + } + if action.Configuration != nil { + config := flattenAwsCodePipelineStageActionConfiguration(action.Configuration) + _, ok := config["OAuthToken"] + actionProvider := *action.ActionTypeId.Provider + if ok && actionProvider == "GitHub" { + delete(config, "OAuthToken") + } + values["configuration"] = config + } + + if len(action.OutputArtifacts) > 0 { + values["output_artifacts"] = flattenAwsCodePipelineActionsOutputArtifacts(action.OutputArtifacts) + } + + if len(action.InputArtifacts) > 0 { + values["input_artifacts"] = flattenAwsCodePipelineActionsInputArtifacts(action.InputArtifacts) + } + + if action.RunOrder != nil { + values["run_order"] = int(*action.RunOrder) + } + + actionsList = append(actionsList, values) + } + return actionsList +} + +func expandAwsCodePipelineStageActionConfiguration(config map[string]interface{}) map[string]*string { + m := map[string]*string{} + for k, v := range config { + s := v.(string) + m[k] = &s + } + return m +} + +func flattenAwsCodePipelineStageActionConfiguration(config map[string]*string) map[string]string { + m := map[string]string{} + for k, v := range config { + m[k] = *v + } + return m +} + +func expandAwsCodePipelineActionsOutputArtifacts(s []interface{}) []*codepipeline.OutputArtifact { + outputArtifacts := []*codepipeline.OutputArtifact{} + for _, artifact := range s { + outputArtifacts = append(outputArtifacts, &codepipeline.OutputArtifact{ + Name: aws.String(artifact.(string)), + }) + } + return outputArtifacts +} + +func flattenAwsCodePipelineActionsOutputArtifacts(artifacts []*codepipeline.OutputArtifact) []string { + values := []string{} + for _, artifact := range artifacts { + values = append(values, *artifact.Name) + } + return values +} + +func expandAwsCodePipelineActionsInputArtifacts(s []interface{}) []*codepipeline.InputArtifact { + outputArtifacts := []*codepipeline.InputArtifact{} + for _, artifact := range s { + outputArtifacts = append(outputArtifacts, &codepipeline.InputArtifact{ + Name: aws.String(artifact.(string)), + }) + } + return outputArtifacts +} + +func flattenAwsCodePipelineActionsInputArtifacts(artifacts []*codepipeline.InputArtifact) []string { + values := []string{} + for _, artifact := range artifacts { + values = append(values, *artifact.Name) + } + return values +} + +func resourceAwsCodePipelineRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codepipelineconn + resp, err := conn.GetPipeline(&codepipeline.GetPipelineInput{ + Name: aws.String(d.Id()), + }) + + if err != nil { + return fmt.Errorf("[ERROR] Error retreiving Pipeline: %q", err) + } + pipeline := resp.Pipeline + + if err := d.Set("artifact_store", flattenAwsCodePipelineArtifactStore(pipeline.ArtifactStore)); err != nil { + return err + } + + if err := d.Set("stage", flattenAwsCodePipelineStages(pipeline.Stages)); err != nil { + return err + } + + d.Set("name", pipeline.Name) + d.Set("role_arn", pipeline.RoleArn) + return nil +} + +func resourceAwsCodePipelineUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codepipelineconn + + pipeline := expandAwsCodePipeline(d) + params := &codepipeline.UpdatePipelineInput{ + Pipeline: pipeline, + } + _, err := conn.UpdatePipeline(params) + + if err != nil { + return fmt.Errorf( + "[ERROR] Error updating CodePipeline (%s): %s", + d.Id(), err) + } + + return resourceAwsCodePipelineRead(d, meta) +} + +func resourceAwsCodePipelineDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codepipelineconn + + _, err := conn.DeletePipeline(&codepipeline.DeletePipelineInput{ + Name: aws.String(d.Id()), + }) + + if err != nil { + return err + } + + d.SetId("") + + return nil +} diff --git a/builtin/providers/aws/resource_aws_codepipeline_test.go b/builtin/providers/aws/resource_aws_codepipeline_test.go new file mode 100644 index 000000000..e9b068435 --- /dev/null +++ b/builtin/providers/aws/resource_aws_codepipeline_test.go @@ -0,0 +1,316 @@ +package aws + +import ( + "fmt" + "os" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/codepipeline" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSCodePipeline_basic(t *testing.T) { + if os.Getenv("GITHUB_TOKEN") == "" { + t.Skip("Environment variable GITHUB_TOKEN is not set") + } + + name := acctest.RandString(10) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodePipelineDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodePipelineConfig_basic(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodePipelineExists("aws_codepipeline.bar"), + resource.TestCheckResourceAttr("aws_codepipeline.bar", "artifact_store.0.type", "S3"), + resource.TestCheckResourceAttr("aws_codepipeline.bar", "artifact_store.0.encryption_key.0.id", "1234"), + resource.TestCheckResourceAttr("aws_codepipeline.bar", "artifact_store.0.encryption_key.0.type", "KMS"), + ), + }, + { + Config: testAccAWSCodePipelineConfig_basicUpdated(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodePipelineExists("aws_codepipeline.bar"), + resource.TestCheckResourceAttr("aws_codepipeline.bar", "artifact_store.0.type", "S3"), + resource.TestCheckResourceAttr("aws_codepipeline.bar", "artifact_store.0.encryption_key.0.id", "4567"), + resource.TestCheckResourceAttr("aws_codepipeline.bar", "artifact_store.0.encryption_key.0.type", "KMS"), + ), + }, + }, + }) +} + +func testAccCheckAWSCodePipelineExists(n string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No CodePipeline ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).codepipelineconn + + _, err := conn.GetPipeline(&codepipeline.GetPipelineInput{ + Name: aws.String(rs.Primary.ID), + }) + + if err != nil { + return err + } + return nil + } +} + +func testAccCheckAWSCodePipelineDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).codepipelineconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_codepipeline" { + continue + } + + _, err := conn.GetPipeline(&codepipeline.GetPipelineInput{ + Name: aws.String(rs.Primary.ID), + }) + + if err == nil { + return fmt.Errorf("Expected AWS CodePipeline to be gone, but was still found") + } + return nil + } + + return fmt.Errorf("Default error in CodePipeline Test") +} + +func testAccAWSCodePipelineConfig_basic(rName string) string { + return fmt.Sprintf(` +resource "aws_s3_bucket" "foo" { + bucket = "tf-test-pipeline-%s" + acl = "private" +} + +resource "aws_iam_role" "codepipeline_role" { + name = "codepipeline-role-%s" + + assume_role_policy = < 0 { + return invalidParams + } + return nil +} + +// SetJobId sets the JobId field's value. +func (s *AcknowledgeJobInput) SetJobId(v string) *AcknowledgeJobInput { + s.JobId = &v + return s +} + +// SetNonce sets the Nonce field's value. +func (s *AcknowledgeJobInput) SetNonce(v string) *AcknowledgeJobInput { + s.Nonce = &v + return s +} + +// Represents the output of an acknowledge job action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/AcknowledgeJobOutput +type AcknowledgeJobOutput struct { + _ struct{} `type:"structure"` + + // Whether the job worker has received the specified job. + Status *string `locationName:"status" type:"string" enum:"JobStatus"` +} + +// String returns the string representation +func (s AcknowledgeJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcknowledgeJobOutput) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *AcknowledgeJobOutput) SetStatus(v string) *AcknowledgeJobOutput { + s.Status = &v + return s +} + +// Represents the input of an acknowledge third party job action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/AcknowledgeThirdPartyJobInput +type AcknowledgeThirdPartyJobInput struct { + _ struct{} `type:"structure"` + + // The clientToken portion of the clientId and clientToken pair used to verify + // that the calling entity is allowed access to the job and its details. + // + // ClientToken is a required field + ClientToken *string `locationName:"clientToken" type:"string" required:"true"` + + // The unique system-generated ID of the job. + // + // JobId is a required field + JobId *string `locationName:"jobId" min:"1" type:"string" required:"true"` + + // A system-generated random number that AWS CodePipeline uses to ensure that + // the job is being worked on by only one job worker. Get this number from the + // response to a GetThirdPartyJobDetails request. + // + // Nonce is a required field + Nonce *string `locationName:"nonce" type:"string" required:"true"` +} + +// String returns the string representation +func (s AcknowledgeThirdPartyJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcknowledgeThirdPartyJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AcknowledgeThirdPartyJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AcknowledgeThirdPartyJobInput"} + if s.ClientToken == nil { + invalidParams.Add(request.NewErrParamRequired("ClientToken")) + } + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) + } + if s.Nonce == nil { + invalidParams.Add(request.NewErrParamRequired("Nonce")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *AcknowledgeThirdPartyJobInput) SetClientToken(v string) *AcknowledgeThirdPartyJobInput { + s.ClientToken = &v + return s +} + +// SetJobId sets the JobId field's value. +func (s *AcknowledgeThirdPartyJobInput) SetJobId(v string) *AcknowledgeThirdPartyJobInput { + s.JobId = &v + return s +} + +// SetNonce sets the Nonce field's value. +func (s *AcknowledgeThirdPartyJobInput) SetNonce(v string) *AcknowledgeThirdPartyJobInput { + s.Nonce = &v + return s +} + +// Represents the output of an acknowledge third party job action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/AcknowledgeThirdPartyJobOutput +type AcknowledgeThirdPartyJobOutput struct { + _ struct{} `type:"structure"` + + // The status information for the third party job, if any. + Status *string `locationName:"status" type:"string" enum:"JobStatus"` +} + +// String returns the string representation +func (s AcknowledgeThirdPartyJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcknowledgeThirdPartyJobOutput) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *AcknowledgeThirdPartyJobOutput) SetStatus(v string) *AcknowledgeThirdPartyJobOutput { + s.Status = &v + return s +} + +// Represents information about an action configuration. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ActionConfiguration +type ActionConfiguration struct { + _ struct{} `type:"structure"` + + // The configuration data for the action. + Configuration map[string]*string `locationName:"configuration" type:"map"` +} + +// String returns the string representation +func (s ActionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActionConfiguration) GoString() string { + return s.String() +} + +// SetConfiguration sets the Configuration field's value. +func (s *ActionConfiguration) SetConfiguration(v map[string]*string) *ActionConfiguration { + s.Configuration = v + return s +} + +// Represents information about an action configuration property. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ActionConfigurationProperty +type ActionConfigurationProperty struct { + _ struct{} `type:"structure"` + + // The description of the action configuration property that will be displayed + // to users. + Description *string `locationName:"description" min:"1" type:"string"` + + // Whether the configuration property is a key. + // + // Key is a required field + Key *bool `locationName:"key" type:"boolean" required:"true"` + + // The name of the action configuration property. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // Indicates that the proprety will be used in conjunction with PollForJobs. + // When creating a custom action, an action can have up to one queryable property. + // If it has one, that property must be both required and not secret. + // + // If you create a pipeline with a custom action type, and that custom action + // contains a queryable property, the value for that configuration property + // is subject to additional restrictions. The value must be less than or equal + // to twenty (20) characters. The value can contain only alphanumeric characters, + // underscores, and hyphens. + Queryable *bool `locationName:"queryable" type:"boolean"` + + // Whether the configuration property is a required value. + // + // Required is a required field + Required *bool `locationName:"required" type:"boolean" required:"true"` + + // Whether the configuration property is secret. Secrets are hidden from all + // calls except for GetJobDetails, GetThirdPartyJobDetails, PollForJobs, and + // PollForThirdPartyJobs. + // + // When updating a pipeline, passing * * * * * without changing any other values + // of the action will preserve the prior value of the secret. + // + // Secret is a required field + Secret *bool `locationName:"secret" type:"boolean" required:"true"` + + // The type of the configuration property. + Type *string `locationName:"type" type:"string" enum:"ActionConfigurationPropertyType"` +} + +// String returns the string representation +func (s ActionConfigurationProperty) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActionConfigurationProperty) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ActionConfigurationProperty) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ActionConfigurationProperty"} + if s.Description != nil && len(*s.Description) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Description", 1)) + } + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.Required == nil { + invalidParams.Add(request.NewErrParamRequired("Required")) + } + if s.Secret == nil { + invalidParams.Add(request.NewErrParamRequired("Secret")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *ActionConfigurationProperty) SetDescription(v string) *ActionConfigurationProperty { + s.Description = &v + return s +} + +// SetKey sets the Key field's value. +func (s *ActionConfigurationProperty) SetKey(v bool) *ActionConfigurationProperty { + s.Key = &v + return s +} + +// SetName sets the Name field's value. +func (s *ActionConfigurationProperty) SetName(v string) *ActionConfigurationProperty { + s.Name = &v + return s +} + +// SetQueryable sets the Queryable field's value. +func (s *ActionConfigurationProperty) SetQueryable(v bool) *ActionConfigurationProperty { + s.Queryable = &v + return s +} + +// SetRequired sets the Required field's value. +func (s *ActionConfigurationProperty) SetRequired(v bool) *ActionConfigurationProperty { + s.Required = &v + return s +} + +// SetSecret sets the Secret field's value. +func (s *ActionConfigurationProperty) SetSecret(v bool) *ActionConfigurationProperty { + s.Secret = &v + return s +} + +// SetType sets the Type field's value. +func (s *ActionConfigurationProperty) SetType(v string) *ActionConfigurationProperty { + s.Type = &v + return s +} + +// Represents the context of an action within the stage of a pipeline to a job +// worker. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ActionContext +type ActionContext struct { + _ struct{} `type:"structure"` + + // The name of the action within the context of a job. + Name *string `locationName:"name" min:"1" type:"string"` +} + +// String returns the string representation +func (s ActionContext) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActionContext) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *ActionContext) SetName(v string) *ActionContext { + s.Name = &v + return s +} + +// Represents information about an action declaration. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ActionDeclaration +type ActionDeclaration struct { + _ struct{} `type:"structure"` + + // The configuration information for the action type. + // + // ActionTypeId is a required field + ActionTypeId *ActionTypeId `locationName:"actionTypeId" type:"structure" required:"true"` + + // The action declaration's configuration. + Configuration map[string]*string `locationName:"configuration" type:"map"` + + // The name or ID of the artifact consumed by the action, such as a test or + // build artifact. + InputArtifacts []*InputArtifact `locationName:"inputArtifacts" type:"list"` + + // The action declaration's name. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The name or ID of the result of the action declaration, such as a test or + // build artifact. + OutputArtifacts []*OutputArtifact `locationName:"outputArtifacts" type:"list"` + + // The ARN of the IAM service role that will perform the declared action. This + // is assumed through the roleArn for the pipeline. + RoleArn *string `locationName:"roleArn" type:"string"` + + // The order in which actions are run. + RunOrder *int64 `locationName:"runOrder" min:"1" type:"integer"` +} + +// String returns the string representation +func (s ActionDeclaration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActionDeclaration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ActionDeclaration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ActionDeclaration"} + if s.ActionTypeId == nil { + invalidParams.Add(request.NewErrParamRequired("ActionTypeId")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.RunOrder != nil && *s.RunOrder < 1 { + invalidParams.Add(request.NewErrParamMinValue("RunOrder", 1)) + } + if s.ActionTypeId != nil { + if err := s.ActionTypeId.Validate(); err != nil { + invalidParams.AddNested("ActionTypeId", err.(request.ErrInvalidParams)) + } + } + if s.InputArtifacts != nil { + for i, v := range s.InputArtifacts { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputArtifacts", i), err.(request.ErrInvalidParams)) + } + } + } + if s.OutputArtifacts != nil { + for i, v := range s.OutputArtifacts { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OutputArtifacts", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActionTypeId sets the ActionTypeId field's value. +func (s *ActionDeclaration) SetActionTypeId(v *ActionTypeId) *ActionDeclaration { + s.ActionTypeId = v + return s +} + +// SetConfiguration sets the Configuration field's value. +func (s *ActionDeclaration) SetConfiguration(v map[string]*string) *ActionDeclaration { + s.Configuration = v + return s +} + +// SetInputArtifacts sets the InputArtifacts field's value. +func (s *ActionDeclaration) SetInputArtifacts(v []*InputArtifact) *ActionDeclaration { + s.InputArtifacts = v + return s +} + +// SetName sets the Name field's value. +func (s *ActionDeclaration) SetName(v string) *ActionDeclaration { + s.Name = &v + return s +} + +// SetOutputArtifacts sets the OutputArtifacts field's value. +func (s *ActionDeclaration) SetOutputArtifacts(v []*OutputArtifact) *ActionDeclaration { + s.OutputArtifacts = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *ActionDeclaration) SetRoleArn(v string) *ActionDeclaration { + s.RoleArn = &v + return s +} + +// SetRunOrder sets the RunOrder field's value. +func (s *ActionDeclaration) SetRunOrder(v int64) *ActionDeclaration { + s.RunOrder = &v + return s +} + +// Represents information about the run of an action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ActionExecution +type ActionExecution struct { + _ struct{} `type:"structure"` + + // The details of an error returned by a URL external to AWS. + ErrorDetails *ErrorDetails `locationName:"errorDetails" type:"structure"` + + // The external ID of the run of the action. + ExternalExecutionId *string `locationName:"externalExecutionId" min:"1" type:"string"` + + // The URL of a resource external to AWS that will be used when running the + // action, for example an external repository URL. + ExternalExecutionUrl *string `locationName:"externalExecutionUrl" min:"1" type:"string"` + + // The last status change of the action. + LastStatusChange *time.Time `locationName:"lastStatusChange" type:"timestamp" timestampFormat:"unix"` + + // The ARN of the user who last changed the pipeline. + LastUpdatedBy *string `locationName:"lastUpdatedBy" type:"string"` + + // A percentage of completeness of the action as it runs. + PercentComplete *int64 `locationName:"percentComplete" type:"integer"` + + // The status of the action, or for a completed action, the last status of the + // action. + Status *string `locationName:"status" type:"string" enum:"ActionExecutionStatus"` + + // A summary of the run of the action. + Summary *string `locationName:"summary" type:"string"` + + // The system-generated token used to identify a unique approval request. The + // token for each open approval request can be obtained using the GetPipelineState + // command and is used to validate that the approval request corresponding to + // this token is still valid. + Token *string `locationName:"token" type:"string"` +} + +// String returns the string representation +func (s ActionExecution) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActionExecution) GoString() string { + return s.String() +} + +// SetErrorDetails sets the ErrorDetails field's value. +func (s *ActionExecution) SetErrorDetails(v *ErrorDetails) *ActionExecution { + s.ErrorDetails = v + return s +} + +// SetExternalExecutionId sets the ExternalExecutionId field's value. +func (s *ActionExecution) SetExternalExecutionId(v string) *ActionExecution { + s.ExternalExecutionId = &v + return s +} + +// SetExternalExecutionUrl sets the ExternalExecutionUrl field's value. +func (s *ActionExecution) SetExternalExecutionUrl(v string) *ActionExecution { + s.ExternalExecutionUrl = &v + return s +} + +// SetLastStatusChange sets the LastStatusChange field's value. +func (s *ActionExecution) SetLastStatusChange(v time.Time) *ActionExecution { + s.LastStatusChange = &v + return s +} + +// SetLastUpdatedBy sets the LastUpdatedBy field's value. +func (s *ActionExecution) SetLastUpdatedBy(v string) *ActionExecution { + s.LastUpdatedBy = &v + return s +} + +// SetPercentComplete sets the PercentComplete field's value. +func (s *ActionExecution) SetPercentComplete(v int64) *ActionExecution { + s.PercentComplete = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ActionExecution) SetStatus(v string) *ActionExecution { + s.Status = &v + return s +} + +// SetSummary sets the Summary field's value. +func (s *ActionExecution) SetSummary(v string) *ActionExecution { + s.Summary = &v + return s +} + +// SetToken sets the Token field's value. +func (s *ActionExecution) SetToken(v string) *ActionExecution { + s.Token = &v + return s +} + +// Represents information about the version (or revision) of an action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ActionRevision +type ActionRevision struct { + _ struct{} `type:"structure"` + + // The date and time when the most recent version of the action was created, + // in timestamp format. + // + // Created is a required field + Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix" required:"true"` + + // The unique identifier of the change that set the state to this revision, + // for example a deployment ID or timestamp. + // + // RevisionChangeId is a required field + RevisionChangeId *string `locationName:"revisionChangeId" min:"1" type:"string" required:"true"` + + // The system-generated unique ID that identifies the revision number of the + // action. + // + // RevisionId is a required field + RevisionId *string `locationName:"revisionId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ActionRevision) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActionRevision) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ActionRevision) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ActionRevision"} + if s.Created == nil { + invalidParams.Add(request.NewErrParamRequired("Created")) + } + if s.RevisionChangeId == nil { + invalidParams.Add(request.NewErrParamRequired("RevisionChangeId")) + } + if s.RevisionChangeId != nil && len(*s.RevisionChangeId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RevisionChangeId", 1)) + } + if s.RevisionId == nil { + invalidParams.Add(request.NewErrParamRequired("RevisionId")) + } + if s.RevisionId != nil && len(*s.RevisionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RevisionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreated sets the Created field's value. +func (s *ActionRevision) SetCreated(v time.Time) *ActionRevision { + s.Created = &v + return s +} + +// SetRevisionChangeId sets the RevisionChangeId field's value. +func (s *ActionRevision) SetRevisionChangeId(v string) *ActionRevision { + s.RevisionChangeId = &v + return s +} + +// SetRevisionId sets the RevisionId field's value. +func (s *ActionRevision) SetRevisionId(v string) *ActionRevision { + s.RevisionId = &v + return s +} + +// Represents information about the state of an action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ActionState +type ActionState struct { + _ struct{} `type:"structure"` + + // The name of the action. + ActionName *string `locationName:"actionName" min:"1" type:"string"` + + // Represents information about the version (or revision) of an action. + CurrentRevision *ActionRevision `locationName:"currentRevision" type:"structure"` + + // A URL link for more information about the state of the action, such as a + // deployment group details page. + EntityUrl *string `locationName:"entityUrl" min:"1" type:"string"` + + // Represents information about the run of an action. + LatestExecution *ActionExecution `locationName:"latestExecution" type:"structure"` + + // A URL link for more information about the revision, such as a commit details + // page. + RevisionUrl *string `locationName:"revisionUrl" min:"1" type:"string"` +} + +// String returns the string representation +func (s ActionState) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActionState) GoString() string { + return s.String() +} + +// SetActionName sets the ActionName field's value. +func (s *ActionState) SetActionName(v string) *ActionState { + s.ActionName = &v + return s +} + +// SetCurrentRevision sets the CurrentRevision field's value. +func (s *ActionState) SetCurrentRevision(v *ActionRevision) *ActionState { + s.CurrentRevision = v + return s +} + +// SetEntityUrl sets the EntityUrl field's value. +func (s *ActionState) SetEntityUrl(v string) *ActionState { + s.EntityUrl = &v + return s +} + +// SetLatestExecution sets the LatestExecution field's value. +func (s *ActionState) SetLatestExecution(v *ActionExecution) *ActionState { + s.LatestExecution = v + return s +} + +// SetRevisionUrl sets the RevisionUrl field's value. +func (s *ActionState) SetRevisionUrl(v string) *ActionState { + s.RevisionUrl = &v + return s +} + +// Returns information about the details of an action type. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ActionType +type ActionType struct { + _ struct{} `type:"structure"` + + // The configuration properties for the action type. + ActionConfigurationProperties []*ActionConfigurationProperty `locationName:"actionConfigurationProperties" type:"list"` + + // Represents information about an action type. + // + // Id is a required field + Id *ActionTypeId `locationName:"id" type:"structure" required:"true"` + + // The details of the input artifact for the action, such as its commit ID. + // + // InputArtifactDetails is a required field + InputArtifactDetails *ArtifactDetails `locationName:"inputArtifactDetails" type:"structure" required:"true"` + + // The details of the output artifact of the action, such as its commit ID. + // + // OutputArtifactDetails is a required field + OutputArtifactDetails *ArtifactDetails `locationName:"outputArtifactDetails" type:"structure" required:"true"` + + // The settings for the action type. + Settings *ActionTypeSettings `locationName:"settings" type:"structure"` +} + +// String returns the string representation +func (s ActionType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActionType) GoString() string { + return s.String() +} + +// SetActionConfigurationProperties sets the ActionConfigurationProperties field's value. +func (s *ActionType) SetActionConfigurationProperties(v []*ActionConfigurationProperty) *ActionType { + s.ActionConfigurationProperties = v + return s +} + +// SetId sets the Id field's value. +func (s *ActionType) SetId(v *ActionTypeId) *ActionType { + s.Id = v + return s +} + +// SetInputArtifactDetails sets the InputArtifactDetails field's value. +func (s *ActionType) SetInputArtifactDetails(v *ArtifactDetails) *ActionType { + s.InputArtifactDetails = v + return s +} + +// SetOutputArtifactDetails sets the OutputArtifactDetails field's value. +func (s *ActionType) SetOutputArtifactDetails(v *ArtifactDetails) *ActionType { + s.OutputArtifactDetails = v + return s +} + +// SetSettings sets the Settings field's value. +func (s *ActionType) SetSettings(v *ActionTypeSettings) *ActionType { + s.Settings = v + return s +} + +// Represents information about an action type. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ActionTypeId +type ActionTypeId struct { + _ struct{} `type:"structure"` + + // A category defines what kind of action can be taken in the stage, and constrains + // the provider type for the action. Valid categories are limited to one of + // the values below. + // + // Category is a required field + Category *string `locationName:"category" type:"string" required:"true" enum:"ActionCategory"` + + // The creator of the action being called. + // + // Owner is a required field + Owner *string `locationName:"owner" type:"string" required:"true" enum:"ActionOwner"` + + // The provider of the service being called by the action. Valid providers are + // determined by the action category. For example, an action in the Deploy category + // type might have a provider of AWS CodeDeploy, which would be specified as + // CodeDeploy. + // + // Provider is a required field + Provider *string `locationName:"provider" min:"1" type:"string" required:"true"` + + // A string that identifies the action type. + // + // Version is a required field + Version *string `locationName:"version" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ActionTypeId) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActionTypeId) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ActionTypeId) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ActionTypeId"} + if s.Category == nil { + invalidParams.Add(request.NewErrParamRequired("Category")) + } + if s.Owner == nil { + invalidParams.Add(request.NewErrParamRequired("Owner")) + } + if s.Provider == nil { + invalidParams.Add(request.NewErrParamRequired("Provider")) + } + if s.Provider != nil && len(*s.Provider) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Provider", 1)) + } + if s.Version == nil { + invalidParams.Add(request.NewErrParamRequired("Version")) + } + if s.Version != nil && len(*s.Version) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Version", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCategory sets the Category field's value. +func (s *ActionTypeId) SetCategory(v string) *ActionTypeId { + s.Category = &v + return s +} + +// SetOwner sets the Owner field's value. +func (s *ActionTypeId) SetOwner(v string) *ActionTypeId { + s.Owner = &v + return s +} + +// SetProvider sets the Provider field's value. +func (s *ActionTypeId) SetProvider(v string) *ActionTypeId { + s.Provider = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *ActionTypeId) SetVersion(v string) *ActionTypeId { + s.Version = &v + return s +} + +// Returns information about the settings for an action type. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ActionTypeSettings +type ActionTypeSettings struct { + _ struct{} `type:"structure"` + + // The URL returned to the AWS CodePipeline console that provides a deep link + // to the resources of the external system, such as the configuration page for + // an AWS CodeDeploy deployment group. This link is provided as part of the + // action display within the pipeline. + EntityUrlTemplate *string `locationName:"entityUrlTemplate" min:"1" type:"string"` + + // The URL returned to the AWS CodePipeline console that contains a link to + // the top-level landing page for the external system, such as console page + // for AWS CodeDeploy. This link is shown on the pipeline view page in the AWS + // CodePipeline console and provides a link to the execution entity of the external + // action. + ExecutionUrlTemplate *string `locationName:"executionUrlTemplate" min:"1" type:"string"` + + // The URL returned to the AWS CodePipeline console that contains a link to + // the page where customers can update or change the configuration of the external + // action. + RevisionUrlTemplate *string `locationName:"revisionUrlTemplate" min:"1" type:"string"` + + // The URL of a sign-up page where users can sign up for an external service + // and perform initial configuration of the action provided by that service. + ThirdPartyConfigurationUrl *string `locationName:"thirdPartyConfigurationUrl" min:"1" type:"string"` +} + +// String returns the string representation +func (s ActionTypeSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActionTypeSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ActionTypeSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ActionTypeSettings"} + if s.EntityUrlTemplate != nil && len(*s.EntityUrlTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EntityUrlTemplate", 1)) + } + if s.ExecutionUrlTemplate != nil && len(*s.ExecutionUrlTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExecutionUrlTemplate", 1)) + } + if s.RevisionUrlTemplate != nil && len(*s.RevisionUrlTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RevisionUrlTemplate", 1)) + } + if s.ThirdPartyConfigurationUrl != nil && len(*s.ThirdPartyConfigurationUrl) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThirdPartyConfigurationUrl", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEntityUrlTemplate sets the EntityUrlTemplate field's value. +func (s *ActionTypeSettings) SetEntityUrlTemplate(v string) *ActionTypeSettings { + s.EntityUrlTemplate = &v + return s +} + +// SetExecutionUrlTemplate sets the ExecutionUrlTemplate field's value. +func (s *ActionTypeSettings) SetExecutionUrlTemplate(v string) *ActionTypeSettings { + s.ExecutionUrlTemplate = &v + return s +} + +// SetRevisionUrlTemplate sets the RevisionUrlTemplate field's value. +func (s *ActionTypeSettings) SetRevisionUrlTemplate(v string) *ActionTypeSettings { + s.RevisionUrlTemplate = &v + return s +} + +// SetThirdPartyConfigurationUrl sets the ThirdPartyConfigurationUrl field's value. +func (s *ActionTypeSettings) SetThirdPartyConfigurationUrl(v string) *ActionTypeSettings { + s.ThirdPartyConfigurationUrl = &v + return s +} + +// Represents information about the result of an approval request. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ApprovalResult +type ApprovalResult struct { + _ struct{} `type:"structure"` + + // The response submitted by a reviewer assigned to an approval action request. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"ApprovalStatus"` + + // The summary of the current status of the approval request. + // + // Summary is a required field + Summary *string `locationName:"summary" type:"string" required:"true"` +} + +// String returns the string representation +func (s ApprovalResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApprovalResult) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ApprovalResult) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ApprovalResult"} + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + if s.Summary == nil { + invalidParams.Add(request.NewErrParamRequired("Summary")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStatus sets the Status field's value. +func (s *ApprovalResult) SetStatus(v string) *ApprovalResult { + s.Status = &v + return s +} + +// SetSummary sets the Summary field's value. +func (s *ApprovalResult) SetSummary(v string) *ApprovalResult { + s.Summary = &v + return s +} + +// Represents information about an artifact that will be worked upon by actions +// in the pipeline. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/Artifact +type Artifact struct { + _ struct{} `type:"structure"` + + // The location of an artifact. + Location *ArtifactLocation `locationName:"location" type:"structure"` + + // The artifact's name. + Name *string `locationName:"name" min:"1" type:"string"` + + // The artifact's revision ID. Depending on the type of object, this could be + // a commit ID (GitHub) or a revision ID (Amazon S3). + Revision *string `locationName:"revision" min:"1" type:"string"` +} + +// String returns the string representation +func (s Artifact) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Artifact) GoString() string { + return s.String() +} + +// SetLocation sets the Location field's value. +func (s *Artifact) SetLocation(v *ArtifactLocation) *Artifact { + s.Location = v + return s +} + +// SetName sets the Name field's value. +func (s *Artifact) SetName(v string) *Artifact { + s.Name = &v + return s +} + +// SetRevision sets the Revision field's value. +func (s *Artifact) SetRevision(v string) *Artifact { + s.Revision = &v + return s +} + +// Returns information about the details of an artifact. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ArtifactDetails +type ArtifactDetails struct { + _ struct{} `type:"structure"` + + // The maximum number of artifacts allowed for the action type. + // + // MaximumCount is a required field + MaximumCount *int64 `locationName:"maximumCount" type:"integer" required:"true"` + + // The minimum number of artifacts allowed for the action type. + // + // MinimumCount is a required field + MinimumCount *int64 `locationName:"minimumCount" type:"integer" required:"true"` +} + +// String returns the string representation +func (s ArtifactDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ArtifactDetails) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ArtifactDetails) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ArtifactDetails"} + if s.MaximumCount == nil { + invalidParams.Add(request.NewErrParamRequired("MaximumCount")) + } + if s.MinimumCount == nil { + invalidParams.Add(request.NewErrParamRequired("MinimumCount")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaximumCount sets the MaximumCount field's value. +func (s *ArtifactDetails) SetMaximumCount(v int64) *ArtifactDetails { + s.MaximumCount = &v + return s +} + +// SetMinimumCount sets the MinimumCount field's value. +func (s *ArtifactDetails) SetMinimumCount(v int64) *ArtifactDetails { + s.MinimumCount = &v + return s +} + +// Represents information about the location of an artifact. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ArtifactLocation +type ArtifactLocation struct { + _ struct{} `type:"structure"` + + // The Amazon S3 bucket that contains the artifact. + S3Location *S3ArtifactLocation `locationName:"s3Location" type:"structure"` + + // The type of artifact in the location. + Type *string `locationName:"type" type:"string" enum:"ArtifactLocationType"` +} + +// String returns the string representation +func (s ArtifactLocation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ArtifactLocation) GoString() string { + return s.String() +} + +// SetS3Location sets the S3Location field's value. +func (s *ArtifactLocation) SetS3Location(v *S3ArtifactLocation) *ArtifactLocation { + s.S3Location = v + return s +} + +// SetType sets the Type field's value. +func (s *ArtifactLocation) SetType(v string) *ArtifactLocation { + s.Type = &v + return s +} + +// Represents revision details of an artifact. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ArtifactRevision +type ArtifactRevision struct { + _ struct{} `type:"structure"` + + // The date and time when the most recent revision of the artifact was created, + // in timestamp format. + Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + + // The name of an artifact. This name might be system-generated, such as "MyApp", + // or might be defined by the user when an action is created. + Name *string `locationName:"name" min:"1" type:"string"` + + // An additional identifier for a revision, such as a commit date or, for artifacts + // stored in Amazon S3 buckets, the ETag value. + RevisionChangeIdentifier *string `locationName:"revisionChangeIdentifier" min:"1" type:"string"` + + // The revision ID of the artifact. + RevisionId *string `locationName:"revisionId" min:"1" type:"string"` + + // Summary information about the most recent revision of the artifact. For GitHub + // and AWS CodeCommit repositories, the commit message. For Amazon S3 buckets + // or actions, the user-provided content of a codepipeline-artifact-revision-summary + // key specified in the object metadata. + RevisionSummary *string `locationName:"revisionSummary" min:"1" type:"string"` + + // The commit ID for the artifact revision. For artifacts stored in GitHub or + // AWS CodeCommit repositories, the commit ID is linked to a commit details + // page. + RevisionUrl *string `locationName:"revisionUrl" min:"1" type:"string"` +} + +// String returns the string representation +func (s ArtifactRevision) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ArtifactRevision) GoString() string { + return s.String() +} + +// SetCreated sets the Created field's value. +func (s *ArtifactRevision) SetCreated(v time.Time) *ArtifactRevision { + s.Created = &v + return s +} + +// SetName sets the Name field's value. +func (s *ArtifactRevision) SetName(v string) *ArtifactRevision { + s.Name = &v + return s +} + +// SetRevisionChangeIdentifier sets the RevisionChangeIdentifier field's value. +func (s *ArtifactRevision) SetRevisionChangeIdentifier(v string) *ArtifactRevision { + s.RevisionChangeIdentifier = &v + return s +} + +// SetRevisionId sets the RevisionId field's value. +func (s *ArtifactRevision) SetRevisionId(v string) *ArtifactRevision { + s.RevisionId = &v + return s +} + +// SetRevisionSummary sets the RevisionSummary field's value. +func (s *ArtifactRevision) SetRevisionSummary(v string) *ArtifactRevision { + s.RevisionSummary = &v + return s +} + +// SetRevisionUrl sets the RevisionUrl field's value. +func (s *ArtifactRevision) SetRevisionUrl(v string) *ArtifactRevision { + s.RevisionUrl = &v + return s +} + +// The Amazon S3 location where artifacts are stored for the pipeline. If this +// Amazon S3 bucket is created manually, it must meet the requirements for AWS +// CodePipeline. For more information, see the Concepts (http://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#CPS3Bucket). +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ArtifactStore +type ArtifactStore struct { + _ struct{} `type:"structure"` + + // The encryption key used to encrypt the data in the artifact store, such as + // an AWS Key Management Service (AWS KMS) key. 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 is a required field + Location *string `locationName:"location" min:"3" type:"string" required:"true"` + + // The type of the artifact store, such as S3. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"ArtifactStoreType"` +} + +// String returns the string representation +func (s ArtifactStore) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ArtifactStore) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ArtifactStore) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ArtifactStore"} + if s.Location == nil { + invalidParams.Add(request.NewErrParamRequired("Location")) + } + if s.Location != nil && len(*s.Location) < 3 { + invalidParams.Add(request.NewErrParamMinLen("Location", 3)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.EncryptionKey != nil { + if err := s.EncryptionKey.Validate(); err != nil { + invalidParams.AddNested("EncryptionKey", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEncryptionKey sets the EncryptionKey field's value. +func (s *ArtifactStore) SetEncryptionKey(v *EncryptionKey) *ArtifactStore { + s.EncryptionKey = v + return s +} + +// SetLocation sets the Location field's value. +func (s *ArtifactStore) SetLocation(v string) *ArtifactStore { + s.Location = &v + return s +} + +// SetType sets the Type field's value. +func (s *ArtifactStore) SetType(v string) *ArtifactStore { + s.Type = &v + return s +} + +// Reserved for future use. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/BlockerDeclaration +type BlockerDeclaration struct { + _ struct{} `type:"structure"` + + // Reserved for future use. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // Reserved for future use. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"BlockerType"` +} + +// String returns the string representation +func (s BlockerDeclaration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BlockerDeclaration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BlockerDeclaration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BlockerDeclaration"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *BlockerDeclaration) SetName(v string) *BlockerDeclaration { + s.Name = &v + return s +} + +// SetType sets the Type field's value. +func (s *BlockerDeclaration) SetType(v string) *BlockerDeclaration { + s.Type = &v + return s +} + +// Represents the input of a create custom action operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/CreateCustomActionTypeInput +type CreateCustomActionTypeInput struct { + _ struct{} `type:"structure"` + + // The category of the custom action, such as a build action or a test action. + // + // Although Source and Approval are listed as valid values, they are not currently + // functional. These values are reserved for future use. + // + // Category is a required field + Category *string `locationName:"category" type:"string" required:"true" enum:"ActionCategory"` + + // The configuration properties for the custom action. + // + // You can refer to a name in the configuration properties of the custom action + // within the URL templates by following the format of {Config:name}, as long + // as the configuration property is both required and not secret. For more information, + // see Create a Custom Action for a Pipeline (http://docs.aws.amazon.com/codepipeline/latest/userguide/how-to-create-custom-action.html). + ConfigurationProperties []*ActionConfigurationProperty `locationName:"configurationProperties" type:"list"` + + // Returns information about the details of an artifact. + // + // InputArtifactDetails is a required field + InputArtifactDetails *ArtifactDetails `locationName:"inputArtifactDetails" type:"structure" required:"true"` + + // Returns information about the details of an artifact. + // + // OutputArtifactDetails is a required field + OutputArtifactDetails *ArtifactDetails `locationName:"outputArtifactDetails" type:"structure" required:"true"` + + // The provider of the service used in the custom action, such as AWS CodeDeploy. + // + // Provider is a required field + Provider *string `locationName:"provider" min:"1" type:"string" required:"true"` + + // Returns information about the settings for an action type. + Settings *ActionTypeSettings `locationName:"settings" type:"structure"` + + // The version identifier of the custom action. + // + // Version is a required field + Version *string `locationName:"version" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateCustomActionTypeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCustomActionTypeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCustomActionTypeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCustomActionTypeInput"} + if s.Category == nil { + invalidParams.Add(request.NewErrParamRequired("Category")) + } + if s.InputArtifactDetails == nil { + invalidParams.Add(request.NewErrParamRequired("InputArtifactDetails")) + } + if s.OutputArtifactDetails == nil { + invalidParams.Add(request.NewErrParamRequired("OutputArtifactDetails")) + } + if s.Provider == nil { + invalidParams.Add(request.NewErrParamRequired("Provider")) + } + if s.Provider != nil && len(*s.Provider) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Provider", 1)) + } + if s.Version == nil { + invalidParams.Add(request.NewErrParamRequired("Version")) + } + if s.Version != nil && len(*s.Version) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Version", 1)) + } + if s.ConfigurationProperties != nil { + for i, v := range s.ConfigurationProperties { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ConfigurationProperties", i), err.(request.ErrInvalidParams)) + } + } + } + if s.InputArtifactDetails != nil { + if err := s.InputArtifactDetails.Validate(); err != nil { + invalidParams.AddNested("InputArtifactDetails", err.(request.ErrInvalidParams)) + } + } + if s.OutputArtifactDetails != nil { + if err := s.OutputArtifactDetails.Validate(); err != nil { + invalidParams.AddNested("OutputArtifactDetails", err.(request.ErrInvalidParams)) + } + } + if s.Settings != nil { + if err := s.Settings.Validate(); err != nil { + invalidParams.AddNested("Settings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCategory sets the Category field's value. +func (s *CreateCustomActionTypeInput) SetCategory(v string) *CreateCustomActionTypeInput { + s.Category = &v + return s +} + +// SetConfigurationProperties sets the ConfigurationProperties field's value. +func (s *CreateCustomActionTypeInput) SetConfigurationProperties(v []*ActionConfigurationProperty) *CreateCustomActionTypeInput { + s.ConfigurationProperties = v + return s +} + +// SetInputArtifactDetails sets the InputArtifactDetails field's value. +func (s *CreateCustomActionTypeInput) SetInputArtifactDetails(v *ArtifactDetails) *CreateCustomActionTypeInput { + s.InputArtifactDetails = v + return s +} + +// SetOutputArtifactDetails sets the OutputArtifactDetails field's value. +func (s *CreateCustomActionTypeInput) SetOutputArtifactDetails(v *ArtifactDetails) *CreateCustomActionTypeInput { + s.OutputArtifactDetails = v + return s +} + +// SetProvider sets the Provider field's value. +func (s *CreateCustomActionTypeInput) SetProvider(v string) *CreateCustomActionTypeInput { + s.Provider = &v + return s +} + +// SetSettings sets the Settings field's value. +func (s *CreateCustomActionTypeInput) SetSettings(v *ActionTypeSettings) *CreateCustomActionTypeInput { + s.Settings = v + return s +} + +// SetVersion sets the Version field's value. +func (s *CreateCustomActionTypeInput) SetVersion(v string) *CreateCustomActionTypeInput { + s.Version = &v + return s +} + +// Represents the output of a create custom action operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/CreateCustomActionTypeOutput +type CreateCustomActionTypeOutput struct { + _ struct{} `type:"structure"` + + // Returns information about the details of an action type. + // + // ActionType is a required field + ActionType *ActionType `locationName:"actionType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateCustomActionTypeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCustomActionTypeOutput) GoString() string { + return s.String() +} + +// SetActionType sets the ActionType field's value. +func (s *CreateCustomActionTypeOutput) SetActionType(v *ActionType) *CreateCustomActionTypeOutput { + s.ActionType = v + return s +} + +// Represents the input of a create pipeline action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/CreatePipelineInput +type CreatePipelineInput struct { + _ struct{} `type:"structure"` + + // Represents the structure of actions and stages to be performed in the pipeline. + // + // Pipeline is a required field + Pipeline *PipelineDeclaration `locationName:"pipeline" type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreatePipelineInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePipelineInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePipelineInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePipelineInput"} + if s.Pipeline == nil { + invalidParams.Add(request.NewErrParamRequired("Pipeline")) + } + if s.Pipeline != nil { + if err := s.Pipeline.Validate(); err != nil { + invalidParams.AddNested("Pipeline", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPipeline sets the Pipeline field's value. +func (s *CreatePipelineInput) SetPipeline(v *PipelineDeclaration) *CreatePipelineInput { + s.Pipeline = v + return s +} + +// Represents the output of a create pipeline action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/CreatePipelineOutput +type CreatePipelineOutput struct { + _ struct{} `type:"structure"` + + // Represents the structure of actions and stages to be performed in the pipeline. + Pipeline *PipelineDeclaration `locationName:"pipeline" type:"structure"` +} + +// String returns the string representation +func (s CreatePipelineOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePipelineOutput) GoString() string { + return s.String() +} + +// SetPipeline sets the Pipeline field's value. +func (s *CreatePipelineOutput) SetPipeline(v *PipelineDeclaration) *CreatePipelineOutput { + s.Pipeline = v + return s +} + +// Represents information about a current revision. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/CurrentRevision +type CurrentRevision struct { + _ struct{} `type:"structure"` + + // The change identifier for the current revision. + // + // ChangeIdentifier is a required field + ChangeIdentifier *string `locationName:"changeIdentifier" min:"1" type:"string" required:"true"` + + // The date and time when the most recent revision of the artifact was created, + // in timestamp format. + Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + + // The revision ID of the current version of an artifact. + // + // Revision is a required field + Revision *string `locationName:"revision" min:"1" type:"string" required:"true"` + + // The summary of the most recent revision of the artifact. + RevisionSummary *string `locationName:"revisionSummary" min:"1" type:"string"` +} + +// String returns the string representation +func (s CurrentRevision) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CurrentRevision) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CurrentRevision) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CurrentRevision"} + if s.ChangeIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ChangeIdentifier")) + } + if s.ChangeIdentifier != nil && len(*s.ChangeIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChangeIdentifier", 1)) + } + if s.Revision == nil { + invalidParams.Add(request.NewErrParamRequired("Revision")) + } + if s.Revision != nil && len(*s.Revision) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Revision", 1)) + } + if s.RevisionSummary != nil && len(*s.RevisionSummary) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RevisionSummary", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChangeIdentifier sets the ChangeIdentifier field's value. +func (s *CurrentRevision) SetChangeIdentifier(v string) *CurrentRevision { + s.ChangeIdentifier = &v + return s +} + +// SetCreated sets the Created field's value. +func (s *CurrentRevision) SetCreated(v time.Time) *CurrentRevision { + s.Created = &v + return s +} + +// SetRevision sets the Revision field's value. +func (s *CurrentRevision) SetRevision(v string) *CurrentRevision { + s.Revision = &v + return s +} + +// SetRevisionSummary sets the RevisionSummary field's value. +func (s *CurrentRevision) SetRevisionSummary(v string) *CurrentRevision { + s.RevisionSummary = &v + return s +} + +// Represents the input of a delete custom action operation. The custom action +// will be marked as deleted. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeleteCustomActionTypeInput +type DeleteCustomActionTypeInput struct { + _ struct{} `type:"structure"` + + // The category of the custom action that you want to delete, such as source + // or deploy. + // + // Category is a required field + Category *string `locationName:"category" type:"string" required:"true" enum:"ActionCategory"` + + // The provider of the service used in the custom action, such as AWS CodeDeploy. + // + // Provider is a required field + Provider *string `locationName:"provider" min:"1" type:"string" required:"true"` + + // The version of the custom action to delete. + // + // Version is a required field + Version *string `locationName:"version" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteCustomActionTypeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCustomActionTypeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCustomActionTypeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCustomActionTypeInput"} + if s.Category == nil { + invalidParams.Add(request.NewErrParamRequired("Category")) + } + if s.Provider == nil { + invalidParams.Add(request.NewErrParamRequired("Provider")) + } + if s.Provider != nil && len(*s.Provider) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Provider", 1)) + } + if s.Version == nil { + invalidParams.Add(request.NewErrParamRequired("Version")) + } + if s.Version != nil && len(*s.Version) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Version", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCategory sets the Category field's value. +func (s *DeleteCustomActionTypeInput) SetCategory(v string) *DeleteCustomActionTypeInput { + s.Category = &v + return s +} + +// SetProvider sets the Provider field's value. +func (s *DeleteCustomActionTypeInput) SetProvider(v string) *DeleteCustomActionTypeInput { + s.Provider = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *DeleteCustomActionTypeInput) SetVersion(v string) *DeleteCustomActionTypeInput { + s.Version = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeleteCustomActionTypeOutput +type DeleteCustomActionTypeOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteCustomActionTypeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCustomActionTypeOutput) GoString() string { + return s.String() +} + +// Represents the input of a delete pipeline action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeletePipelineInput +type DeletePipelineInput struct { + _ struct{} `type:"structure"` + + // The name of the pipeline to be deleted. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeletePipelineInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePipelineInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePipelineInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePipelineInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DeletePipelineInput) SetName(v string) *DeletePipelineInput { + s.Name = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeletePipelineOutput +type DeletePipelineOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeletePipelineOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePipelineOutput) GoString() string { + return s.String() +} + +// Represents the input of a disable stage transition input action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DisableStageTransitionInput +type DisableStageTransitionInput struct { + _ struct{} `type:"structure"` + + // The name of the pipeline in which you want to disable the flow of artifacts + // from one stage to another. + // + // PipelineName is a required field + PipelineName *string `locationName:"pipelineName" min:"1" type:"string" required:"true"` + + // The reason given to the user why a stage is disabled, such as waiting for + // manual approval or manual tests. This message is displayed in the pipeline + // console UI. + // + // Reason is a required field + Reason *string `locationName:"reason" min:"1" type:"string" required:"true"` + + // The name of the stage where you want to disable the inbound or outbound transition + // of artifacts. + // + // StageName is a required field + StageName *string `locationName:"stageName" min:"1" type:"string" required:"true"` + + // Specifies whether artifacts will be prevented from transitioning into the + // stage and being processed by the actions in that stage (inbound), or prevented + // from transitioning from the stage after they have been processed by the actions + // in that stage (outbound). + // + // TransitionType is a required field + TransitionType *string `locationName:"transitionType" type:"string" required:"true" enum:"StageTransitionType"` +} + +// String returns the string representation +func (s DisableStageTransitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableStageTransitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableStageTransitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableStageTransitionInput"} + if s.PipelineName == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineName")) + } + if s.PipelineName != nil && len(*s.PipelineName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineName", 1)) + } + if s.Reason == nil { + invalidParams.Add(request.NewErrParamRequired("Reason")) + } + if s.Reason != nil && len(*s.Reason) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Reason", 1)) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } + if s.TransitionType == nil { + invalidParams.Add(request.NewErrParamRequired("TransitionType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPipelineName sets the PipelineName field's value. +func (s *DisableStageTransitionInput) SetPipelineName(v string) *DisableStageTransitionInput { + s.PipelineName = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *DisableStageTransitionInput) SetReason(v string) *DisableStageTransitionInput { + s.Reason = &v + return s +} + +// SetStageName sets the StageName field's value. +func (s *DisableStageTransitionInput) SetStageName(v string) *DisableStageTransitionInput { + s.StageName = &v + return s +} + +// SetTransitionType sets the TransitionType field's value. +func (s *DisableStageTransitionInput) SetTransitionType(v string) *DisableStageTransitionInput { + s.TransitionType = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DisableStageTransitionOutput +type DisableStageTransitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisableStageTransitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableStageTransitionOutput) GoString() string { + return s.String() +} + +// Represents the input of an enable stage transition action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/EnableStageTransitionInput +type EnableStageTransitionInput struct { + _ struct{} `type:"structure"` + + // The name of the pipeline in which you want to enable the flow of artifacts + // from one stage to another. + // + // PipelineName is a required field + PipelineName *string `locationName:"pipelineName" min:"1" type:"string" required:"true"` + + // The name of the stage where you want to enable the transition of artifacts, + // either into the stage (inbound) or from that stage to the next stage (outbound). + // + // StageName is a required field + StageName *string `locationName:"stageName" min:"1" type:"string" required:"true"` + + // Specifies whether artifacts will be allowed to enter the stage and be processed + // by the actions in that stage (inbound) or whether already-processed artifacts + // will be allowed to transition to the next stage (outbound). + // + // TransitionType is a required field + TransitionType *string `locationName:"transitionType" type:"string" required:"true" enum:"StageTransitionType"` +} + +// String returns the string representation +func (s EnableStageTransitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableStageTransitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableStageTransitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableStageTransitionInput"} + if s.PipelineName == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineName")) + } + if s.PipelineName != nil && len(*s.PipelineName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineName", 1)) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } + if s.TransitionType == nil { + invalidParams.Add(request.NewErrParamRequired("TransitionType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPipelineName sets the PipelineName field's value. +func (s *EnableStageTransitionInput) SetPipelineName(v string) *EnableStageTransitionInput { + s.PipelineName = &v + return s +} + +// SetStageName sets the StageName field's value. +func (s *EnableStageTransitionInput) SetStageName(v string) *EnableStageTransitionInput { + s.StageName = &v + return s +} + +// SetTransitionType sets the TransitionType field's value. +func (s *EnableStageTransitionInput) SetTransitionType(v string) *EnableStageTransitionInput { + s.TransitionType = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/EnableStageTransitionOutput +type EnableStageTransitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s EnableStageTransitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableStageTransitionOutput) GoString() string { + return s.String() +} + +// Represents information about the key used to encrypt data in the artifact +// store, such as an AWS Key Management Service (AWS KMS) key. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/EncryptionKey +type EncryptionKey struct { + _ struct{} `type:"structure"` + + // The ID used to identify the key. For an AWS KMS key, this is the key ID or + // key ARN. + // + // Id is a required field + Id *string `locationName:"id" min:"1" type:"string" required:"true"` + + // The type of encryption key, such as an AWS Key Management Service (AWS KMS) + // key. When creating or updating a pipeline, the value must be set to 'KMS'. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"EncryptionKeyType"` +} + +// 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() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EncryptionKey) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EncryptionKey"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *EncryptionKey) SetId(v string) *EncryptionKey { + s.Id = &v + return s +} + +// SetType sets the Type field's value. +func (s *EncryptionKey) SetType(v string) *EncryptionKey { + s.Type = &v + return s +} + +// Represents information about an error in AWS CodePipeline. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ErrorDetails +type ErrorDetails struct { + _ struct{} `type:"structure"` + + // The system ID or error number code of the error. + Code *string `locationName:"code" type:"string"` + + // The text of the error message. + Message *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s ErrorDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ErrorDetails) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *ErrorDetails) SetCode(v string) *ErrorDetails { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *ErrorDetails) SetMessage(v string) *ErrorDetails { + s.Message = &v + return s +} + +// The details of the actions taken and results produced on an artifact as it +// passes through stages in the pipeline. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ExecutionDetails +type ExecutionDetails struct { + _ struct{} `type:"structure"` + + // The system-generated unique ID of this action used to identify this job worker + // in any external systems, such as AWS CodeDeploy. + ExternalExecutionId *string `locationName:"externalExecutionId" min:"1" type:"string"` + + // The percentage of work completed on the action, represented on a scale of + // zero to one hundred percent. + PercentComplete *int64 `locationName:"percentComplete" type:"integer"` + + // The summary of the current status of the actions. + Summary *string `locationName:"summary" type:"string"` +} + +// String returns the string representation +func (s ExecutionDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExecutionDetails) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExecutionDetails) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExecutionDetails"} + if s.ExternalExecutionId != nil && len(*s.ExternalExecutionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExternalExecutionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExternalExecutionId sets the ExternalExecutionId field's value. +func (s *ExecutionDetails) SetExternalExecutionId(v string) *ExecutionDetails { + s.ExternalExecutionId = &v + return s +} + +// SetPercentComplete sets the PercentComplete field's value. +func (s *ExecutionDetails) SetPercentComplete(v int64) *ExecutionDetails { + s.PercentComplete = &v + return s +} + +// SetSummary sets the Summary field's value. +func (s *ExecutionDetails) SetSummary(v string) *ExecutionDetails { + s.Summary = &v + return s +} + +// Represents information about failure details. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/FailureDetails +type FailureDetails struct { + _ struct{} `type:"structure"` + + // The external ID of the run of the action that failed. + ExternalExecutionId *string `locationName:"externalExecutionId" min:"1" type:"string"` + + // The message about the failure. + // + // Message is a required field + Message *string `locationName:"message" type:"string" required:"true"` + + // The type of the failure. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"FailureType"` +} + +// String returns the string representation +func (s FailureDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailureDetails) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FailureDetails) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FailureDetails"} + if s.ExternalExecutionId != nil && len(*s.ExternalExecutionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExternalExecutionId", 1)) + } + if s.Message == nil { + invalidParams.Add(request.NewErrParamRequired("Message")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExternalExecutionId sets the ExternalExecutionId field's value. +func (s *FailureDetails) SetExternalExecutionId(v string) *FailureDetails { + s.ExternalExecutionId = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *FailureDetails) SetMessage(v string) *FailureDetails { + s.Message = &v + return s +} + +// SetType sets the Type field's value. +func (s *FailureDetails) SetType(v string) *FailureDetails { + s.Type = &v + return s +} + +// Represents the input of a get job details action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetJobDetailsInput +type GetJobDetailsInput struct { + _ struct{} `type:"structure"` + + // The unique system-generated ID for the job. + // + // JobId is a required field + JobId *string `locationName:"jobId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetJobDetailsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetJobDetailsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetJobDetailsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetJobDetailsInput"} + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJobId sets the JobId field's value. +func (s *GetJobDetailsInput) SetJobId(v string) *GetJobDetailsInput { + s.JobId = &v + return s +} + +// Represents the output of a get job details action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetJobDetailsOutput +type GetJobDetailsOutput struct { + _ struct{} `type:"structure"` + + // The details of the job. + // + // If AWSSessionCredentials is used, a long-running job can call GetJobDetails + // again to obtain new credentials. + JobDetails *JobDetails `locationName:"jobDetails" type:"structure"` +} + +// String returns the string representation +func (s GetJobDetailsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetJobDetailsOutput) GoString() string { + return s.String() +} + +// SetJobDetails sets the JobDetails field's value. +func (s *GetJobDetailsOutput) SetJobDetails(v *JobDetails) *GetJobDetailsOutput { + s.JobDetails = v + return s +} + +// Represents the input of a get pipeline execution action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineExecutionInput +type GetPipelineExecutionInput struct { + _ struct{} `type:"structure"` + + // The ID of the pipeline execution about which you want to get execution details. + // + // PipelineExecutionId is a required field + PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string" required:"true"` + + // The name of the pipeline about which you want to get execution details. + // + // PipelineName is a required field + PipelineName *string `locationName:"pipelineName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetPipelineExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPipelineExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPipelineExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPipelineExecutionInput"} + if s.PipelineExecutionId == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineExecutionId")) + } + if s.PipelineName == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineName")) + } + if s.PipelineName != nil && len(*s.PipelineName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPipelineExecutionId sets the PipelineExecutionId field's value. +func (s *GetPipelineExecutionInput) SetPipelineExecutionId(v string) *GetPipelineExecutionInput { + s.PipelineExecutionId = &v + return s +} + +// SetPipelineName sets the PipelineName field's value. +func (s *GetPipelineExecutionInput) SetPipelineName(v string) *GetPipelineExecutionInput { + s.PipelineName = &v + return s +} + +// Represents the output of a get pipeline execution action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineExecutionOutput +type GetPipelineExecutionOutput struct { + _ struct{} `type:"structure"` + + // Represents information about the execution of a pipeline. + PipelineExecution *PipelineExecution `locationName:"pipelineExecution" type:"structure"` +} + +// String returns the string representation +func (s GetPipelineExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPipelineExecutionOutput) GoString() string { + return s.String() +} + +// SetPipelineExecution sets the PipelineExecution field's value. +func (s *GetPipelineExecutionOutput) SetPipelineExecution(v *PipelineExecution) *GetPipelineExecutionOutput { + s.PipelineExecution = v + return s +} + +// Represents the input of a get pipeline action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineInput +type GetPipelineInput struct { + _ struct{} `type:"structure"` + + // The name of the pipeline for which you want to get information. Pipeline + // names must be unique under an Amazon Web Services (AWS) user account. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The version number of the pipeline. If you do not specify a version, defaults + // to the most current version. + Version *int64 `locationName:"version" min:"1" type:"integer"` +} + +// String returns the string representation +func (s GetPipelineInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPipelineInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPipelineInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPipelineInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.Version != nil && *s.Version < 1 { + invalidParams.Add(request.NewErrParamMinValue("Version", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *GetPipelineInput) SetName(v string) *GetPipelineInput { + s.Name = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetPipelineInput) SetVersion(v int64) *GetPipelineInput { + s.Version = &v + return s +} + +// Represents the output of a get pipeline action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineOutput +type GetPipelineOutput struct { + _ struct{} `type:"structure"` + + // Represents the structure of actions and stages to be performed in the pipeline. + Pipeline *PipelineDeclaration `locationName:"pipeline" type:"structure"` +} + +// String returns the string representation +func (s GetPipelineOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPipelineOutput) GoString() string { + return s.String() +} + +// SetPipeline sets the Pipeline field's value. +func (s *GetPipelineOutput) SetPipeline(v *PipelineDeclaration) *GetPipelineOutput { + s.Pipeline = v + return s +} + +// Represents the input of a get pipeline state action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineStateInput +type GetPipelineStateInput struct { + _ struct{} `type:"structure"` + + // The name of the pipeline about which you want to get information. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetPipelineStateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPipelineStateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPipelineStateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPipelineStateInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *GetPipelineStateInput) SetName(v string) *GetPipelineStateInput { + s.Name = &v + return s +} + +// Represents the output of a get pipeline state action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetPipelineStateOutput +type GetPipelineStateOutput struct { + _ struct{} `type:"structure"` + + // The date and time the pipeline was created, in timestamp format. + Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + + // The name of the pipeline for which you want to get the state. + PipelineName *string `locationName:"pipelineName" min:"1" type:"string"` + + // The version number of the pipeline. + // + // A newly-created pipeline is always assigned a version number of 1. + PipelineVersion *int64 `locationName:"pipelineVersion" min:"1" type:"integer"` + + // A list of the pipeline stage output information, including stage name, state, + // most recent run details, whether the stage is disabled, and other data. + StageStates []*StageState `locationName:"stageStates" type:"list"` + + // The date and time the pipeline was last updated, in timestamp format. + Updated *time.Time `locationName:"updated" type:"timestamp" timestampFormat:"unix"` +} + +// String returns the string representation +func (s GetPipelineStateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPipelineStateOutput) GoString() string { + return s.String() +} + +// SetCreated sets the Created field's value. +func (s *GetPipelineStateOutput) SetCreated(v time.Time) *GetPipelineStateOutput { + s.Created = &v + return s +} + +// SetPipelineName sets the PipelineName field's value. +func (s *GetPipelineStateOutput) SetPipelineName(v string) *GetPipelineStateOutput { + s.PipelineName = &v + return s +} + +// SetPipelineVersion sets the PipelineVersion field's value. +func (s *GetPipelineStateOutput) SetPipelineVersion(v int64) *GetPipelineStateOutput { + s.PipelineVersion = &v + return s +} + +// SetStageStates sets the StageStates field's value. +func (s *GetPipelineStateOutput) SetStageStates(v []*StageState) *GetPipelineStateOutput { + s.StageStates = v + return s +} + +// SetUpdated sets the Updated field's value. +func (s *GetPipelineStateOutput) SetUpdated(v time.Time) *GetPipelineStateOutput { + s.Updated = &v + return s +} + +// Represents the input of a get third party job details action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetThirdPartyJobDetailsInput +type GetThirdPartyJobDetailsInput struct { + _ struct{} `type:"structure"` + + // The clientToken portion of the clientId and clientToken pair used to verify + // that the calling entity is allowed access to the job and its details. + // + // ClientToken is a required field + ClientToken *string `locationName:"clientToken" type:"string" required:"true"` + + // The unique system-generated ID used for identifying the job. + // + // JobId is a required field + JobId *string `locationName:"jobId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetThirdPartyJobDetailsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetThirdPartyJobDetailsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetThirdPartyJobDetailsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetThirdPartyJobDetailsInput"} + if s.ClientToken == nil { + invalidParams.Add(request.NewErrParamRequired("ClientToken")) + } + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *GetThirdPartyJobDetailsInput) SetClientToken(v string) *GetThirdPartyJobDetailsInput { + s.ClientToken = &v + return s +} + +// SetJobId sets the JobId field's value. +func (s *GetThirdPartyJobDetailsInput) SetJobId(v string) *GetThirdPartyJobDetailsInput { + s.JobId = &v + return s +} + +// Represents the output of a get third party job details action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/GetThirdPartyJobDetailsOutput +type GetThirdPartyJobDetailsOutput struct { + _ struct{} `type:"structure"` + + // The details of the job, including any protected values defined for the job. + JobDetails *ThirdPartyJobDetails `locationName:"jobDetails" type:"structure"` +} + +// String returns the string representation +func (s GetThirdPartyJobDetailsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetThirdPartyJobDetailsOutput) GoString() string { + return s.String() +} + +// SetJobDetails sets the JobDetails field's value. +func (s *GetThirdPartyJobDetailsOutput) SetJobDetails(v *ThirdPartyJobDetails) *GetThirdPartyJobDetailsOutput { + s.JobDetails = v + return s +} + +// Represents information about an artifact to be worked on, such as a test +// or build artifact. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/InputArtifact +type InputArtifact struct { + _ struct{} `type:"structure"` + + // The name of the artifact to be worked on, for example, "My App". + // + // The input artifact of an action must exactly match the output artifact declared + // in a preceding action, but the input artifact does not have to be the next + // action in strict sequence from the action that provided the output artifact. + // Actions in parallel can declare different output artifacts, which are in + // turn consumed by different following actions. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s InputArtifact) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputArtifact) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputArtifact) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputArtifact"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *InputArtifact) SetName(v string) *InputArtifact { + s.Name = &v + return s +} + +// Represents information about a job. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/Job +type Job struct { + _ struct{} `type:"structure"` + + // The ID of the AWS account to use when performing the job. + AccountId *string `locationName:"accountId" type:"string"` + + // Additional data about a job. + Data *JobData `locationName:"data" type:"structure"` + + // The unique system-generated ID of the job. + Id *string `locationName:"id" type:"string"` + + // A system-generated random number that AWS CodePipeline uses to ensure that + // the job is being worked on by only one job worker. Use this number in an + // AcknowledgeJob request. + Nonce *string `locationName:"nonce" type:"string"` +} + +// String returns the string representation +func (s Job) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Job) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *Job) SetAccountId(v string) *Job { + s.AccountId = &v + return s +} + +// SetData sets the Data field's value. +func (s *Job) SetData(v *JobData) *Job { + s.Data = v + return s +} + +// SetId sets the Id field's value. +func (s *Job) SetId(v string) *Job { + s.Id = &v + return s +} + +// SetNonce sets the Nonce field's value. +func (s *Job) SetNonce(v string) *Job { + s.Nonce = &v + return s +} + +// Represents additional information about a job required for a job worker to +// complete the job. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/JobData +type JobData struct { + _ struct{} `type:"structure"` + + // Represents information about an action configuration. + ActionConfiguration *ActionConfiguration `locationName:"actionConfiguration" type:"structure"` + + // Represents information about an action type. + ActionTypeId *ActionTypeId `locationName:"actionTypeId" type:"structure"` + + // Represents an AWS session credentials object. These credentials are temporary + // credentials that are issued by AWS Secure Token Service (STS). They can be + // used to access input and output artifacts in the Amazon S3 bucket used to + // store artifact for the pipeline in AWS CodePipeline. + ArtifactCredentials *AWSSessionCredentials `locationName:"artifactCredentials" type:"structure"` + + // A system-generated token, such as a AWS CodeDeploy deployment ID, that a + // job requires in order to continue the job asynchronously. + ContinuationToken *string `locationName:"continuationToken" type:"string"` + + // Represents information about the key used to encrypt data in the artifact + // store, such as an AWS Key Management Service (AWS KMS) key. + EncryptionKey *EncryptionKey `locationName:"encryptionKey" type:"structure"` + + // The artifact supplied to the job. + InputArtifacts []*Artifact `locationName:"inputArtifacts" type:"list"` + + // The output of the job. + OutputArtifacts []*Artifact `locationName:"outputArtifacts" type:"list"` + + // Represents information about a pipeline to a job worker. + PipelineContext *PipelineContext `locationName:"pipelineContext" type:"structure"` +} + +// String returns the string representation +func (s JobData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JobData) GoString() string { + return s.String() +} + +// SetActionConfiguration sets the ActionConfiguration field's value. +func (s *JobData) SetActionConfiguration(v *ActionConfiguration) *JobData { + s.ActionConfiguration = v + return s +} + +// SetActionTypeId sets the ActionTypeId field's value. +func (s *JobData) SetActionTypeId(v *ActionTypeId) *JobData { + s.ActionTypeId = v + return s +} + +// SetArtifactCredentials sets the ArtifactCredentials field's value. +func (s *JobData) SetArtifactCredentials(v *AWSSessionCredentials) *JobData { + s.ArtifactCredentials = v + return s +} + +// SetContinuationToken sets the ContinuationToken field's value. +func (s *JobData) SetContinuationToken(v string) *JobData { + s.ContinuationToken = &v + return s +} + +// SetEncryptionKey sets the EncryptionKey field's value. +func (s *JobData) SetEncryptionKey(v *EncryptionKey) *JobData { + s.EncryptionKey = v + return s +} + +// SetInputArtifacts sets the InputArtifacts field's value. +func (s *JobData) SetInputArtifacts(v []*Artifact) *JobData { + s.InputArtifacts = v + return s +} + +// SetOutputArtifacts sets the OutputArtifacts field's value. +func (s *JobData) SetOutputArtifacts(v []*Artifact) *JobData { + s.OutputArtifacts = v + return s +} + +// SetPipelineContext sets the PipelineContext field's value. +func (s *JobData) SetPipelineContext(v *PipelineContext) *JobData { + s.PipelineContext = v + return s +} + +// Represents information about the details of a job. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/JobDetails +type JobDetails struct { + _ struct{} `type:"structure"` + + // The AWS account ID associated with the job. + AccountId *string `locationName:"accountId" type:"string"` + + // Represents additional information about a job required for a job worker to + // complete the job. + Data *JobData `locationName:"data" type:"structure"` + + // The unique system-generated ID of the job. + Id *string `locationName:"id" type:"string"` +} + +// String returns the string representation +func (s JobDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JobDetails) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *JobDetails) SetAccountId(v string) *JobDetails { + s.AccountId = &v + return s +} + +// SetData sets the Data field's value. +func (s *JobDetails) SetData(v *JobData) *JobDetails { + s.Data = v + return s +} + +// SetId sets the Id field's value. +func (s *JobDetails) SetId(v string) *JobDetails { + s.Id = &v + return s +} + +// Represents the input of a list action types action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListActionTypesInput +type ListActionTypesInput struct { + _ struct{} `type:"structure"` + + // Filters the list of action types to those created by a specified entity. + ActionOwnerFilter *string `locationName:"actionOwnerFilter" type:"string" enum:"ActionOwner"` + + // An identifier that was returned from the previous list action types call, + // which can be used to return the next set of action types in the list. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListActionTypesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListActionTypesInput) GoString() string { + return s.String() +} + +// SetActionOwnerFilter sets the ActionOwnerFilter field's value. +func (s *ListActionTypesInput) SetActionOwnerFilter(v string) *ListActionTypesInput { + s.ActionOwnerFilter = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListActionTypesInput) SetNextToken(v string) *ListActionTypesInput { + s.NextToken = &v + return s +} + +// Represents the output of a list action types action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListActionTypesOutput +type ListActionTypesOutput struct { + _ struct{} `type:"structure"` + + // Provides details of the action types. + // + // ActionTypes is a required field + ActionTypes []*ActionType `locationName:"actionTypes" type:"list" required:"true"` + + // If the amount of returned information is significantly large, an identifier + // is also returned which can be used in a subsequent list action types call + // to return the next set of action types in the list. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListActionTypesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListActionTypesOutput) GoString() string { + return s.String() +} + +// SetActionTypes sets the ActionTypes field's value. +func (s *ListActionTypesOutput) SetActionTypes(v []*ActionType) *ListActionTypesOutput { + s.ActionTypes = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListActionTypesOutput) SetNextToken(v string) *ListActionTypesOutput { + s.NextToken = &v + return s +} + +// Represents the input of a list pipelines action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListPipelinesInput +type ListPipelinesInput struct { + _ struct{} `type:"structure"` + + // An identifier that was returned from the previous list pipelines call, which + // can be used to return the next set of pipelines in the list. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListPipelinesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPipelinesInput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPipelinesInput) SetNextToken(v string) *ListPipelinesInput { + s.NextToken = &v + return s +} + +// Represents the output of a list pipelines action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListPipelinesOutput +type ListPipelinesOutput struct { + _ struct{} `type:"structure"` + + // If the amount of returned information is significantly large, an identifier + // is also returned which can be used in a subsequent list pipelines call to + // return the next set of pipelines in the list. + NextToken *string `locationName:"nextToken" type:"string"` + + // The list of pipelines. + Pipelines []*PipelineSummary `locationName:"pipelines" type:"list"` +} + +// String returns the string representation +func (s ListPipelinesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPipelinesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPipelinesOutput) SetNextToken(v string) *ListPipelinesOutput { + s.NextToken = &v + return s +} + +// SetPipelines sets the Pipelines field's value. +func (s *ListPipelinesOutput) SetPipelines(v []*PipelineSummary) *ListPipelinesOutput { + s.Pipelines = v + return s +} + +// Represents information about the output of an action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/OutputArtifact +type OutputArtifact struct { + _ struct{} `type:"structure"` + + // The name of the output of an artifact, such as "My App". + // + // The input artifact of an action must exactly match the output artifact declared + // in a preceding action, but the input artifact does not have to be the next + // action in strict sequence from the action that provided the output artifact. + // Actions in parallel can declare different output artifacts, which are in + // turn consumed by different following actions. + // + // Output artifact names must be unique within a pipeline. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s OutputArtifact) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputArtifact) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OutputArtifact) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OutputArtifact"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *OutputArtifact) SetName(v string) *OutputArtifact { + s.Name = &v + return s +} + +// Represents information about a pipeline to a job worker. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PipelineContext +type PipelineContext struct { + _ struct{} `type:"structure"` + + // Represents the context of an action within the stage of a pipeline to a job + // worker. + Action *ActionContext `locationName:"action" type:"structure"` + + // The name of the pipeline. This is a user-specified value. Pipeline names + // must be unique across all pipeline names under an Amazon Web Services account. + PipelineName *string `locationName:"pipelineName" min:"1" type:"string"` + + // The stage of the pipeline. + Stage *StageContext `locationName:"stage" type:"structure"` +} + +// String returns the string representation +func (s PipelineContext) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PipelineContext) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *PipelineContext) SetAction(v *ActionContext) *PipelineContext { + s.Action = v + return s +} + +// SetPipelineName sets the PipelineName field's value. +func (s *PipelineContext) SetPipelineName(v string) *PipelineContext { + s.PipelineName = &v + return s +} + +// SetStage sets the Stage field's value. +func (s *PipelineContext) SetStage(v *StageContext) *PipelineContext { + s.Stage = v + return s +} + +// Represents the structure of actions and stages to be performed in the pipeline. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PipelineDeclaration +type PipelineDeclaration struct { + _ struct{} `type:"structure"` + + // The Amazon S3 location where artifacts are stored for the pipeline. If this + // Amazon S3 bucket is created manually, it must meet the requirements for AWS + // CodePipeline. For more information, see the Concepts (http://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#CPS3Bucket). + // + // ArtifactStore is a required field + ArtifactStore *ArtifactStore `locationName:"artifactStore" type:"structure" required:"true"` + + // The name of the action to be performed. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) for AWS CodePipeline to use to either perform + // actions with no actionRoleArn, or to use to assume roles for actions with + // an actionRoleArn. + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" type:"string" required:"true"` + + // The stage in which to perform the action. + // + // Stages is a required field + Stages []*StageDeclaration `locationName:"stages" type:"list" required:"true"` + + // The version number of the pipeline. A new pipeline always has a version number + // of 1. This number is automatically incremented when a pipeline is updated. + Version *int64 `locationName:"version" min:"1" type:"integer"` +} + +// String returns the string representation +func (s PipelineDeclaration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PipelineDeclaration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PipelineDeclaration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PipelineDeclaration"} + if s.ArtifactStore == nil { + invalidParams.Add(request.NewErrParamRequired("ArtifactStore")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.Stages == nil { + invalidParams.Add(request.NewErrParamRequired("Stages")) + } + if s.Version != nil && *s.Version < 1 { + invalidParams.Add(request.NewErrParamMinValue("Version", 1)) + } + if s.ArtifactStore != nil { + if err := s.ArtifactStore.Validate(); err != nil { + invalidParams.AddNested("ArtifactStore", err.(request.ErrInvalidParams)) + } + } + if s.Stages != nil { + for i, v := range s.Stages { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Stages", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArtifactStore sets the ArtifactStore field's value. +func (s *PipelineDeclaration) SetArtifactStore(v *ArtifactStore) *PipelineDeclaration { + s.ArtifactStore = v + return s +} + +// SetName sets the Name field's value. +func (s *PipelineDeclaration) SetName(v string) *PipelineDeclaration { + s.Name = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *PipelineDeclaration) SetRoleArn(v string) *PipelineDeclaration { + s.RoleArn = &v + return s +} + +// SetStages sets the Stages field's value. +func (s *PipelineDeclaration) SetStages(v []*StageDeclaration) *PipelineDeclaration { + s.Stages = v + return s +} + +// SetVersion sets the Version field's value. +func (s *PipelineDeclaration) SetVersion(v int64) *PipelineDeclaration { + s.Version = &v + return s +} + +// Represents information about an execution of a pipeline. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PipelineExecution +type PipelineExecution struct { + _ struct{} `type:"structure"` + + // A list of ArtifactRevision objects included in a pipeline execution. + ArtifactRevisions []*ArtifactRevision `locationName:"artifactRevisions" type:"list"` + + // The ID of the pipeline execution. + PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string"` + + // The name of the pipeline that was executed. + PipelineName *string `locationName:"pipelineName" min:"1" type:"string"` + + // The version number of the pipeline that was executed. + PipelineVersion *int64 `locationName:"pipelineVersion" min:"1" type:"integer"` + + // The status of the pipeline execution. + // + // * InProgress: The pipeline execution is currently running. + // + // * Succeeded: The pipeline execution completed successfully. + // + // * Superseded: While this pipeline execution was waiting for the next stage + // to be completed, a newer pipeline execution caught up and continued through + // the pipeline instead. + // + // * Failed: The pipeline did not complete successfully. + Status *string `locationName:"status" type:"string" enum:"PipelineExecutionStatus"` +} + +// String returns the string representation +func (s PipelineExecution) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PipelineExecution) GoString() string { + return s.String() +} + +// SetArtifactRevisions sets the ArtifactRevisions field's value. +func (s *PipelineExecution) SetArtifactRevisions(v []*ArtifactRevision) *PipelineExecution { + s.ArtifactRevisions = v + return s +} + +// SetPipelineExecutionId sets the PipelineExecutionId field's value. +func (s *PipelineExecution) SetPipelineExecutionId(v string) *PipelineExecution { + s.PipelineExecutionId = &v + return s +} + +// SetPipelineName sets the PipelineName field's value. +func (s *PipelineExecution) SetPipelineName(v string) *PipelineExecution { + s.PipelineName = &v + return s +} + +// SetPipelineVersion sets the PipelineVersion field's value. +func (s *PipelineExecution) SetPipelineVersion(v int64) *PipelineExecution { + s.PipelineVersion = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *PipelineExecution) SetStatus(v string) *PipelineExecution { + s.Status = &v + return s +} + +// Returns a summary of a pipeline. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PipelineSummary +type PipelineSummary struct { + _ struct{} `type:"structure"` + + // The date and time the pipeline was created, in timestamp format. + Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + + // The name of the pipeline. + Name *string `locationName:"name" min:"1" type:"string"` + + // The date and time of the last update to the pipeline, in timestamp format. + Updated *time.Time `locationName:"updated" type:"timestamp" timestampFormat:"unix"` + + // The version number of the pipeline. + Version *int64 `locationName:"version" min:"1" type:"integer"` +} + +// String returns the string representation +func (s PipelineSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PipelineSummary) GoString() string { + return s.String() +} + +// SetCreated sets the Created field's value. +func (s *PipelineSummary) SetCreated(v time.Time) *PipelineSummary { + s.Created = &v + return s +} + +// SetName sets the Name field's value. +func (s *PipelineSummary) SetName(v string) *PipelineSummary { + s.Name = &v + return s +} + +// SetUpdated sets the Updated field's value. +func (s *PipelineSummary) SetUpdated(v time.Time) *PipelineSummary { + s.Updated = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *PipelineSummary) SetVersion(v int64) *PipelineSummary { + s.Version = &v + return s +} + +// Represents the input of a poll for jobs action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PollForJobsInput +type PollForJobsInput struct { + _ struct{} `type:"structure"` + + // Represents information about an action type. + // + // ActionTypeId is a required field + ActionTypeId *ActionTypeId `locationName:"actionTypeId" type:"structure" required:"true"` + + // The maximum number of jobs to return in a poll for jobs call. + MaxBatchSize *int64 `locationName:"maxBatchSize" min:"1" type:"integer"` + + // A map of property names and values. For an action type with no queryable + // properties, this value must be null or an empty map. For an action type with + // a queryable property, you must supply that property as a key in the map. + // Only jobs whose action configuration matches the mapped value will be returned. + QueryParam map[string]*string `locationName:"queryParam" type:"map"` +} + +// String returns the string representation +func (s PollForJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PollForJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PollForJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PollForJobsInput"} + if s.ActionTypeId == nil { + invalidParams.Add(request.NewErrParamRequired("ActionTypeId")) + } + if s.MaxBatchSize != nil && *s.MaxBatchSize < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxBatchSize", 1)) + } + if s.ActionTypeId != nil { + if err := s.ActionTypeId.Validate(); err != nil { + invalidParams.AddNested("ActionTypeId", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActionTypeId sets the ActionTypeId field's value. +func (s *PollForJobsInput) SetActionTypeId(v *ActionTypeId) *PollForJobsInput { + s.ActionTypeId = v + return s +} + +// SetMaxBatchSize sets the MaxBatchSize field's value. +func (s *PollForJobsInput) SetMaxBatchSize(v int64) *PollForJobsInput { + s.MaxBatchSize = &v + return s +} + +// SetQueryParam sets the QueryParam field's value. +func (s *PollForJobsInput) SetQueryParam(v map[string]*string) *PollForJobsInput { + s.QueryParam = v + return s +} + +// Represents the output of a poll for jobs action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PollForJobsOutput +type PollForJobsOutput struct { + _ struct{} `type:"structure"` + + // Information about the jobs to take action on. + Jobs []*Job `locationName:"jobs" type:"list"` +} + +// String returns the string representation +func (s PollForJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PollForJobsOutput) GoString() string { + return s.String() +} + +// SetJobs sets the Jobs field's value. +func (s *PollForJobsOutput) SetJobs(v []*Job) *PollForJobsOutput { + s.Jobs = v + return s +} + +// Represents the input of a poll for third party jobs action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PollForThirdPartyJobsInput +type PollForThirdPartyJobsInput struct { + _ struct{} `type:"structure"` + + // Represents information about an action type. + // + // ActionTypeId is a required field + ActionTypeId *ActionTypeId `locationName:"actionTypeId" type:"structure" required:"true"` + + // The maximum number of jobs to return in a poll for jobs call. + MaxBatchSize *int64 `locationName:"maxBatchSize" min:"1" type:"integer"` +} + +// String returns the string representation +func (s PollForThirdPartyJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PollForThirdPartyJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PollForThirdPartyJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PollForThirdPartyJobsInput"} + if s.ActionTypeId == nil { + invalidParams.Add(request.NewErrParamRequired("ActionTypeId")) + } + if s.MaxBatchSize != nil && *s.MaxBatchSize < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxBatchSize", 1)) + } + if s.ActionTypeId != nil { + if err := s.ActionTypeId.Validate(); err != nil { + invalidParams.AddNested("ActionTypeId", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActionTypeId sets the ActionTypeId field's value. +func (s *PollForThirdPartyJobsInput) SetActionTypeId(v *ActionTypeId) *PollForThirdPartyJobsInput { + s.ActionTypeId = v + return s +} + +// SetMaxBatchSize sets the MaxBatchSize field's value. +func (s *PollForThirdPartyJobsInput) SetMaxBatchSize(v int64) *PollForThirdPartyJobsInput { + s.MaxBatchSize = &v + return s +} + +// Represents the output of a poll for third party jobs action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PollForThirdPartyJobsOutput +type PollForThirdPartyJobsOutput struct { + _ struct{} `type:"structure"` + + // Information about the jobs to take action on. + Jobs []*ThirdPartyJob `locationName:"jobs" type:"list"` +} + +// String returns the string representation +func (s PollForThirdPartyJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PollForThirdPartyJobsOutput) GoString() string { + return s.String() +} + +// SetJobs sets the Jobs field's value. +func (s *PollForThirdPartyJobsOutput) SetJobs(v []*ThirdPartyJob) *PollForThirdPartyJobsOutput { + s.Jobs = v + return s +} + +// Represents the input of a put action revision action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutActionRevisionInput +type PutActionRevisionInput struct { + _ struct{} `type:"structure"` + + // The name of the action that will process the revision. + // + // ActionName is a required field + ActionName *string `locationName:"actionName" min:"1" type:"string" required:"true"` + + // Represents information about the version (or revision) of an action. + // + // ActionRevision is a required field + ActionRevision *ActionRevision `locationName:"actionRevision" type:"structure" required:"true"` + + // The name of the pipeline that will start processing the revision to the source. + // + // PipelineName is a required field + PipelineName *string `locationName:"pipelineName" min:"1" type:"string" required:"true"` + + // The name of the stage that contains the action that will act upon the revision. + // + // StageName is a required field + StageName *string `locationName:"stageName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutActionRevisionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutActionRevisionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutActionRevisionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutActionRevisionInput"} + if s.ActionName == nil { + invalidParams.Add(request.NewErrParamRequired("ActionName")) + } + if s.ActionName != nil && len(*s.ActionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ActionName", 1)) + } + if s.ActionRevision == nil { + invalidParams.Add(request.NewErrParamRequired("ActionRevision")) + } + if s.PipelineName == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineName")) + } + if s.PipelineName != nil && len(*s.PipelineName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineName", 1)) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } + if s.ActionRevision != nil { + if err := s.ActionRevision.Validate(); err != nil { + invalidParams.AddNested("ActionRevision", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActionName sets the ActionName field's value. +func (s *PutActionRevisionInput) SetActionName(v string) *PutActionRevisionInput { + s.ActionName = &v + return s +} + +// SetActionRevision sets the ActionRevision field's value. +func (s *PutActionRevisionInput) SetActionRevision(v *ActionRevision) *PutActionRevisionInput { + s.ActionRevision = v + return s +} + +// SetPipelineName sets the PipelineName field's value. +func (s *PutActionRevisionInput) SetPipelineName(v string) *PutActionRevisionInput { + s.PipelineName = &v + return s +} + +// SetStageName sets the StageName field's value. +func (s *PutActionRevisionInput) SetStageName(v string) *PutActionRevisionInput { + s.StageName = &v + return s +} + +// Represents the output of a put action revision action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutActionRevisionOutput +type PutActionRevisionOutput struct { + _ struct{} `type:"structure"` + + // Indicates whether the artifact revision was previously used in an execution + // of the specified pipeline. + NewRevision *bool `locationName:"newRevision" type:"boolean"` + + // The ID of the current workflow state of the pipeline. + PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string"` +} + +// String returns the string representation +func (s PutActionRevisionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutActionRevisionOutput) GoString() string { + return s.String() +} + +// SetNewRevision sets the NewRevision field's value. +func (s *PutActionRevisionOutput) SetNewRevision(v bool) *PutActionRevisionOutput { + s.NewRevision = &v + return s +} + +// SetPipelineExecutionId sets the PipelineExecutionId field's value. +func (s *PutActionRevisionOutput) SetPipelineExecutionId(v string) *PutActionRevisionOutput { + s.PipelineExecutionId = &v + return s +} + +// Represents the input of a put approval result action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutApprovalResultInput +type PutApprovalResultInput struct { + _ struct{} `type:"structure"` + + // The name of the action for which approval is requested. + // + // ActionName is a required field + ActionName *string `locationName:"actionName" min:"1" type:"string" required:"true"` + + // The name of the pipeline that contains the action. + // + // PipelineName is a required field + PipelineName *string `locationName:"pipelineName" min:"1" type:"string" required:"true"` + + // Represents information about the result of the approval request. + // + // Result is a required field + Result *ApprovalResult `locationName:"result" type:"structure" required:"true"` + + // The name of the stage that contains the action. + // + // StageName is a required field + StageName *string `locationName:"stageName" min:"1" type:"string" required:"true"` + + // The system-generated token used to identify a unique approval request. The + // token for each open approval request can be obtained using the GetPipelineState + // action and is used to validate that the approval request corresponding to + // this token is still valid. + // + // Token is a required field + Token *string `locationName:"token" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutApprovalResultInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutApprovalResultInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutApprovalResultInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutApprovalResultInput"} + if s.ActionName == nil { + invalidParams.Add(request.NewErrParamRequired("ActionName")) + } + if s.ActionName != nil && len(*s.ActionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ActionName", 1)) + } + if s.PipelineName == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineName")) + } + if s.PipelineName != nil && len(*s.PipelineName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineName", 1)) + } + if s.Result == nil { + invalidParams.Add(request.NewErrParamRequired("Result")) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } + if s.Token == nil { + invalidParams.Add(request.NewErrParamRequired("Token")) + } + if s.Result != nil { + if err := s.Result.Validate(); err != nil { + invalidParams.AddNested("Result", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActionName sets the ActionName field's value. +func (s *PutApprovalResultInput) SetActionName(v string) *PutApprovalResultInput { + s.ActionName = &v + return s +} + +// SetPipelineName sets the PipelineName field's value. +func (s *PutApprovalResultInput) SetPipelineName(v string) *PutApprovalResultInput { + s.PipelineName = &v + return s +} + +// SetResult sets the Result field's value. +func (s *PutApprovalResultInput) SetResult(v *ApprovalResult) *PutApprovalResultInput { + s.Result = v + return s +} + +// SetStageName sets the StageName field's value. +func (s *PutApprovalResultInput) SetStageName(v string) *PutApprovalResultInput { + s.StageName = &v + return s +} + +// SetToken sets the Token field's value. +func (s *PutApprovalResultInput) SetToken(v string) *PutApprovalResultInput { + s.Token = &v + return s +} + +// Represents the output of a put approval result action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutApprovalResultOutput +type PutApprovalResultOutput struct { + _ struct{} `type:"structure"` + + // The timestamp showing when the approval or rejection was submitted. + ApprovedAt *time.Time `locationName:"approvedAt" type:"timestamp" timestampFormat:"unix"` +} + +// String returns the string representation +func (s PutApprovalResultOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutApprovalResultOutput) GoString() string { + return s.String() +} + +// SetApprovedAt sets the ApprovedAt field's value. +func (s *PutApprovalResultOutput) SetApprovedAt(v time.Time) *PutApprovalResultOutput { + s.ApprovedAt = &v + return s +} + +// Represents the input of a put job failure result action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutJobFailureResultInput +type PutJobFailureResultInput struct { + _ struct{} `type:"structure"` + + // The details about the failure of a job. + // + // FailureDetails is a required field + FailureDetails *FailureDetails `locationName:"failureDetails" type:"structure" required:"true"` + + // The unique system-generated ID of the job that failed. This is the same ID + // returned from PollForJobs. + // + // JobId is a required field + JobId *string `locationName:"jobId" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutJobFailureResultInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutJobFailureResultInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutJobFailureResultInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutJobFailureResultInput"} + if s.FailureDetails == nil { + invalidParams.Add(request.NewErrParamRequired("FailureDetails")) + } + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.FailureDetails != nil { + if err := s.FailureDetails.Validate(); err != nil { + invalidParams.AddNested("FailureDetails", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFailureDetails sets the FailureDetails field's value. +func (s *PutJobFailureResultInput) SetFailureDetails(v *FailureDetails) *PutJobFailureResultInput { + s.FailureDetails = v + return s +} + +// SetJobId sets the JobId field's value. +func (s *PutJobFailureResultInput) SetJobId(v string) *PutJobFailureResultInput { + s.JobId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutJobFailureResultOutput +type PutJobFailureResultOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutJobFailureResultOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutJobFailureResultOutput) GoString() string { + return s.String() +} + +// Represents the input of a put job success result action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutJobSuccessResultInput +type PutJobSuccessResultInput struct { + _ struct{} `type:"structure"` + + // A token generated by a job worker, such as an AWS CodeDeploy deployment ID, + // that a successful job provides to identify a custom action in progress. Future + // jobs will use this token in order to identify the running instance of the + // action. It can be reused to return additional information about the progress + // of the custom action. When the action is complete, no continuation token + // should be supplied. + ContinuationToken *string `locationName:"continuationToken" type:"string"` + + // The ID of the current revision of the artifact successfully worked upon by + // the job. + CurrentRevision *CurrentRevision `locationName:"currentRevision" type:"structure"` + + // The execution details of the successful job, such as the actions taken by + // the job worker. + ExecutionDetails *ExecutionDetails `locationName:"executionDetails" type:"structure"` + + // The unique system-generated ID of the job that succeeded. This is the same + // ID returned from PollForJobs. + // + // JobId is a required field + JobId *string `locationName:"jobId" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutJobSuccessResultInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutJobSuccessResultInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutJobSuccessResultInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutJobSuccessResultInput"} + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.CurrentRevision != nil { + if err := s.CurrentRevision.Validate(); err != nil { + invalidParams.AddNested("CurrentRevision", err.(request.ErrInvalidParams)) + } + } + if s.ExecutionDetails != nil { + if err := s.ExecutionDetails.Validate(); err != nil { + invalidParams.AddNested("ExecutionDetails", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContinuationToken sets the ContinuationToken field's value. +func (s *PutJobSuccessResultInput) SetContinuationToken(v string) *PutJobSuccessResultInput { + s.ContinuationToken = &v + return s +} + +// SetCurrentRevision sets the CurrentRevision field's value. +func (s *PutJobSuccessResultInput) SetCurrentRevision(v *CurrentRevision) *PutJobSuccessResultInput { + s.CurrentRevision = v + return s +} + +// SetExecutionDetails sets the ExecutionDetails field's value. +func (s *PutJobSuccessResultInput) SetExecutionDetails(v *ExecutionDetails) *PutJobSuccessResultInput { + s.ExecutionDetails = v + return s +} + +// SetJobId sets the JobId field's value. +func (s *PutJobSuccessResultInput) SetJobId(v string) *PutJobSuccessResultInput { + s.JobId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutJobSuccessResultOutput +type PutJobSuccessResultOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutJobSuccessResultOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutJobSuccessResultOutput) GoString() string { + return s.String() +} + +// Represents the input of a third party job failure result action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutThirdPartyJobFailureResultInput +type PutThirdPartyJobFailureResultInput struct { + _ struct{} `type:"structure"` + + // The clientToken portion of the clientId and clientToken pair used to verify + // that the calling entity is allowed access to the job and its details. + // + // ClientToken is a required field + ClientToken *string `locationName:"clientToken" type:"string" required:"true"` + + // Represents information about failure details. + // + // FailureDetails is a required field + FailureDetails *FailureDetails `locationName:"failureDetails" type:"structure" required:"true"` + + // The ID of the job that failed. This is the same ID returned from PollForThirdPartyJobs. + // + // JobId is a required field + JobId *string `locationName:"jobId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutThirdPartyJobFailureResultInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutThirdPartyJobFailureResultInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutThirdPartyJobFailureResultInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutThirdPartyJobFailureResultInput"} + if s.ClientToken == nil { + invalidParams.Add(request.NewErrParamRequired("ClientToken")) + } + if s.FailureDetails == nil { + invalidParams.Add(request.NewErrParamRequired("FailureDetails")) + } + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) + } + if s.FailureDetails != nil { + if err := s.FailureDetails.Validate(); err != nil { + invalidParams.AddNested("FailureDetails", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *PutThirdPartyJobFailureResultInput) SetClientToken(v string) *PutThirdPartyJobFailureResultInput { + s.ClientToken = &v + return s +} + +// SetFailureDetails sets the FailureDetails field's value. +func (s *PutThirdPartyJobFailureResultInput) SetFailureDetails(v *FailureDetails) *PutThirdPartyJobFailureResultInput { + s.FailureDetails = v + return s +} + +// SetJobId sets the JobId field's value. +func (s *PutThirdPartyJobFailureResultInput) SetJobId(v string) *PutThirdPartyJobFailureResultInput { + s.JobId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutThirdPartyJobFailureResultOutput +type PutThirdPartyJobFailureResultOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutThirdPartyJobFailureResultOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutThirdPartyJobFailureResultOutput) GoString() string { + return s.String() +} + +// Represents the input of a put third party job success result action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutThirdPartyJobSuccessResultInput +type PutThirdPartyJobSuccessResultInput struct { + _ struct{} `type:"structure"` + + // The clientToken portion of the clientId and clientToken pair used to verify + // that the calling entity is allowed access to the job and its details. + // + // ClientToken is a required field + ClientToken *string `locationName:"clientToken" type:"string" required:"true"` + + // A token generated by a job worker, such as an AWS CodeDeploy deployment ID, + // that a successful job provides to identify a partner action in progress. + // Future jobs will use this token in order to identify the running instance + // of the action. It can be reused to return additional information about the + // progress of the partner action. When the action is complete, no continuation + // token should be supplied. + ContinuationToken *string `locationName:"continuationToken" type:"string"` + + // Represents information about a current revision. + CurrentRevision *CurrentRevision `locationName:"currentRevision" type:"structure"` + + // The details of the actions taken and results produced on an artifact as it + // passes through stages in the pipeline. + ExecutionDetails *ExecutionDetails `locationName:"executionDetails" type:"structure"` + + // The ID of the job that successfully completed. This is the same ID returned + // from PollForThirdPartyJobs. + // + // JobId is a required field + JobId *string `locationName:"jobId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutThirdPartyJobSuccessResultInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutThirdPartyJobSuccessResultInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutThirdPartyJobSuccessResultInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutThirdPartyJobSuccessResultInput"} + if s.ClientToken == nil { + invalidParams.Add(request.NewErrParamRequired("ClientToken")) + } + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) + } + if s.CurrentRevision != nil { + if err := s.CurrentRevision.Validate(); err != nil { + invalidParams.AddNested("CurrentRevision", err.(request.ErrInvalidParams)) + } + } + if s.ExecutionDetails != nil { + if err := s.ExecutionDetails.Validate(); err != nil { + invalidParams.AddNested("ExecutionDetails", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *PutThirdPartyJobSuccessResultInput) SetClientToken(v string) *PutThirdPartyJobSuccessResultInput { + s.ClientToken = &v + return s +} + +// SetContinuationToken sets the ContinuationToken field's value. +func (s *PutThirdPartyJobSuccessResultInput) SetContinuationToken(v string) *PutThirdPartyJobSuccessResultInput { + s.ContinuationToken = &v + return s +} + +// SetCurrentRevision sets the CurrentRevision field's value. +func (s *PutThirdPartyJobSuccessResultInput) SetCurrentRevision(v *CurrentRevision) *PutThirdPartyJobSuccessResultInput { + s.CurrentRevision = v + return s +} + +// SetExecutionDetails sets the ExecutionDetails field's value. +func (s *PutThirdPartyJobSuccessResultInput) SetExecutionDetails(v *ExecutionDetails) *PutThirdPartyJobSuccessResultInput { + s.ExecutionDetails = v + return s +} + +// SetJobId sets the JobId field's value. +func (s *PutThirdPartyJobSuccessResultInput) SetJobId(v string) *PutThirdPartyJobSuccessResultInput { + s.JobId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutThirdPartyJobSuccessResultOutput +type PutThirdPartyJobSuccessResultOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutThirdPartyJobSuccessResultOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutThirdPartyJobSuccessResultOutput) GoString() string { + return s.String() +} + +// Represents the input of a retry stage execution action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RetryStageExecutionInput +type RetryStageExecutionInput struct { + _ struct{} `type:"structure"` + + // The ID of the pipeline execution in the failed stage to be retried. Use the + // GetPipelineState action to retrieve the current pipelineExecutionId of the + // failed stage + // + // PipelineExecutionId is a required field + PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string" required:"true"` + + // The name of the pipeline that contains the failed stage. + // + // PipelineName is a required field + PipelineName *string `locationName:"pipelineName" min:"1" type:"string" required:"true"` + + // The scope of the retry attempt. Currently, the only supported value is FAILED_ACTIONS. + // + // RetryMode is a required field + RetryMode *string `locationName:"retryMode" type:"string" required:"true" enum:"StageRetryMode"` + + // The name of the failed stage to be retried. + // + // StageName is a required field + StageName *string `locationName:"stageName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RetryStageExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetryStageExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RetryStageExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RetryStageExecutionInput"} + if s.PipelineExecutionId == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineExecutionId")) + } + if s.PipelineName == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineName")) + } + if s.PipelineName != nil && len(*s.PipelineName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineName", 1)) + } + if s.RetryMode == nil { + invalidParams.Add(request.NewErrParamRequired("RetryMode")) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPipelineExecutionId sets the PipelineExecutionId field's value. +func (s *RetryStageExecutionInput) SetPipelineExecutionId(v string) *RetryStageExecutionInput { + s.PipelineExecutionId = &v + return s +} + +// SetPipelineName sets the PipelineName field's value. +func (s *RetryStageExecutionInput) SetPipelineName(v string) *RetryStageExecutionInput { + s.PipelineName = &v + return s +} + +// SetRetryMode sets the RetryMode field's value. +func (s *RetryStageExecutionInput) SetRetryMode(v string) *RetryStageExecutionInput { + s.RetryMode = &v + return s +} + +// SetStageName sets the StageName field's value. +func (s *RetryStageExecutionInput) SetStageName(v string) *RetryStageExecutionInput { + s.StageName = &v + return s +} + +// Represents the output of a retry stage execution action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RetryStageExecutionOutput +type RetryStageExecutionOutput struct { + _ struct{} `type:"structure"` + + // The ID of the current workflow execution in the failed stage. + PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string"` +} + +// String returns the string representation +func (s RetryStageExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetryStageExecutionOutput) GoString() string { + return s.String() +} + +// SetPipelineExecutionId sets the PipelineExecutionId field's value. +func (s *RetryStageExecutionOutput) SetPipelineExecutionId(v string) *RetryStageExecutionOutput { + s.PipelineExecutionId = &v + return s +} + +// The location of the Amazon S3 bucket that contains a revision. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/S3ArtifactLocation +type S3ArtifactLocation struct { + _ struct{} `type:"structure"` + + // The name of the Amazon S3 bucket. + // + // BucketName is a required field + BucketName *string `locationName:"bucketName" type:"string" required:"true"` + + // The key of the object in the Amazon S3 bucket, which uniquely identifies + // the object in the bucket. + // + // ObjectKey is a required field + ObjectKey *string `locationName:"objectKey" type:"string" required:"true"` +} + +// String returns the string representation +func (s S3ArtifactLocation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3ArtifactLocation) GoString() string { + return s.String() +} + +// SetBucketName sets the BucketName field's value. +func (s *S3ArtifactLocation) SetBucketName(v string) *S3ArtifactLocation { + s.BucketName = &v + return s +} + +// SetObjectKey sets the ObjectKey field's value. +func (s *S3ArtifactLocation) SetObjectKey(v string) *S3ArtifactLocation { + s.ObjectKey = &v + return s +} + +// Represents information about a stage to a job worker. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/StageContext +type StageContext struct { + _ struct{} `type:"structure"` + + // The name of the stage. + Name *string `locationName:"name" min:"1" type:"string"` +} + +// String returns the string representation +func (s StageContext) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StageContext) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *StageContext) SetName(v string) *StageContext { + s.Name = &v + return s +} + +// Represents information about a stage and its definition. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/StageDeclaration +type StageDeclaration struct { + _ struct{} `type:"structure"` + + // The actions included in a stage. + // + // Actions is a required field + Actions []*ActionDeclaration `locationName:"actions" type:"list" required:"true"` + + // Reserved for future use. + Blockers []*BlockerDeclaration `locationName:"blockers" type:"list"` + + // The name of the stage. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StageDeclaration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StageDeclaration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StageDeclaration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StageDeclaration"} + if s.Actions == nil { + invalidParams.Add(request.NewErrParamRequired("Actions")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.Actions != nil { + for i, v := range s.Actions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Actions", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Blockers != nil { + for i, v := range s.Blockers { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Blockers", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActions sets the Actions field's value. +func (s *StageDeclaration) SetActions(v []*ActionDeclaration) *StageDeclaration { + s.Actions = v + return s +} + +// SetBlockers sets the Blockers field's value. +func (s *StageDeclaration) SetBlockers(v []*BlockerDeclaration) *StageDeclaration { + s.Blockers = v + return s +} + +// SetName sets the Name field's value. +func (s *StageDeclaration) SetName(v string) *StageDeclaration { + s.Name = &v + return s +} + +// Represents information about the run of a stage. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/StageExecution +type StageExecution struct { + _ struct{} `type:"structure"` + + // The ID of the pipeline execution associated with the stage. + // + // PipelineExecutionId is a required field + PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string" required:"true"` + + // The status of the stage, or for a completed stage, the last status of the + // stage. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"StageExecutionStatus"` +} + +// String returns the string representation +func (s StageExecution) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StageExecution) GoString() string { + return s.String() +} + +// SetPipelineExecutionId sets the PipelineExecutionId field's value. +func (s *StageExecution) SetPipelineExecutionId(v string) *StageExecution { + s.PipelineExecutionId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *StageExecution) SetStatus(v string) *StageExecution { + s.Status = &v + return s +} + +// Represents information about the state of the stage. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/StageState +type StageState struct { + _ struct{} `type:"structure"` + + // The state of the stage. + ActionStates []*ActionState `locationName:"actionStates" type:"list"` + + // The state of the inbound transition, which is either enabled or disabled. + InboundTransitionState *TransitionState `locationName:"inboundTransitionState" type:"structure"` + + // Information about the latest execution in the stage, including its ID and + // status. + LatestExecution *StageExecution `locationName:"latestExecution" type:"structure"` + + // The name of the stage. + StageName *string `locationName:"stageName" min:"1" type:"string"` +} + +// String returns the string representation +func (s StageState) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StageState) GoString() string { + return s.String() +} + +// SetActionStates sets the ActionStates field's value. +func (s *StageState) SetActionStates(v []*ActionState) *StageState { + s.ActionStates = v + return s +} + +// SetInboundTransitionState sets the InboundTransitionState field's value. +func (s *StageState) SetInboundTransitionState(v *TransitionState) *StageState { + s.InboundTransitionState = v + return s +} + +// SetLatestExecution sets the LatestExecution field's value. +func (s *StageState) SetLatestExecution(v *StageExecution) *StageState { + s.LatestExecution = v + return s +} + +// SetStageName sets the StageName field's value. +func (s *StageState) SetStageName(v string) *StageState { + s.StageName = &v + return s +} + +// Represents the input of a start pipeline execution action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/StartPipelineExecutionInput +type StartPipelineExecutionInput struct { + _ struct{} `type:"structure"` + + // The name of the pipeline to start. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartPipelineExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartPipelineExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartPipelineExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartPipelineExecutionInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *StartPipelineExecutionInput) SetName(v string) *StartPipelineExecutionInput { + s.Name = &v + return s +} + +// Represents the output of a start pipeline execution action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/StartPipelineExecutionOutput +type StartPipelineExecutionOutput struct { + _ struct{} `type:"structure"` + + // The unique system-generated ID of the pipeline execution that was started. + PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string"` +} + +// String returns the string representation +func (s StartPipelineExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartPipelineExecutionOutput) GoString() string { + return s.String() +} + +// SetPipelineExecutionId sets the PipelineExecutionId field's value. +func (s *StartPipelineExecutionOutput) SetPipelineExecutionId(v string) *StartPipelineExecutionOutput { + s.PipelineExecutionId = &v + return s +} + +// A response to a PollForThirdPartyJobs request returned by AWS CodePipeline +// when there is a job to be worked upon by a partner action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ThirdPartyJob +type ThirdPartyJob struct { + _ struct{} `type:"structure"` + + // The clientToken portion of the clientId and clientToken pair used to verify + // that the calling entity is allowed access to the job and its details. + ClientId *string `locationName:"clientId" type:"string"` + + // The identifier used to identify the job in AWS CodePipeline. + JobId *string `locationName:"jobId" type:"string"` +} + +// String returns the string representation +func (s ThirdPartyJob) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ThirdPartyJob) GoString() string { + return s.String() +} + +// SetClientId sets the ClientId field's value. +func (s *ThirdPartyJob) SetClientId(v string) *ThirdPartyJob { + s.ClientId = &v + return s +} + +// SetJobId sets the JobId field's value. +func (s *ThirdPartyJob) SetJobId(v string) *ThirdPartyJob { + s.JobId = &v + return s +} + +// Represents information about the job data for a partner action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ThirdPartyJobData +type ThirdPartyJobData struct { + _ struct{} `type:"structure"` + + // Represents information about an action configuration. + ActionConfiguration *ActionConfiguration `locationName:"actionConfiguration" type:"structure"` + + // Represents information about an action type. + ActionTypeId *ActionTypeId `locationName:"actionTypeId" type:"structure"` + + // Represents an AWS session credentials object. These credentials are temporary + // credentials that are issued by AWS Secure Token Service (STS). They can be + // used to access input and output artifacts in the Amazon S3 bucket used to + // store artifact for the pipeline in AWS CodePipeline. + ArtifactCredentials *AWSSessionCredentials `locationName:"artifactCredentials" type:"structure"` + + // A system-generated token, such as a AWS CodeDeploy deployment ID, that a + // job requires in order to continue the job asynchronously. + ContinuationToken *string `locationName:"continuationToken" type:"string"` + + // The encryption key used to encrypt and decrypt data in the artifact store + // for the pipeline, such as an AWS Key Management Service (AWS KMS) key. This + // is optional and might not be present. + 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 + // the name of an output artifact generated by an action in an earlier action + // or stage of the pipeline. + InputArtifacts []*Artifact `locationName:"inputArtifacts" type:"list"` + + // The name of the artifact that will be the result of the action, if any. This + // name might be system-generated, such as "MyBuiltApp", or might be defined + // by the user when the action is created. + OutputArtifacts []*Artifact `locationName:"outputArtifacts" type:"list"` + + // Represents information about a pipeline to a job worker. + PipelineContext *PipelineContext `locationName:"pipelineContext" type:"structure"` +} + +// String returns the string representation +func (s ThirdPartyJobData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ThirdPartyJobData) GoString() string { + return s.String() +} + +// SetActionConfiguration sets the ActionConfiguration field's value. +func (s *ThirdPartyJobData) SetActionConfiguration(v *ActionConfiguration) *ThirdPartyJobData { + s.ActionConfiguration = v + return s +} + +// SetActionTypeId sets the ActionTypeId field's value. +func (s *ThirdPartyJobData) SetActionTypeId(v *ActionTypeId) *ThirdPartyJobData { + s.ActionTypeId = v + return s +} + +// SetArtifactCredentials sets the ArtifactCredentials field's value. +func (s *ThirdPartyJobData) SetArtifactCredentials(v *AWSSessionCredentials) *ThirdPartyJobData { + s.ArtifactCredentials = v + return s +} + +// SetContinuationToken sets the ContinuationToken field's value. +func (s *ThirdPartyJobData) SetContinuationToken(v string) *ThirdPartyJobData { + s.ContinuationToken = &v + return s +} + +// SetEncryptionKey sets the EncryptionKey field's value. +func (s *ThirdPartyJobData) SetEncryptionKey(v *EncryptionKey) *ThirdPartyJobData { + s.EncryptionKey = v + return s +} + +// SetInputArtifacts sets the InputArtifacts field's value. +func (s *ThirdPartyJobData) SetInputArtifacts(v []*Artifact) *ThirdPartyJobData { + s.InputArtifacts = v + return s +} + +// SetOutputArtifacts sets the OutputArtifacts field's value. +func (s *ThirdPartyJobData) SetOutputArtifacts(v []*Artifact) *ThirdPartyJobData { + s.OutputArtifacts = v + return s +} + +// SetPipelineContext sets the PipelineContext field's value. +func (s *ThirdPartyJobData) SetPipelineContext(v *PipelineContext) *ThirdPartyJobData { + s.PipelineContext = v + return s +} + +// The details of a job sent in response to a GetThirdPartyJobDetails request. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ThirdPartyJobDetails +type ThirdPartyJobDetails struct { + _ struct{} `type:"structure"` + + // The data to be returned by the third party job worker. + Data *ThirdPartyJobData `locationName:"data" type:"structure"` + + // The identifier used to identify the job details in AWS CodePipeline. + Id *string `locationName:"id" min:"1" type:"string"` + + // A system-generated random number that AWS CodePipeline uses to ensure that + // the job is being worked on by only one job worker. Use this number in an + // AcknowledgeThirdPartyJob request. + Nonce *string `locationName:"nonce" type:"string"` +} + +// String returns the string representation +func (s ThirdPartyJobDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ThirdPartyJobDetails) GoString() string { + return s.String() +} + +// SetData sets the Data field's value. +func (s *ThirdPartyJobDetails) SetData(v *ThirdPartyJobData) *ThirdPartyJobDetails { + s.Data = v + return s +} + +// SetId sets the Id field's value. +func (s *ThirdPartyJobDetails) SetId(v string) *ThirdPartyJobDetails { + s.Id = &v + return s +} + +// SetNonce sets the Nonce field's value. +func (s *ThirdPartyJobDetails) SetNonce(v string) *ThirdPartyJobDetails { + s.Nonce = &v + return s +} + +// Represents information about the state of transitions between one stage and +// another stage. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/TransitionState +type TransitionState struct { + _ struct{} `type:"structure"` + + // The user-specified reason why the transition between two stages of a pipeline + // was disabled. + DisabledReason *string `locationName:"disabledReason" min:"1" type:"string"` + + // Whether the transition between stages is enabled (true) or disabled (false). + Enabled *bool `locationName:"enabled" type:"boolean"` + + // The timestamp when the transition state was last changed. + LastChangedAt *time.Time `locationName:"lastChangedAt" type:"timestamp" timestampFormat:"unix"` + + // The ID of the user who last changed the transition state. + LastChangedBy *string `locationName:"lastChangedBy" type:"string"` +} + +// String returns the string representation +func (s TransitionState) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitionState) GoString() string { + return s.String() +} + +// SetDisabledReason sets the DisabledReason field's value. +func (s *TransitionState) SetDisabledReason(v string) *TransitionState { + s.DisabledReason = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *TransitionState) SetEnabled(v bool) *TransitionState { + s.Enabled = &v + return s +} + +// SetLastChangedAt sets the LastChangedAt field's value. +func (s *TransitionState) SetLastChangedAt(v time.Time) *TransitionState { + s.LastChangedAt = &v + return s +} + +// SetLastChangedBy sets the LastChangedBy field's value. +func (s *TransitionState) SetLastChangedBy(v string) *TransitionState { + s.LastChangedBy = &v + return s +} + +// Represents the input of an update pipeline action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/UpdatePipelineInput +type UpdatePipelineInput struct { + _ struct{} `type:"structure"` + + // The name of the pipeline to be updated. + // + // Pipeline is a required field + Pipeline *PipelineDeclaration `locationName:"pipeline" type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdatePipelineInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdatePipelineInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdatePipelineInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdatePipelineInput"} + if s.Pipeline == nil { + invalidParams.Add(request.NewErrParamRequired("Pipeline")) + } + if s.Pipeline != nil { + if err := s.Pipeline.Validate(); err != nil { + invalidParams.AddNested("Pipeline", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPipeline sets the Pipeline field's value. +func (s *UpdatePipelineInput) SetPipeline(v *PipelineDeclaration) *UpdatePipelineInput { + s.Pipeline = v + return s +} + +// Represents the output of an update pipeline action. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/UpdatePipelineOutput +type UpdatePipelineOutput struct { + _ struct{} `type:"structure"` + + // The structure of the updated pipeline. + Pipeline *PipelineDeclaration `locationName:"pipeline" type:"structure"` +} + +// String returns the string representation +func (s UpdatePipelineOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdatePipelineOutput) GoString() string { + return s.String() +} + +// SetPipeline sets the Pipeline field's value. +func (s *UpdatePipelineOutput) SetPipeline(v *PipelineDeclaration) *UpdatePipelineOutput { + s.Pipeline = v + return s +} + +const ( + // ActionCategorySource is a ActionCategory enum value + ActionCategorySource = "Source" + + // ActionCategoryBuild is a ActionCategory enum value + ActionCategoryBuild = "Build" + + // ActionCategoryDeploy is a ActionCategory enum value + ActionCategoryDeploy = "Deploy" + + // ActionCategoryTest is a ActionCategory enum value + ActionCategoryTest = "Test" + + // ActionCategoryInvoke is a ActionCategory enum value + ActionCategoryInvoke = "Invoke" + + // ActionCategoryApproval is a ActionCategory enum value + ActionCategoryApproval = "Approval" +) + +const ( + // ActionConfigurationPropertyTypeString is a ActionConfigurationPropertyType enum value + ActionConfigurationPropertyTypeString = "String" + + // ActionConfigurationPropertyTypeNumber is a ActionConfigurationPropertyType enum value + ActionConfigurationPropertyTypeNumber = "Number" + + // ActionConfigurationPropertyTypeBoolean is a ActionConfigurationPropertyType enum value + ActionConfigurationPropertyTypeBoolean = "Boolean" +) + +const ( + // ActionExecutionStatusInProgress is a ActionExecutionStatus enum value + ActionExecutionStatusInProgress = "InProgress" + + // ActionExecutionStatusSucceeded is a ActionExecutionStatus enum value + ActionExecutionStatusSucceeded = "Succeeded" + + // ActionExecutionStatusFailed is a ActionExecutionStatus enum value + ActionExecutionStatusFailed = "Failed" +) + +const ( + // ActionOwnerAws is a ActionOwner enum value + ActionOwnerAws = "AWS" + + // ActionOwnerThirdParty is a ActionOwner enum value + ActionOwnerThirdParty = "ThirdParty" + + // ActionOwnerCustom is a ActionOwner enum value + ActionOwnerCustom = "Custom" +) + +const ( + // ApprovalStatusApproved is a ApprovalStatus enum value + ApprovalStatusApproved = "Approved" + + // ApprovalStatusRejected is a ApprovalStatus enum value + ApprovalStatusRejected = "Rejected" +) + +const ( + // ArtifactLocationTypeS3 is a ArtifactLocationType enum value + ArtifactLocationTypeS3 = "S3" +) + +const ( + // ArtifactStoreTypeS3 is a ArtifactStoreType enum value + ArtifactStoreTypeS3 = "S3" +) + +const ( + // BlockerTypeSchedule is a BlockerType enum value + BlockerTypeSchedule = "Schedule" +) + +const ( + // EncryptionKeyTypeKms is a EncryptionKeyType enum value + EncryptionKeyTypeKms = "KMS" +) + +const ( + // FailureTypeJobFailed is a FailureType enum value + FailureTypeJobFailed = "JobFailed" + + // FailureTypeConfigurationError is a FailureType enum value + FailureTypeConfigurationError = "ConfigurationError" + + // FailureTypePermissionError is a FailureType enum value + FailureTypePermissionError = "PermissionError" + + // FailureTypeRevisionOutOfSync is a FailureType enum value + FailureTypeRevisionOutOfSync = "RevisionOutOfSync" + + // FailureTypeRevisionUnavailable is a FailureType enum value + FailureTypeRevisionUnavailable = "RevisionUnavailable" + + // FailureTypeSystemUnavailable is a FailureType enum value + FailureTypeSystemUnavailable = "SystemUnavailable" +) + +const ( + // JobStatusCreated is a JobStatus enum value + JobStatusCreated = "Created" + + // JobStatusQueued is a JobStatus enum value + JobStatusQueued = "Queued" + + // JobStatusDispatched is a JobStatus enum value + JobStatusDispatched = "Dispatched" + + // JobStatusInProgress is a JobStatus enum value + JobStatusInProgress = "InProgress" + + // JobStatusTimedOut is a JobStatus enum value + JobStatusTimedOut = "TimedOut" + + // JobStatusSucceeded is a JobStatus enum value + JobStatusSucceeded = "Succeeded" + + // JobStatusFailed is a JobStatus enum value + JobStatusFailed = "Failed" +) + +const ( + // PipelineExecutionStatusInProgress is a PipelineExecutionStatus enum value + PipelineExecutionStatusInProgress = "InProgress" + + // PipelineExecutionStatusSucceeded is a PipelineExecutionStatus enum value + PipelineExecutionStatusSucceeded = "Succeeded" + + // PipelineExecutionStatusSuperseded is a PipelineExecutionStatus enum value + PipelineExecutionStatusSuperseded = "Superseded" + + // PipelineExecutionStatusFailed is a PipelineExecutionStatus enum value + PipelineExecutionStatusFailed = "Failed" +) + +const ( + // StageExecutionStatusInProgress is a StageExecutionStatus enum value + StageExecutionStatusInProgress = "InProgress" + + // StageExecutionStatusFailed is a StageExecutionStatus enum value + StageExecutionStatusFailed = "Failed" + + // StageExecutionStatusSucceeded is a StageExecutionStatus enum value + StageExecutionStatusSucceeded = "Succeeded" +) + +const ( + // StageRetryModeFailedActions is a StageRetryMode enum value + StageRetryModeFailedActions = "FAILED_ACTIONS" +) + +const ( + // StageTransitionTypeInbound is a StageTransitionType enum value + StageTransitionTypeInbound = "Inbound" + + // StageTransitionTypeOutbound is a StageTransitionType enum value + StageTransitionTypeOutbound = "Outbound" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go new file mode 100644 index 000000000..7e664c0e7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go @@ -0,0 +1,152 @@ +// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. + +package codepipeline + +const ( + + // ErrCodeActionNotFoundException for service response error code + // "ActionNotFoundException". + // + // The specified action cannot be found. + ErrCodeActionNotFoundException = "ActionNotFoundException" + + // ErrCodeActionTypeNotFoundException for service response error code + // "ActionTypeNotFoundException". + // + // The specified action type cannot be found. + ErrCodeActionTypeNotFoundException = "ActionTypeNotFoundException" + + // ErrCodeApprovalAlreadyCompletedException for service response error code + // "ApprovalAlreadyCompletedException". + // + // The approval action has already been approved or rejected. + ErrCodeApprovalAlreadyCompletedException = "ApprovalAlreadyCompletedException" + + // ErrCodeInvalidActionDeclarationException for service response error code + // "InvalidActionDeclarationException". + // + // The specified action declaration was specified in an invalid format. + ErrCodeInvalidActionDeclarationException = "InvalidActionDeclarationException" + + // ErrCodeInvalidApprovalTokenException for service response error code + // "InvalidApprovalTokenException". + // + // The approval request already received a response or has expired. + ErrCodeInvalidApprovalTokenException = "InvalidApprovalTokenException" + + // ErrCodeInvalidBlockerDeclarationException for service response error code + // "InvalidBlockerDeclarationException". + // + // Reserved for future use. + ErrCodeInvalidBlockerDeclarationException = "InvalidBlockerDeclarationException" + + // ErrCodeInvalidClientTokenException for service response error code + // "InvalidClientTokenException". + // + // The client token was specified in an invalid format + ErrCodeInvalidClientTokenException = "InvalidClientTokenException" + + // ErrCodeInvalidJobException for service response error code + // "InvalidJobException". + // + // The specified job was specified in an invalid format or cannot be found. + ErrCodeInvalidJobException = "InvalidJobException" + + // ErrCodeInvalidJobStateException for service response error code + // "InvalidJobStateException". + // + // The specified job state was specified in an invalid format. + ErrCodeInvalidJobStateException = "InvalidJobStateException" + + // ErrCodeInvalidNextTokenException for service response error code + // "InvalidNextTokenException". + // + // The next token was specified in an invalid format. Make sure that the next + // token you provided is the token returned by a previous call. + ErrCodeInvalidNextTokenException = "InvalidNextTokenException" + + // ErrCodeInvalidNonceException for service response error code + // "InvalidNonceException". + // + // The specified nonce was specified in an invalid format. + ErrCodeInvalidNonceException = "InvalidNonceException" + + // ErrCodeInvalidStageDeclarationException for service response error code + // "InvalidStageDeclarationException". + // + // The specified stage declaration was specified in an invalid format. + ErrCodeInvalidStageDeclarationException = "InvalidStageDeclarationException" + + // ErrCodeInvalidStructureException for service response error code + // "InvalidStructureException". + // + // The specified structure was specified in an invalid format. + ErrCodeInvalidStructureException = "InvalidStructureException" + + // ErrCodeJobNotFoundException for service response error code + // "JobNotFoundException". + // + // The specified job was specified in an invalid format or cannot be found. + ErrCodeJobNotFoundException = "JobNotFoundException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // The number of pipelines associated with the AWS account has exceeded the + // limit allowed for the account. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeNotLatestPipelineExecutionException for service response error code + // "NotLatestPipelineExecutionException". + // + // The stage has failed in a later run of the pipeline and the pipelineExecutionId + // associated with the request is out of date. + ErrCodeNotLatestPipelineExecutionException = "NotLatestPipelineExecutionException" + + // ErrCodePipelineExecutionNotFoundException for service response error code + // "PipelineExecutionNotFoundException". + // + // The pipeline execution was specified in an invalid format or cannot be found, + // or an execution ID does not belong to the specified pipeline. + ErrCodePipelineExecutionNotFoundException = "PipelineExecutionNotFoundException" + + // ErrCodePipelineNameInUseException for service response error code + // "PipelineNameInUseException". + // + // The specified pipeline name is already in use. + ErrCodePipelineNameInUseException = "PipelineNameInUseException" + + // ErrCodePipelineNotFoundException for service response error code + // "PipelineNotFoundException". + // + // The specified pipeline was specified in an invalid format or cannot be found. + ErrCodePipelineNotFoundException = "PipelineNotFoundException" + + // ErrCodePipelineVersionNotFoundException for service response error code + // "PipelineVersionNotFoundException". + // + // The specified pipeline version was specified in an invalid format or cannot + // be found. + ErrCodePipelineVersionNotFoundException = "PipelineVersionNotFoundException" + + // ErrCodeStageNotFoundException for service response error code + // "StageNotFoundException". + // + // The specified stage was specified in an invalid format or cannot be found. + ErrCodeStageNotFoundException = "StageNotFoundException" + + // ErrCodeStageNotRetryableException for service response error code + // "StageNotRetryableException". + // + // The specified stage can't be retried because the pipeline structure or stage + // state changed after the stage was not completed; the stage contains no failed + // actions; one or more actions are still in progress; or another retry attempt + // is already in progress. + ErrCodeStageNotRetryableException = "StageNotRetryableException" + + // ErrCodeValidationException for service response error code + // "ValidationException". + // + // The validation was specified in an invalid format. + ErrCodeValidationException = "ValidationException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go new file mode 100644 index 000000000..960d8f52a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go @@ -0,0 +1,201 @@ +// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. + +package codepipeline + +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 is the AWS CodePipeline API Reference. This guide provides descriptions +// of the actions and data types for AWS CodePipeline. Some functionality for +// your pipeline is only configurable through the API. For additional information, +// see the AWS CodePipeline User Guide (http://docs.aws.amazon.com/codepipeline/latest/userguide/welcome.html). +// +// You can use the AWS CodePipeline API to work with pipelines, stages, actions, +// gates, and transitions, as described below. +// +// Pipelines are models of automated release processes. Each pipeline is uniquely +// named, and consists of actions, gates, and stages. +// +// You can work with pipelines by calling: +// +// * CreatePipeline, which creates a uniquely-named pipeline. +// +// * DeletePipeline, which deletes the specified pipeline. +// +// * GetPipeline, which returns information about a pipeline structure. +// +// * GetPipelineExecution, which returns information about a specific execution +// of a pipeline. +// +// * GetPipelineState, which returns information about the current state +// of the stages and actions of a pipeline. +// +// * ListPipelines, which gets a summary of all of the pipelines associated +// with your account. +// +// * StartPipelineExecution, which runs the the most recent revision of an +// artifact through the pipeline. +// +// * UpdatePipeline, which updates a pipeline with edits or changes to the +// structure of the pipeline. +// +// Pipelines include stages, which are logical groupings of gates and actions. +// Each stage contains one or more actions that must complete before the next +// stage begins. A stage will result in success or failure. If a stage fails, +// then the pipeline stops at that stage and will remain stopped until either +// a new version of an artifact appears in the source location, or a user takes +// action to re-run the most recent artifact through the pipeline. You can call +// GetPipelineState, which displays the status of a pipeline, including the +// status of stages in the pipeline, or GetPipeline, which returns the entire +// structure of the pipeline, including the stages of that pipeline. For more +// information about the structure of stages and actions, also refer to the +// AWS CodePipeline Pipeline Structure Reference (http://docs.aws.amazon.com/codepipeline/latest/userguide/pipeline-structure.html). +// +// Pipeline stages include actions, which are categorized into categories such +// as source or build actions performed within a stage of a pipeline. For example, +// you can use a source action to import artifacts into a pipeline from a source +// such as Amazon S3. Like stages, you do not work with actions directly in +// most cases, but you do define and interact with actions when working with +// pipeline operations such as CreatePipeline and GetPipelineState. +// +// Pipelines also include transitions, which allow the transition of artifacts +// from one stage to the next in a pipeline after the actions in one stage complete. +// +// You can work with transitions by calling: +// +// * DisableStageTransition, which prevents artifacts from transitioning +// to the next stage in a pipeline. +// +// * EnableStageTransition, which enables transition of artifacts between +// stages in a pipeline. +// +// Using the API to integrate with AWS CodePipeline +// +// For third-party integrators or developers who want to create their own integrations +// with AWS CodePipeline, the expected sequence varies from the standard API +// user. In order to integrate with AWS CodePipeline, developers will need to +// work with the following items: +// +// Jobs, which are instances of an action. For example, a job for a source action +// might import a revision of an artifact from a source. +// +// You can work with jobs by calling: +// +// * AcknowledgeJob, which confirms whether a job worker has received the +// specified job, +// +// * GetJobDetails, which returns the details of a job, +// +// * PollForJobs, which determines whether there are any jobs to act upon, +// +// +// * PutJobFailureResult, which provides details of a job failure, and +// +// * PutJobSuccessResult, which provides details of a job success. +// +// Third party jobs, which are instances of an action created by a partner action +// and integrated into AWS CodePipeline. Partner actions are created by members +// of the AWS Partner Network. +// +// You can work with third party jobs by calling: +// +// * AcknowledgeThirdPartyJob, which confirms whether a job worker has received +// the specified job, +// +// * GetThirdPartyJobDetails, which requests the details of a job for a partner +// action, +// +// * PollForThirdPartyJobs, which determines whether there are any jobs to +// act upon, +// +// * PutThirdPartyJobFailureResult, which provides details of a job failure, +// and +// +// * PutThirdPartyJobSuccessResult, which provides details of a job success. +// 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/codepipeline-2015-07-09 +type CodePipeline 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) + +// Service information constants +const ( + ServiceName = "codepipeline" // Service endpoint prefix API calls made to. + EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. +) + +// New creates a new instance of the CodePipeline 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 CodePipeline client from just a session. +// svc := codepipeline.New(mySession) +// +// // Create a CodePipeline client with additional configuration +// svc := codepipeline.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *CodePipeline { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CodePipeline { + svc := &CodePipeline{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2015-07-09", + JSONVersion: "1.1", + TargetPrefix: "CodePipeline_20150709", + }, + 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 CodePipeline operation and runs any +// custom request initialization. +func (c *CodePipeline) 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 +} diff --git a/vendor/vendor.json b/vendor/vendor.json index 5cb4f2b1e..109c26f05 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -804,7 +804,15 @@ "versionExact": "v1.6.25" }, { - "checksumSHA1": "NYRd4lqocAcZdkEvLHAZYyXz8Bs=", + "checksumSHA1": "LXjLQyMAadcANG0UURWuw4di2YE=", + "path": "github.com/aws/aws-sdk-go/service/codepipeline", + "revision": "b2852089fcfd0794d25d57f193e15121ab8a6d9e", + "revisionTime": "2017-02-17T18:38:06Z", + "version": "v1.6.25", + "versionExact": "v1.6.25" + }, + { + "checksumSHA1": "tTOqlqLdJim89F/7bLsXe5WfIyQ=", "path": "github.com/aws/aws-sdk-go/service/configservice", "revision": "b2852089fcfd0794d25d57f193e15121ab8a6d9e", "revisionTime": "2017-02-17T18:38:06Z", diff --git a/website/source/docs/providers/aws/r/codepipeline.markdown b/website/source/docs/providers/aws/r/codepipeline.markdown new file mode 100644 index 000000000..ff52d7893 --- /dev/null +++ b/website/source/docs/providers/aws/r/codepipeline.markdown @@ -0,0 +1,147 @@ +--- +layout: "aws" +page_title: "AWS: aws_codepipeline" +sidebar_current: "docs-aws-resource-codepipeline" +description: |- + Provides a CodePipeline +--- + +# aws\_codepipeline + +Provides a CodePipeline. + +~> **NOTE on `aws_codepipeline`:** - the `GITHUB_TOKEN` environment variable must be set if the GitHub provider is specified. + +## Example Usage + +``` +resource "aws_s3_bucket" "foo" { + bucket = "test-bucket" + acl = "private" +} + +resource "aws_iam_role" "foo" { + name = "test-role" + + assume_role_policy = < + > + CodePipeline Resources + + + > Config Resources