AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2025-06-28 · Documentation low

File: code-library/latest/ug/codepipeline_example_codepipeline_UpdatePipeline_section.md

Summary

Added detailed PowerShell V5 example for UpdatePipeline with pipeline configuration and output

Security assessment

The change demonstrates pipeline configuration without addressing security aspects or mentioning security best practices

Diff

diff --git a/code-library/latest/ug/codepipeline_example_codepipeline_UpdatePipeline_section.md b/code-library/latest/ug/codepipeline_example_codepipeline_UpdatePipeline_section.md
index 4d149d996..76f977848 100644
--- a//code-library/latest/ug/codepipeline_example_codepipeline_UpdatePipeline_section.md
+++ b//code-library/latest/ug/codepipeline_example_codepipeline_UpdatePipeline_section.md
@@ -236,0 +237,62 @@ PowerShell
+**Tools for PowerShell V5**
+    
+
+**Example 1: This example updates the specified existing pipeline with the specified settings.**
+    
+    
+    $pipeline = New-Object Amazon.CodePipeline.Model.PipelineDeclaration
+    
+    $sourceStageAction = New-Object Amazon.CodePipeline.Model.ActionDeclaration
+    $deployStageAction = New-Object Amazon.CodePipeline.Model.ActionDeclaration
+    
+    $sourceStageActionOutputArtifact = New-Object Amazon.CodePipeline.Model.OutputArtifact
+    $sourceStageActionOutputArtifact.Name = "MyApp"
+    
+    $sourceStageAction.ActionTypeId = @{"Category" = "Source"; "Owner" = "AWS"; "Provider" = "S3"; "Version" = 1}
+    $sourceStageAction.Configuration.Add("S3Bucket", "amzn-s3-demo-bucket")
+    $sourceStageAction.Configuration.Add("S3ObjectKey", "my-object-key-name.zip")
+    $sourceStageAction.OutputArtifacts.Add($sourceStageActionOutputArtifact)
+    $sourceStageAction.Name = "Source"
+    
+    $deployStageActionInputArtifact = New-Object Amazon.CodePipeline.Model.InputArtifact
+    $deployStageActionInputArtifact.Name = "MyApp"
+    
+    $deployStageAction.ActionTypeId = @{"Category" = "Deploy"; "Owner" = "AWS"; "Provider" = "CodeDeploy"; "Version" = 1}
+    $deployStageAction.Configuration.Add("ApplicationName", "CodePipelineDemoApplication")
+    $deployStageAction.Configuration.Add("DeploymentGroupName", "CodePipelineDemoFleet")
+    $deployStageAction.InputArtifacts.Add($deployStageActionInputArtifact)
+    $deployStageAction.Name = "CodePipelineDemoFleet"
+    
+    $sourceStage = New-Object Amazon.CodePipeline.Model.StageDeclaration
+    $deployStage = New-Object Amazon.CodePipeline.Model.StageDeclaration
+    
+    $sourceStage.Name = "MyInputFiles"
+    $deployStage.Name = "MyTestDeployment"
+    
+    $sourceStage.Actions.Add($sourceStageAction)
+    $deployStage.Actions.Add($deployStageAction)
+    
+    $pipeline.ArtifactStore = @{"Location" = "amzn-s3-demo-bucket"; "Type" = "S3"}
+    $pipeline.Name = "CodePipelineDemo"
+    $pipeline.RoleArn = "arn:aws:iam::80398EXAMPLE:role/CodePipelineServiceRole"
+    $pipeline.Stages.Add($sourceStage)
+    $pipeline.Stages.Add($deployStage)
+    $pipeline.Version = 1
+    
+    Update-CPPipeline -Pipeline $pipeline
+    
+
+**Output:**
+    
+    
+    ArtifactStore : Amazon.CodePipeline.Model.ArtifactStore
+    Name          : CodePipelineDemo
+    RoleArn       : arn:aws:iam::80398EXAMPLE:role/CodePipelineServiceRole
+    Stages        : {InputFiles, TestDeployment}
+    Version       : 2
+
+  * For API details, see [UpdatePipeline](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. 
+
+
+
+