QuicksetupConfigurationManager class

Resource for managing an AWS SSM Quick Setup Configuration Manager.

Example Usage

Patch Policy Configuration Type

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const current = aws.getCallerIdentity({});
const currentGetPartition = aws.getPartition({});
const currentGetRegion = aws.getRegion({});
const example = aws.ssm.getPatchBaselines({
    defaultBaselines: true,
});
// transform the output of the aws_ssm_patch_baselines data source
// into the format expected by the SelectedPatchBaselines parameter
const selectedPatchBaselines = JSON.stringify(example.then(example => .reduce((__obj, baseline) => ({ ...__obj, [baseline.operatingSystem]: {
    value: baseline.baselineId,
    label: baseline.baselineName,
    description: baseline.baselineDescription,
    disabled: !baseline.defaultBaseline,
} }), {})));
const exampleQuicksetupConfigurationManager = new aws.ssm.QuicksetupConfigurationManager("example", {
    configurationDefinition: {
        localDeploymentAdministrationRoleArn: Promise.all([currentGetPartition, current]).then(([currentGetPartition, current]) => `arn:${currentGetPartition.partition}:iam::${current.accountId}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole`),
        localDeploymentExecutionRoleName: "AWS-QuickSetup-PatchPolicy-LocalExecutionRole",
        type: "AWSQuickSetupType-PatchPolicy",
        parameters: {
            ConfigurationOptionsPatchOperation: "Scan",
            ConfigurationOptionsScanValue: "cron(0 1 * * ? *)",
            ConfigurationOptionsScanNextInterval: "false",
            PatchBaselineRegion: currentGetRegion.then(currentGetRegion => currentGetRegion.region),
            PatchBaselineUseDefault: "default",
            PatchPolicyName: "example",
            SelectedPatchBaselines: selectedPatchBaselines,
            OutputLogEnableS3: "false",
            RateControlConcurrency: "10%",
            RateControlErrorThreshold: "2%",
            IsPolicyAttachAllowed: "false",
            TargetAccounts: current.then(current => current.accountId),
            TargetRegions: currentGetRegion.then(currentGetRegion => currentGetRegion.region),
            TargetType: "*",
        },
    },
    name: "example",
});
import pulumi
import json
import pulumi_aws as aws

current = aws.get_caller_identity()
current_get_partition = aws.get_partition()
current_get_region = aws.get_region()
example = aws.ssm.get_patch_baselines(default_baselines=True)
# transform the output of the aws_ssm_patch_baselines data source
# into the format expected by the SelectedPatchBaselines parameter
selected_patch_baselines = json.dumps({baseline.operating_system: {
    "value": baseline.baseline_id,
    "label": baseline.baseline_name,
    "description": baseline.baseline_description,
    "disabled": not baseline.default_baseline,
} for baseline in example.baseline_identities})
example_quicksetup_configuration_manager = aws.ssm.QuicksetupConfigurationManager("example",
    configuration_definition={
        "local_deployment_administration_role_arn": f"arn:{current_get_partition.partition}:iam::{current.account_id}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole",
        "local_deployment_execution_role_name": "AWS-QuickSetup-PatchPolicy-LocalExecutionRole",
        "type": "AWSQuickSetupType-PatchPolicy",
        "parameters": {
            "ConfigurationOptionsPatchOperation": "Scan",
            "ConfigurationOptionsScanValue": "cron(0 1 * * ? *)",
            "ConfigurationOptionsScanNextInterval": "false",
            "PatchBaselineRegion": current_get_region.region,
            "PatchBaselineUseDefault": "default",
            "PatchPolicyName": "example",
            "SelectedPatchBaselines": selected_patch_baselines,
            "OutputLogEnableS3": "false",
            "RateControlConcurrency": "10%",
            "RateControlErrorThreshold": "2%",
            "IsPolicyAttachAllowed": "false",
            "TargetAccounts": current.account_id,
            "TargetRegions": current_get_region.region,
            "TargetType": "*",
        },
    },
    name="example")
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var current = Aws.GetCallerIdentity.Invoke();

    var currentGetPartition = Aws.GetPartition.Invoke();

    var currentGetRegion = Aws.GetRegion.Invoke();

    var example = Aws.Ssm.GetPatchBaselines.Invoke(new()
    {
        DefaultBaselines = true,
    });

    // transform the output of the aws_ssm_patch_baselines data source
    // into the format expected by the SelectedPatchBaselines parameter
    var selectedPatchBaselines = JsonSerializer.Serialize(.ToDictionary(item => {
        var baseline = item.Value;
        return baseline.OperatingSystem;
    }, item => {
        var baseline = item.Value;
        return
        {
            { "value", baseline.BaselineId },
            { "label", baseline.BaselineName },
            { "description", baseline.BaselineDescription },
            { "disabled", !baseline.DefaultBaseline },
        };
    }));

    var exampleQuicksetupConfigurationManager = new Aws.Ssm.QuicksetupConfigurationManager("example", new()
    {
        ConfigurationDefinition = new Aws.Ssm.Inputs.QuicksetupConfigurationManagerConfigurationDefinitionArgs
        {
            LocalDeploymentAdministrationRoleArn = Output.Tuple(currentGetPartition, current).Apply(values =>
            {
                var currentGetPartition = values.Item1;
                var current = values.Item2;
                return $"arn:{currentGetPartition.Apply(getPartitionResult => getPartitionResult.Partition)}:iam::{current.Apply(getCallerIdentityResult => getCallerIdentityResult.AccountId)}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole";
            }),
            LocalDeploymentExecutionRoleName = "AWS-QuickSetup-PatchPolicy-LocalExecutionRole",
            Type = "AWSQuickSetupType-PatchPolicy",
            Parameters =
            {
                { "ConfigurationOptionsPatchOperation", "Scan" },
                { "ConfigurationOptionsScanValue", "cron(0 1 * * ? *)" },
                { "ConfigurationOptionsScanNextInterval", "false" },
                { "PatchBaselineRegion", currentGetRegion.Apply(getRegionResult => getRegionResult.Region) },
                { "PatchBaselineUseDefault", "default" },
                { "PatchPolicyName", "example" },
                { "SelectedPatchBaselines", selectedPatchBaselines },
                { "OutputLogEnableS3", "false" },
                { "RateControlConcurrency", "10%" },
                { "RateControlErrorThreshold", "2%" },
                { "IsPolicyAttachAllowed", "false" },
                { "TargetAccounts", current.Apply(getCallerIdentityResult => getCallerIdentityResult.AccountId) },
                { "TargetRegions", currentGetRegion.Apply(getRegionResult => getRegionResult.Region) },
                { "TargetType", "*" },
            },
        },
        Name = "example",
    });

});
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

data "aws_getcalleridentity" "current" {
}
data "aws_getpartition" "currentGetPartition" {
}
data "aws_getregion" "currentGetRegion" {
}
data "aws_ssm_getpatchbaselines" "example" {
  default_baselines = true
}

resource "aws_ssm_quicksetupconfigurationmanager" "example" {
  configuration_definition = {
    local_deployment_administration_role_arn ="arn:${data.aws_getpartition.currentGetPartition.partition}:iam::${data.aws_getcalleridentity.current.account_id}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole"
    local_deployment_execution_role_name     = "AWS-QuickSetup-PatchPolicy-LocalExecutionRole"
    type                                     = "AWSQuickSetupType-PatchPolicy"
    parameters = {
      "ConfigurationOptionsPatchOperation"   = "Scan"
      "ConfigurationOptionsScanValue"        = "cron(0 1 * * ? *)"
      "ConfigurationOptionsScanNextInterval" = "false"
      "PatchBaselineRegion"                  = data.aws_getregion.currentGetRegion.region
      "PatchBaselineUseDefault"              = "default"
      "PatchPolicyName"                      = "example"
      "SelectedPatchBaselines"               = local.selectedPatchBaselines
      "OutputLogEnableS3"                    = "false"
      "RateControlConcurrency"               = "10%"
      "RateControlErrorThreshold"            = "2%"
      "IsPolicyAttachAllowed"                = "false"
      "TargetAccounts"                       = data.aws_getcalleridentity.current.account_id
      "TargetRegions"                        = data.aws_getregion.currentGetRegion.region
      "TargetType"                           = "*"
    }
  }
  name = "example"
}
# transform the output of the aws_ssm_patch_baselines data source
# into the format expected by the SelectedPatchBaselines parameter
locals {
  selectedPatchBaselines = jsonencode({for baseline in data.aws_ssm_getpatchbaselines.example.baseline_identities : baseline.operatingSystem => {
    "value"       = baseline.baselineId
    "label"       = baseline.baselineName
    "description" = baseline.baselineDescription
    "disabled"    = ! baseline.defaultBaseline
  } })
}

Import

Using pulumi import, import SSM Quick Setup Configuration Manager using the managerArn. For example:

$ pulumi import aws:ssm/quicksetupConfigurationManager:QuicksetupConfigurationManager example arn:aws:ssm-quicksetup:us-east-1:012345678901:configuration-manager/abcd-1234

Constructors

QuicksetupConfigurationManager(String name, {QuicksetupConfigurationManagerArgs? args, CustomResourceOptions? options})
Creates a new QuicksetupConfigurationManager. name The Pulumi resource name. args Arguments used to configure this QuicksetupConfigurationManager. The set of arguments for QuicksetupConfigurationManager. options Resource options controlling this resource's behavior.
QuicksetupConfigurationManager.reference(String urn)
Creates a typed reference to an existing QuicksetupConfigurationManager resource.

Properties

childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
configurationDefinition ↔ Output<QuicksetupConfigurationManagerConfigurationDefinition>
Definition of the Quick Setup configuration that the configuration manager deploys. See configurationDefinition below.
latefinal
description ↔ Output<String>
Description of the configuration manager.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
managerArn ↔ Output<String>
ARN of the Configuration Manager.
latefinal
name ↔ Output<String>
Configuration manager name.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statusSummaries ↔ Output<List<QuicksetupConfigurationManagerStatusSummary>>
A summary of the state of the configuration manager. This includes deployment statuses, association statuses, drift statuses, health checks, and more. See statusSummaries below.
latefinal
tags ↔ Output<Map<String, String>?>
Map of tags assigned to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
timeouts ↔ Output<QuicksetupConfigurationManagerTimeouts?>
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {QuicksetupConfigurationManagerState? state, CustomResourceOptions? options}) → QuicksetupConfigurationManager
Gets an existing QuicksetupConfigurationManager resource's state with the given name and id.