Skip to content
v2.277.0

SystemsManagerAgentProperty Struct ​

Contains settings for the Systems Manager agent on your build instance.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_imagebuilder as imagebuilder } from 'aws-cdk-lib';
const systemsManagerAgentProperty: imagebuilder.CfnImageRecipe.SystemsManagerAgentProperty = {
  uninstallAfterBuild: false,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_imagebuilder as imagebuilder

systems_manager_agent_property = imagebuilder.CfnImageRecipe.SystemsManagerAgentProperty(
    uninstall_after_build=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.imagebuilder.*;

SystemsManagerAgentProperty systemsManagerAgentProperty = SystemsManagerAgentProperty.builder()
        .uninstallAfterBuild(false)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ImageBuilder;

var systemsManagerAgentProperty = new SystemsManagerAgentProperty {
    UninstallAfterBuild = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

systemsManagerAgentProperty := &SystemsManagerAgentProperty{
	UninstallAfterBuild: jsii.Boolean(false),
}

Properties ​

uninstallAfterBuildoptionalboolean | IResolvableuninstall_after_buildoptionaltyping.Union[bool, IResolvable]uninstallAfterBuildoptionalBooleanUninstallAfterBuildoptionalboolUninstallAfterBuildoptionalinterface{}#
Controls whether the Systems Manager agent is removed from your final build image, prior to creating the new AMI.
notes

If this is set to true, then the agent is removed from the final image. If it's set to false, then the agent is left in, so that it is included in the new AMI. default value is false.

The default behavior of uninstallAfterBuild is to remove the SSM Agent if it was installed by EC2 Image Builder