func ExampleCodePipeline_PutThirdPartyJobSuccessResult() { svc := codepipeline.New(session.New()) params := &codepipeline.PutThirdPartyJobSuccessResultInput{ ClientToken: aws.String("ClientToken"), // Required JobId: aws.String("ThirdPartyJobId"), // Required ContinuationToken: aws.String("ContinuationToken"), CurrentRevision: &codepipeline.CurrentRevision{ ChangeIdentifier: aws.String("RevisionChangeIdentifier"), // Required Revision: aws.String("Revision"), // Required }, ExecutionDetails: &codepipeline.ExecutionDetails{ ExternalExecutionId: aws.String("ExecutionId"), PercentComplete: aws.Int64(1), Summary: aws.String("ExecutionSummary"), }, } resp, err := svc.PutThirdPartyJobSuccessResult(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleCodePipeline_PutActionRevision() { svc := codepipeline.New(session.New()) params := &codepipeline.PutActionRevisionInput{ ActionName: aws.String("ActionName"), // Required ActionRevision: &codepipeline.ActionRevision{ // Required Created: aws.Time(time.Now()), // Required RevisionId: aws.String("RevisionId"), // Required RevisionChangeId: aws.String("RevisionChangeId"), }, PipelineName: aws.String("PipelineName"), // Required StageName: aws.String("StageName"), // Required } resp, err := svc.PutActionRevision(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleCodePipeline_PollForJobs() { svc := codepipeline.New(session.New()) params := &codepipeline.PollForJobsInput{ ActionTypeId: &codepipeline.ActionTypeId{ // Required Category: aws.String("ActionCategory"), // Required Owner: aws.String("ActionOwner"), // Required Provider: aws.String("ActionProvider"), // Required Version: aws.String("Version"), // Required }, MaxBatchSize: aws.Int64(1), QueryParam: map[string]*string{ "Key": aws.String("ActionConfigurationQueryableValue"), // Required // More values... }, } resp, err := svc.PollForJobs(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleCodePipeline_CreateCustomActionType() { svc := codepipeline.New(session.New()) params := &codepipeline.CreateCustomActionTypeInput{ Category: aws.String("ActionCategory"), // Required InputArtifactDetails: &codepipeline.ArtifactDetails{ // Required MaximumCount: aws.Int64(1), // Required MinimumCount: aws.Int64(1), // Required }, OutputArtifactDetails: &codepipeline.ArtifactDetails{ // Required MaximumCount: aws.Int64(1), // Required MinimumCount: aws.Int64(1), // Required }, Provider: aws.String("ActionProvider"), // Required Version: aws.String("Version"), // Required ConfigurationProperties: []*codepipeline.ActionConfigurationProperty{ { // Required Key: aws.Bool(true), // Required Name: aws.String("ActionConfigurationKey"), // Required Required: aws.Bool(true), // Required Secret: aws.Bool(true), // Required Description: aws.String("Description"), Queryable: aws.Bool(true), Type: aws.String("ActionConfigurationPropertyType"), }, // More values... }, Settings: &codepipeline.ActionTypeSettings{ EntityUrlTemplate: aws.String("UrlTemplate"), ExecutionUrlTemplate: aws.String("UrlTemplate"), RevisionUrlTemplate: aws.String("UrlTemplate"), ThirdPartyConfigurationUrl: aws.String("Url"), }, } resp, err := svc.CreateCustomActionType(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleCodePipeline_StartPipelineExecution() { svc := codepipeline.New(session.New()) params := &codepipeline.StartPipelineExecutionInput{ Name: aws.String("PipelineName"), // Required } resp, err := svc.StartPipelineExecution(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleCodePipeline_ListPipelines() { svc := codepipeline.New(session.New()) params := &codepipeline.ListPipelinesInput{ NextToken: aws.String("NextToken"), } resp, err := svc.ListPipelines(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleCodePipeline_GetJobDetails() { svc := codepipeline.New(session.New()) params := &codepipeline.GetJobDetailsInput{ JobId: aws.String("JobId"), // Required } resp, err := svc.GetJobDetails(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleCodePipeline_AcknowledgeThirdPartyJob() { svc := codepipeline.New(session.New()) params := &codepipeline.AcknowledgeThirdPartyJobInput{ ClientToken: aws.String("ClientToken"), // Required JobId: aws.String("ThirdPartyJobId"), // Required Nonce: aws.String("Nonce"), // Required } resp, err := svc.AcknowledgeThirdPartyJob(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleCodePipeline_DeleteCustomActionType() { svc := codepipeline.New(session.New()) params := &codepipeline.DeleteCustomActionTypeInput{ Category: aws.String("ActionCategory"), // Required Provider: aws.String("ActionProvider"), // Required Version: aws.String("Version"), // Required } resp, err := svc.DeleteCustomActionType(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleCodePipeline_DisableStageTransition() { svc := codepipeline.New(session.New()) params := &codepipeline.DisableStageTransitionInput{ PipelineName: aws.String("PipelineName"), // Required Reason: aws.String("DisabledReason"), // Required StageName: aws.String("StageName"), // Required TransitionType: aws.String("StageTransitionType"), // Required } resp, err := svc.DisableStageTransition(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleCodePipeline_PutJobFailureResult() { svc := codepipeline.New(session.New()) params := &codepipeline.PutJobFailureResultInput{ FailureDetails: &codepipeline.FailureDetails{ // Required Message: aws.String("Message"), // Required Type: aws.String("FailureType"), // Required ExternalExecutionId: aws.String("ExecutionId"), }, JobId: aws.String("JobId"), // Required } resp, err := svc.PutJobFailureResult(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleCodePipeline_UpdatePipeline() { svc := codepipeline.New(session.New()) params := &codepipeline.UpdatePipelineInput{ Pipeline: &codepipeline.PipelineDeclaration{ // Required ArtifactStore: &codepipeline.ArtifactStore{ // Required Location: aws.String("ArtifactStoreLocation"), // Required Type: aws.String("ArtifactStoreType"), // Required EncryptionKey: &codepipeline.EncryptionKey{ Id: aws.String("EncryptionKeyId"), // Required Type: aws.String("EncryptionKeyType"), // Required }, }, Name: aws.String("PipelineName"), // Required RoleArn: aws.String("RoleArn"), // Required Stages: []*codepipeline.StageDeclaration{ // Required { // Required Actions: []*codepipeline.ActionDeclaration{ // Required { // Required ActionTypeId: &codepipeline.ActionTypeId{ // Required Category: aws.String("ActionCategory"), // Required Owner: aws.String("ActionOwner"), // Required Provider: aws.String("ActionProvider"), // Required Version: aws.String("Version"), // Required }, Name: aws.String("ActionName"), // Required Configuration: map[string]*string{ "Key": aws.String("ActionConfigurationValue"), // Required // More values... }, InputArtifacts: []*codepipeline.InputArtifact{ { // Required Name: aws.String("ArtifactName"), // Required }, // More values... }, OutputArtifacts: []*codepipeline.OutputArtifact{ { // Required Name: aws.String("ArtifactName"), // Required }, // More values... }, RoleArn: aws.String("RoleArn"), RunOrder: aws.Int64(1), }, // More values... }, Name: aws.String("StageName"), // Required Blockers: []*codepipeline.BlockerDeclaration{ { // Required Name: aws.String("BlockerName"), // Required Type: aws.String("BlockerType"), // Required }, // More values... }, }, // More values... }, Version: aws.Int64(1), }, } resp, err := svc.UpdatePipeline(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func init() { Before("@codepipeline", func() { World["client"] = codepipeline.New(smoke.Session) }) }