aws logo
AWS Classic v5.28.0, Jan 23 23

aws.ssm.PatchGroup

Provides an SSM Patch Group resource

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var production = new Aws.Ssm.PatchBaseline("production", new()
    {
        ApprovedPatches = new[]
        {
            "KB123456",
        },
    });

    var patchgroup = new Aws.Ssm.PatchGroup("patchgroup", new()
    {
        BaselineId = production.Id,
        PatchGroupName = "patch-group-name",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ssm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		production, err := ssm.NewPatchBaseline(ctx, "production", &ssm.PatchBaselineArgs{
			ApprovedPatches: pulumi.StringArray{
				pulumi.String("KB123456"),
			},
		})
		if err != nil {
			return err
		}
		_, err = ssm.NewPatchGroup(ctx, "patchgroup", &ssm.PatchGroupArgs{
			BaselineId: production.ID(),
			PatchGroup: pulumi.String("patch-group-name"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 production = new PatchBaseline("production", PatchBaselineArgs.builder()        
            .approvedPatches("KB123456")
            .build());

        var patchgroup = new PatchGroup("patchgroup", PatchGroupArgs.builder()        
            .baselineId(production.id())
            .patchGroup("patch-group-name")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

production = aws.ssm.PatchBaseline("production", approved_patches=["KB123456"])
patchgroup = aws.ssm.PatchGroup("patchgroup",
    baseline_id=production.id,
    patch_group="patch-group-name")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const production = new aws.ssm.PatchBaseline("production", {approvedPatches: ["KB123456"]});
const patchgroup = new aws.ssm.PatchGroup("patchgroup", {
    baselineId: production.id,
    patchGroup: "patch-group-name",
});
resources:
  production:
    type: aws:ssm:PatchBaseline
    properties:
      approvedPatches:
        - KB123456
  patchgroup:
    type: aws:ssm:PatchGroup
    properties:
      baselineId: ${production.id}
      patchGroup: patch-group-name

Create PatchGroup Resource

new PatchGroup(name: string, args: PatchGroupArgs, opts?: CustomResourceOptions);
@overload
def PatchGroup(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               baseline_id: Optional[str] = None,
               patch_group: Optional[str] = None)
@overload
def PatchGroup(resource_name: str,
               args: PatchGroupArgs,
               opts: Optional[ResourceOptions] = 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.

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.

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

The PatchGroup resource accepts the following input properties:

BaselineId string

The ID of the patch baseline to register the patch group with.

PatchGroupName string

The name of the patch group that should be registered with the patch baseline.

BaselineId string

The ID of the patch baseline to register the patch group with.

PatchGroup string

The name of the patch group that should be registered with the patch baseline.

baselineId String

The ID of the patch baseline to register the patch group with.

patchGroup String

The name of the patch group that should be registered with the patch baseline.

baselineId string

The ID of the patch baseline to register the patch group with.

patchGroup string

The name of the patch group that should be registered with the patch baseline.

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.

baselineId String

The ID of the patch baseline to register the patch group with.

patchGroup String

The name of the patch group that should be registered with the patch baseline.

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) -> PatchGroup
func 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)
Resource lookup is not supported in YAML
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.
The following state arguments are supported:
BaselineId string

The ID of the patch baseline to register the patch group with.

PatchGroupName string

The name of the patch group that should be registered with the patch baseline.

BaselineId string

The ID of the patch baseline to register the patch group with.

PatchGroup string

The name of the patch group that should be registered with the patch baseline.

baselineId String

The ID of the patch baseline to register the patch group with.

patchGroup String

The name of the patch group that should be registered with the patch baseline.

baselineId string

The ID of the patch baseline to register the patch group with.

patchGroup string

The name of the patch group that should be registered with the patch baseline.

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.

baselineId String

The ID of the patch baseline to register the patch group with.

patchGroup String

The name of the patch group that should be registered with the patch baseline.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.