published on Thursday, Apr 30, 2026 by Pulumi
published on Thursday, Apr 30, 2026 by Pulumi
Provides an SSM Patch Group resource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ssm.PatchBaseline("example", {
name: "patch-baseline",
approvedPatches: ["KB123456"],
});
const examplePatchGroup = new aws.ssm.PatchGroup("example", {
baselineId: example.id,
patchGroup: "patch-group-name",
});
import pulumi
import pulumi_aws as aws
example = aws.ssm.PatchBaseline("example",
name="patch-baseline",
approved_patches=["KB123456"])
example_patch_group = aws.ssm.PatchGroup("example",
baseline_id=example.id,
patch_group="patch-group-name")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ssm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := ssm.NewPatchBaseline(ctx, "example", &ssm.PatchBaselineArgs{
Name: pulumi.String("patch-baseline"),
ApprovedPatches: pulumi.StringArray{
pulumi.String("KB123456"),
},
})
if err != nil {
return err
}
_, err = ssm.NewPatchGroup(ctx, "example", &ssm.PatchGroupArgs{
BaselineId: example.ID(),
PatchGroup: pulumi.String("patch-group-name"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Ssm.PatchBaseline("example", new()
{
Name = "patch-baseline",
ApprovedPatches = new[]
{
"KB123456",
},
});
var examplePatchGroup = new Aws.Ssm.PatchGroup("example", new()
{
BaselineId = example.Id,
PatchGroupName = "patch-group-name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssm.PatchBaseline;
import com.pulumi.aws.ssm.PatchBaselineArgs;
import com.pulumi.aws.ssm.PatchGroup;
import com.pulumi.aws.ssm.PatchGroupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new PatchBaseline("example", PatchBaselineArgs.builder()
.name("patch-baseline")
.approvedPatches("KB123456")
.build());
var examplePatchGroup = new PatchGroup("examplePatchGroup", PatchGroupArgs.builder()
.baselineId(example.id())
.patchGroup("patch-group-name")
.build());
}
}
resources:
example:
type: aws:ssm:PatchBaseline
properties:
name: patch-baseline
approvedPatches:
- KB123456
examplePatchGroup:
type: aws:ssm:PatchGroup
name: example
properties:
baselineId: ${example.id}
patchGroup: patch-group-name
Create PatchGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PatchGroup(name: string, args: PatchGroupArgs, opts?: CustomResourceOptions);@overload
def PatchGroup(resource_name: str,
args: PatchGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PatchGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
baseline_id: Optional[str] = None,
patch_group: Optional[str] = None,
region: Optional[str] = None)func NewPatchGroup(ctx *Context, name string, args PatchGroupArgs, opts ...ResourceOption) (*PatchGroup, error)public PatchGroup(string name, PatchGroupArgs args, CustomResourceOptions? opts = null)
public PatchGroup(String name, PatchGroupArgs args)
public PatchGroup(String name, PatchGroupArgs args, CustomResourceOptions options)
type: aws:ssm:PatchGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PatchGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PatchGroupArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PatchGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PatchGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PatchGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var patchGroupResource = new Aws.Ssm.PatchGroup("patchGroupResource", new()
{
BaselineId = "string",
PatchGroupName = "string",
Region = "string",
});
example, err := ssm.NewPatchGroup(ctx, "patchGroupResource", &ssm.PatchGroupArgs{
BaselineId: pulumi.String("string"),
PatchGroup: pulumi.String("string"),
Region: pulumi.String("string"),
})
var patchGroupResource = new PatchGroup("patchGroupResource", PatchGroupArgs.builder()
.baselineId("string")
.patchGroup("string")
.region("string")
.build());
patch_group_resource = aws.ssm.PatchGroup("patchGroupResource",
baseline_id="string",
patch_group="string",
region="string")
const patchGroupResource = new aws.ssm.PatchGroup("patchGroupResource", {
baselineId: "string",
patchGroup: "string",
region: "string",
});
type: aws:ssm:PatchGroup
properties:
baselineId: string
patchGroup: string
region: string
PatchGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PatchGroup resource accepts the following input properties:
- Baseline
Id string - The ID of the patch baseline to register the patch group with.
- Patch
Group stringName - The name of the patch group that should be registered with the patch baseline.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Baseline
Id string - The ID of the patch baseline to register the patch group with.
- Patch
Group string - The name of the patch group that should be registered with the patch baseline.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- baseline
Id String - The ID of the patch baseline to register the patch group with.
- patch
Group String - The name of the patch group that should be registered with the patch baseline.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- baseline
Id string - The ID of the patch baseline to register the patch group with.
- patch
Group string - The name of the patch group that should be registered with the patch baseline.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- baseline_
id str - The ID of the patch baseline to register the patch group with.
- patch_
group str - The name of the patch group that should be registered with the patch baseline.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- baseline
Id String - The ID of the patch baseline to register the patch group with.
- patch
Group String - The name of the patch group that should be registered with the patch baseline.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
Outputs
All input properties are implicitly available as output properties. Additionally, the PatchGroup resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PatchGroup Resource
Get an existing PatchGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PatchGroupState, opts?: CustomResourceOptions): PatchGroup@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
baseline_id: Optional[str] = None,
patch_group: Optional[str] = None,
region: Optional[str] = None) -> PatchGroupfunc GetPatchGroup(ctx *Context, name string, id IDInput, state *PatchGroupState, opts ...ResourceOption) (*PatchGroup, error)public static PatchGroup Get(string name, Input<string> id, PatchGroupState? state, CustomResourceOptions? opts = null)public static PatchGroup get(String name, Output<String> id, PatchGroupState state, CustomResourceOptions options)resources: _: type: aws:ssm:PatchGroup get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Baseline
Id string - The ID of the patch baseline to register the patch group with.
- Patch
Group stringName - The name of the patch group that should be registered with the patch baseline.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Baseline
Id string - The ID of the patch baseline to register the patch group with.
- Patch
Group string - The name of the patch group that should be registered with the patch baseline.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- baseline
Id String - The ID of the patch baseline to register the patch group with.
- patch
Group String - The name of the patch group that should be registered with the patch baseline.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- baseline
Id string - The ID of the patch baseline to register the patch group with.
- patch
Group string - The name of the patch group that should be registered with the patch baseline.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- baseline_
id str - The ID of the patch baseline to register the patch group with.
- patch_
group str - The name of the patch group that should be registered with the patch baseline.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- baseline
Id String - The ID of the patch baseline to register the patch group with.
- patch
Group String - The name of the patch group that should be registered with the patch baseline.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
Import
Identity Schema
Required
baselineId(String) The ID of the patch baseline.patchGroup(String) The name of the patch group.
Optional
accountId(String) AWS Account where this resource is managed.region(String) Region where this resource is managed.
Using pulumi import, import an SSM Patch Group using the patchGroup and baselineId separated by a comma (,). For example:
$ pulumi import aws:ssm/patchGroup:PatchGroup example patch-group-name,pb-1234567890abcdef0
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
published on Thursday, Apr 30, 2026 by Pulumi
