AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi
aws.ssm.getPatchBaselines
Explore with Pulumi AI
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:
- Default
Baselines bool - Only return baseline identities where
default_baseline
istrue
. - Filters
List<Get
Patch Baselines Filter> - Key-value pairs used to filter the results. See
filter
below.
- Default
Baselines bool - Only return baseline identities where
default_baseline
istrue
. - Filters
[]Get
Patch Baselines Filter - Key-value pairs used to filter the results. See
filter
below.
- default
Baselines Boolean - Only return baseline identities where
default_baseline
istrue
. - filters
List<Get
Patch Baselines Filter> - Key-value pairs used to filter the results. See
filter
below.
- default
Baselines boolean - Only return baseline identities where
default_baseline
istrue
. - filters
Get
Patch Baselines Filter[] - Key-value pairs used to filter the results. See
filter
below.
- default_
baselines bool - Only return baseline identities where
default_baseline
istrue
. - filters
Sequence[Get
Patch Baselines Filter] - Key-value pairs used to filter the results. See
filter
below.
- default
Baselines Boolean - Only return baseline identities where
default_baseline
istrue
. - filters List<Property Map>
- Key-value pairs used to filter the results. See
filter
below.
getPatchBaselines Result
The following output properties are available:
- Baseline
Identities List<GetPatch Baselines Baseline Identity> - List of baseline identities. See
baseline_identities
below. - Id string
- The provider-assigned unique ID for this managed resource.
- Default
Baselines bool - Filters
List<Get
Patch Baselines Filter>
- Baseline
Identities []GetPatch Baselines Baseline Identity - List of baseline identities. See
baseline_identities
below. - Id string
- The provider-assigned unique ID for this managed resource.
- Default
Baselines bool - Filters
[]Get
Patch Baselines Filter
- baseline
Identities List<GetPatch Baselines Baseline Identity> - List of baseline identities. See
baseline_identities
below. - id String
- The provider-assigned unique ID for this managed resource.
- default
Baselines Boolean - filters
List<Get
Patch Baselines Filter>
- baseline
Identities GetPatch Baselines Baseline Identity[] - List of baseline identities. See
baseline_identities
below. - id string
- The provider-assigned unique ID for this managed resource.
- default
Baselines boolean - filters
Get
Patch Baselines Filter[]
- baseline_
identities Sequence[GetPatch Baselines Baseline Identity] - List of baseline identities. See
baseline_identities
below. - id str
- The provider-assigned unique ID for this managed resource.
- default_
baselines bool - filters
Sequence[Get
Patch Baselines Filter]
- baseline
Identities List<Property Map> - List of baseline identities. See
baseline_identities
below. - id String
- The provider-assigned unique ID for this managed resource.
- default
Baselines Boolean - filters List<Property Map>
Supporting Types
GetPatchBaselinesBaselineIdentity
- Baseline
Description string - Description of the patch baseline.
- Baseline
Id string - ID of the patch baseline.
- Baseline
Name string - 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 string - Operating system the patch baseline applies to.
- Baseline
Description string - Description of the patch baseline.
- Baseline
Id string - ID of the patch baseline.
- Baseline
Name string - 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 string - Operating system the patch baseline applies to.
- baseline
Description String - Description of the patch baseline.
- baseline
Id String - ID of the patch baseline.
- baseline
Name String - Name of the patch baseline.
- default
Baseline 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.
- operating
System String - Operating system the patch baseline applies to.
- baseline
Description string - Description of the patch baseline.
- baseline
Id string - ID of the patch baseline.
- baseline
Name string - Name of the patch baseline.
- default
Baseline 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.
- operating
System 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.
- baseline
Description String - Description of the patch baseline.
- baseline
Id String - ID of the patch baseline.
- baseline
Name String - Name of the patch baseline.
- default
Baseline 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.
- operating
System 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.