1. Packages
  2. AWS
  3. API Docs
  4. ssm
  5. getPatchBaselines
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.ssm.getPatchBaselines

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Data source for retrieving AWS SSM (Systems Manager) Patch Baselines.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.ssm.getPatchBaselines({});
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ssm.get_patch_baselines()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ssm.GetPatchBaselines(ctx, &ssm.GetPatchBaselinesArgs{}, nil)
    		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 = Aws.Ssm.GetPatchBaselines.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssm.SsmFunctions;
    import com.pulumi.aws.ssm.inputs.GetPatchBaselinesArgs;
    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) {
            final var example = SsmFunctions.getPatchBaselines();
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:ssm:getPatchBaselines
          Arguments: {}
    

    With Filters

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.ssm.getPatchBaselines({
        filters: [
            {
                key: "OWNER",
                values: ["AWS"],
            },
            {
                key: "OPERATING_SYSTEM",
                values: ["WINDOWS"],
            },
        ],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ssm.get_patch_baselines(filters=[
        {
            "key": "OWNER",
            "values": ["AWS"],
        },
        {
            "key": "OPERATING_SYSTEM",
            "values": ["WINDOWS"],
        },
    ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ssm.GetPatchBaselines(ctx, &ssm.GetPatchBaselinesArgs{
    			Filters: []ssm.GetPatchBaselinesFilter{
    				{
    					Key: "OWNER",
    					Values: []string{
    						"AWS",
    					},
    				},
    				{
    					Key: "OPERATING_SYSTEM",
    					Values: []string{
    						"WINDOWS",
    					},
    				},
    			},
    		}, nil)
    		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 = Aws.Ssm.GetPatchBaselines.Invoke(new()
        {
            Filters = new[]
            {
                new Aws.Ssm.Inputs.GetPatchBaselinesFilterInputArgs
                {
                    Key = "OWNER",
                    Values = new[]
                    {
                        "AWS",
                    },
                },
                new Aws.Ssm.Inputs.GetPatchBaselinesFilterInputArgs
                {
                    Key = "OPERATING_SYSTEM",
                    Values = new[]
                    {
                        "WINDOWS",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssm.SsmFunctions;
    import com.pulumi.aws.ssm.inputs.GetPatchBaselinesArgs;
    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) {
            final var example = SsmFunctions.getPatchBaselines(GetPatchBaselinesArgs.builder()
                .filters(            
                    GetPatchBaselinesFilterArgs.builder()
                        .key("OWNER")
                        .values("AWS")
                        .build(),
                    GetPatchBaselinesFilterArgs.builder()
                        .key("OPERATING_SYSTEM")
                        .values("WINDOWS")
                        .build())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:ssm:getPatchBaselines
          Arguments:
            filters:
              - key: OWNER
                values:
                  - AWS
              - key: OPERATING_SYSTEM
                values:
                  - WINDOWS
    

    Using getPatchBaselines

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getPatchBaselines(args: GetPatchBaselinesArgs, opts?: InvokeOptions): Promise<GetPatchBaselinesResult>
    function getPatchBaselinesOutput(args: GetPatchBaselinesOutputArgs, opts?: InvokeOptions): Output<GetPatchBaselinesResult>
    def get_patch_baselines(default_baselines: Optional[bool] = None,
                            filters: Optional[Sequence[GetPatchBaselinesFilter]] = None,
                            opts: Optional[InvokeOptions] = None) -> GetPatchBaselinesResult
    def get_patch_baselines_output(default_baselines: Optional[pulumi.Input[bool]] = None,
                            filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetPatchBaselinesFilterArgs]]]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetPatchBaselinesResult]
    func GetPatchBaselines(ctx *Context, args *GetPatchBaselinesArgs, opts ...InvokeOption) (*GetPatchBaselinesResult, error)
    func GetPatchBaselinesOutput(ctx *Context, args *GetPatchBaselinesOutputArgs, opts ...InvokeOption) GetPatchBaselinesResultOutput

    > Note: This function is named GetPatchBaselines in the Go SDK.

    public static class GetPatchBaselines 
    {
        public static Task<GetPatchBaselinesResult> InvokeAsync(GetPatchBaselinesArgs args, InvokeOptions? opts = null)
        public static Output<GetPatchBaselinesResult> Invoke(GetPatchBaselinesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPatchBaselinesResult> getPatchBaselines(GetPatchBaselinesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:ssm/getPatchBaselines:getPatchBaselines
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DefaultBaselines bool
    Only return baseline identities where default_baseline is true.
    Filters List<GetPatchBaselinesFilter>
    Key-value pairs used to filter the results. See filter below.
    DefaultBaselines bool
    Only return baseline identities where default_baseline is true.
    Filters []GetPatchBaselinesFilter
    Key-value pairs used to filter the results. See filter below.
    defaultBaselines Boolean
    Only return baseline identities where default_baseline is true.
    filters List<GetPatchBaselinesFilter>
    Key-value pairs used to filter the results. See filter below.
    defaultBaselines boolean
    Only return baseline identities where default_baseline is true.
    filters GetPatchBaselinesFilter[]
    Key-value pairs used to filter the results. See filter below.
    default_baselines bool
    Only return baseline identities where default_baseline is true.
    filters Sequence[GetPatchBaselinesFilter]
    Key-value pairs used to filter the results. See filter below.
    defaultBaselines Boolean
    Only return baseline identities where default_baseline is true.
    filters List<Property Map>
    Key-value pairs used to filter the results. See filter below.

    getPatchBaselines Result

    The following output properties are available:

    BaselineIdentities List<GetPatchBaselinesBaselineIdentity>
    List of baseline identities. See baseline_identities below.
    Id string
    The provider-assigned unique ID for this managed resource.
    DefaultBaselines bool
    Filters List<GetPatchBaselinesFilter>
    BaselineIdentities []GetPatchBaselinesBaselineIdentity
    List of baseline identities. See baseline_identities below.
    Id string
    The provider-assigned unique ID for this managed resource.
    DefaultBaselines bool
    Filters []GetPatchBaselinesFilter
    baselineIdentities List<GetPatchBaselinesBaselineIdentity>
    List of baseline identities. See baseline_identities below.
    id String
    The provider-assigned unique ID for this managed resource.
    defaultBaselines Boolean
    filters List<GetPatchBaselinesFilter>
    baselineIdentities GetPatchBaselinesBaselineIdentity[]
    List of baseline identities. See baseline_identities below.
    id string
    The provider-assigned unique ID for this managed resource.
    defaultBaselines boolean
    filters GetPatchBaselinesFilter[]
    baseline_identities Sequence[GetPatchBaselinesBaselineIdentity]
    List of baseline identities. See baseline_identities below.
    id str
    The provider-assigned unique ID for this managed resource.
    default_baselines bool
    filters Sequence[GetPatchBaselinesFilter]
    baselineIdentities List<Property Map>
    List of baseline identities. See baseline_identities below.
    id String
    The provider-assigned unique ID for this managed resource.
    defaultBaselines Boolean
    filters List<Property Map>

    Supporting Types

    GetPatchBaselinesBaselineIdentity

    BaselineDescription string
    Description of the patch baseline.
    BaselineId string
    ID of the patch baseline.
    BaselineName string
    Name of the patch baseline.
    DefaultBaseline bool
    Indicates whether this is the default baseline. AWS Systems Manager supports creating multiple default patch baselines. For example, you can create a default patch baseline for each operating system.
    OperatingSystem string
    Operating system the patch baseline applies to.
    BaselineDescription string
    Description of the patch baseline.
    BaselineId string
    ID of the patch baseline.
    BaselineName string
    Name of the patch baseline.
    DefaultBaseline bool
    Indicates whether this is the default baseline. AWS Systems Manager supports creating multiple default patch baselines. For example, you can create a default patch baseline for each operating system.
    OperatingSystem string
    Operating system the patch baseline applies to.
    baselineDescription String
    Description of the patch baseline.
    baselineId String
    ID of the patch baseline.
    baselineName String
    Name of the patch baseline.
    defaultBaseline Boolean
    Indicates whether this is the default baseline. AWS Systems Manager supports creating multiple default patch baselines. For example, you can create a default patch baseline for each operating system.
    operatingSystem String
    Operating system the patch baseline applies to.
    baselineDescription string
    Description of the patch baseline.
    baselineId string
    ID of the patch baseline.
    baselineName string
    Name of the patch baseline.
    defaultBaseline boolean
    Indicates whether this is the default baseline. AWS Systems Manager supports creating multiple default patch baselines. For example, you can create a default patch baseline for each operating system.
    operatingSystem string
    Operating system the patch baseline applies to.
    baseline_description str
    Description of the patch baseline.
    baseline_id str
    ID of the patch baseline.
    baseline_name str
    Name of the patch baseline.
    default_baseline bool
    Indicates whether this is the default baseline. AWS Systems Manager supports creating multiple default patch baselines. For example, you can create a default patch baseline for each operating system.
    operating_system str
    Operating system the patch baseline applies to.
    baselineDescription String
    Description of the patch baseline.
    baselineId String
    ID of the patch baseline.
    baselineName String
    Name of the patch baseline.
    defaultBaseline Boolean
    Indicates whether this is the default baseline. AWS Systems Manager supports creating multiple default patch baselines. For example, you can create a default patch baseline for each operating system.
    operatingSystem String
    Operating system the patch baseline applies to.

    GetPatchBaselinesFilter

    Key string
    Filter key. See the AWS SSM documentation for valid values.
    Values List<string>
    Filter values. See the AWS SSM documentation for example values.
    Key string
    Filter key. See the AWS SSM documentation for valid values.
    Values []string
    Filter values. See the AWS SSM documentation for example values.
    key String
    Filter key. See the AWS SSM documentation for valid values.
    values List<String>
    Filter values. See the AWS SSM documentation for example values.
    key string
    Filter key. See the AWS SSM documentation for valid values.
    values string[]
    Filter values. See the AWS SSM documentation for example values.
    key str
    Filter key. See the AWS SSM documentation for valid values.
    values Sequence[str]
    Filter values. See the AWS SSM documentation for example values.
    key String
    Filter key. See the AWS SSM documentation for valid values.
    values List<String>
    Filter values. See the AWS SSM documentation for example values.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi