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

aws.securityhub.StandardsControlAssociation

Explore with Pulumi AI

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

    Example Usage

    Basic usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.securityhub.Account("example", {});
    const cisAwsFoundationsBenchmark = new aws.securityhub.StandardsSubscription("cis_aws_foundations_benchmark", {standardsArn: "arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0"}, {
        dependsOn: [example],
    });
    const cisAwsFoundationsBenchmarkDisableIam1 = new aws.index.StandardsControlAssociation("cis_aws_foundations_benchmark_disable_iam_1", {
        standardsArn: cisAwsFoundationsBenchmark.standardsArn,
        securityControlId: "IAM.1",
        associationStatus: "DISABLED",
        updatedReason: "Not needed",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.securityhub.Account("example")
    cis_aws_foundations_benchmark = aws.securityhub.StandardsSubscription("cis_aws_foundations_benchmark", standards_arn="arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0",
    opts = pulumi.ResourceOptions(depends_on=[example]))
    cis_aws_foundations_benchmark_disable_iam1 = aws.index.StandardsControlAssociation("cis_aws_foundations_benchmark_disable_iam_1",
        standards_arn=cis_aws_foundations_benchmark.standards_arn,
        security_control_id=IAM.1,
        association_status=DISABLED,
        updated_reason=Not needed)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securityhub"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := securityhub.NewAccount(ctx, "example", nil)
    		if err != nil {
    			return err
    		}
    		cisAwsFoundationsBenchmark, err := securityhub.NewStandardsSubscription(ctx, "cis_aws_foundations_benchmark", &securityhub.StandardsSubscriptionArgs{
    			StandardsArn: pulumi.String("arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			example,
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = aws.NewStandardsControlAssociation(ctx, "cis_aws_foundations_benchmark_disable_iam_1", &aws.StandardsControlAssociationArgs{
    			StandardsArn:      cisAwsFoundationsBenchmark.StandardsArn,
    			SecurityControlId: "IAM.1",
    			AssociationStatus: "DISABLED",
    			UpdatedReason:     "Not needed",
    		})
    		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.SecurityHub.Account("example");
    
        var cisAwsFoundationsBenchmark = new Aws.SecurityHub.StandardsSubscription("cis_aws_foundations_benchmark", new()
        {
            StandardsArn = "arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                example,
            },
        });
    
        var cisAwsFoundationsBenchmarkDisableIam1 = new Aws.Index.StandardsControlAssociation("cis_aws_foundations_benchmark_disable_iam_1", new()
        {
            StandardsArn = cisAwsFoundationsBenchmark.StandardsArn,
            SecurityControlId = "IAM.1",
            AssociationStatus = "DISABLED",
            UpdatedReason = "Not needed",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.securityhub.Account;
    import com.pulumi.aws.securityhub.StandardsSubscription;
    import com.pulumi.aws.securityhub.StandardsSubscriptionArgs;
    import com.pulumi.aws.standardsControlAssociation;
    import com.pulumi.aws.StandardsControlAssociationArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 Account("example");
    
            var cisAwsFoundationsBenchmark = new StandardsSubscription("cisAwsFoundationsBenchmark", StandardsSubscriptionArgs.builder()
                .standardsArn("arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(example)
                    .build());
    
            var cisAwsFoundationsBenchmarkDisableIam1 = new StandardsControlAssociation("cisAwsFoundationsBenchmarkDisableIam1", StandardsControlAssociationArgs.builder()
                .standardsArn(cisAwsFoundationsBenchmark.standardsArn())
                .securityControlId("IAM.1")
                .associationStatus("DISABLED")
                .updatedReason("Not needed")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:securityhub:Account
      cisAwsFoundationsBenchmark:
        type: aws:securityhub:StandardsSubscription
        name: cis_aws_foundations_benchmark
        properties:
          standardsArn: arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0
        options:
          dependson:
            - ${example}
      cisAwsFoundationsBenchmarkDisableIam1:
        type: aws:standardsControlAssociation
        name: cis_aws_foundations_benchmark_disable_iam_1
        properties:
          standardsArn: ${cisAwsFoundationsBenchmark.standardsArn}
          securityControlId: IAM.1
          associationStatus: DISABLED
          updatedReason: Not needed
    

    Create StandardsControlAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new StandardsControlAssociation(name: string, args: StandardsControlAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def StandardsControlAssociation(resource_name: str,
                                    args: StandardsControlAssociationArgs,
                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def StandardsControlAssociation(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    association_status: Optional[str] = None,
                                    security_control_id: Optional[str] = None,
                                    standards_arn: Optional[str] = None,
                                    updated_reason: Optional[str] = None)
    func NewStandardsControlAssociation(ctx *Context, name string, args StandardsControlAssociationArgs, opts ...ResourceOption) (*StandardsControlAssociation, error)
    public StandardsControlAssociation(string name, StandardsControlAssociationArgs args, CustomResourceOptions? opts = null)
    public StandardsControlAssociation(String name, StandardsControlAssociationArgs args)
    public StandardsControlAssociation(String name, StandardsControlAssociationArgs args, CustomResourceOptions options)
    
    type: aws:securityhub:StandardsControlAssociation
    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 StandardsControlAssociationArgs
    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 StandardsControlAssociationArgs
    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 StandardsControlAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StandardsControlAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StandardsControlAssociationArgs
    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 standardsControlAssociationResource = new Aws.SecurityHub.StandardsControlAssociation("standardsControlAssociationResource", new()
    {
        AssociationStatus = "string",
        SecurityControlId = "string",
        StandardsArn = "string",
        UpdatedReason = "string",
    });
    
    example, err := securityhub.NewStandardsControlAssociation(ctx, "standardsControlAssociationResource", &securityhub.StandardsControlAssociationArgs{
    	AssociationStatus: pulumi.String("string"),
    	SecurityControlId: pulumi.String("string"),
    	StandardsArn:      pulumi.String("string"),
    	UpdatedReason:     pulumi.String("string"),
    })
    
    var standardsControlAssociationResource = new StandardsControlAssociation("standardsControlAssociationResource", StandardsControlAssociationArgs.builder()
        .associationStatus("string")
        .securityControlId("string")
        .standardsArn("string")
        .updatedReason("string")
        .build());
    
    standards_control_association_resource = aws.securityhub.StandardsControlAssociation("standardsControlAssociationResource",
        association_status="string",
        security_control_id="string",
        standards_arn="string",
        updated_reason="string")
    
    const standardsControlAssociationResource = new aws.securityhub.StandardsControlAssociation("standardsControlAssociationResource", {
        associationStatus: "string",
        securityControlId: "string",
        standardsArn: "string",
        updatedReason: "string",
    });
    
    type: aws:securityhub:StandardsControlAssociation
    properties:
        associationStatus: string
        securityControlId: string
        standardsArn: string
        updatedReason: string
    

    StandardsControlAssociation 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 StandardsControlAssociation resource accepts the following input properties:

    AssociationStatus string
    The desired enablement status of the control in the standard. Valid values: ENABLED, DISABLED.
    SecurityControlId string
    The unique identifier for the security control whose enablement status you want to update.
    StandardsArn string

    The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status.

    The following arguments are optional:

    UpdatedReason string
    The reason for updating the control's enablement status in the standard. Required when association_status is DISABLED.
    AssociationStatus string
    The desired enablement status of the control in the standard. Valid values: ENABLED, DISABLED.
    SecurityControlId string
    The unique identifier for the security control whose enablement status you want to update.
    StandardsArn string

    The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status.

    The following arguments are optional:

    UpdatedReason string
    The reason for updating the control's enablement status in the standard. Required when association_status is DISABLED.
    associationStatus String
    The desired enablement status of the control in the standard. Valid values: ENABLED, DISABLED.
    securityControlId String
    The unique identifier for the security control whose enablement status you want to update.
    standardsArn String

    The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status.

    The following arguments are optional:

    updatedReason String
    The reason for updating the control's enablement status in the standard. Required when association_status is DISABLED.
    associationStatus string
    The desired enablement status of the control in the standard. Valid values: ENABLED, DISABLED.
    securityControlId string
    The unique identifier for the security control whose enablement status you want to update.
    standardsArn string

    The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status.

    The following arguments are optional:

    updatedReason string
    The reason for updating the control's enablement status in the standard. Required when association_status is DISABLED.
    association_status str
    The desired enablement status of the control in the standard. Valid values: ENABLED, DISABLED.
    security_control_id str
    The unique identifier for the security control whose enablement status you want to update.
    standards_arn str

    The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status.

    The following arguments are optional:

    updated_reason str
    The reason for updating the control's enablement status in the standard. Required when association_status is DISABLED.
    associationStatus String
    The desired enablement status of the control in the standard. Valid values: ENABLED, DISABLED.
    securityControlId String
    The unique identifier for the security control whose enablement status you want to update.
    standardsArn String

    The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status.

    The following arguments are optional:

    updatedReason String
    The reason for updating the control's enablement status in the standard. Required when association_status is DISABLED.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the StandardsControlAssociation 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 StandardsControlAssociation Resource

    Get an existing StandardsControlAssociation 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?: StandardsControlAssociationState, opts?: CustomResourceOptions): StandardsControlAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            association_status: Optional[str] = None,
            security_control_id: Optional[str] = None,
            standards_arn: Optional[str] = None,
            updated_reason: Optional[str] = None) -> StandardsControlAssociation
    func GetStandardsControlAssociation(ctx *Context, name string, id IDInput, state *StandardsControlAssociationState, opts ...ResourceOption) (*StandardsControlAssociation, error)
    public static StandardsControlAssociation Get(string name, Input<string> id, StandardsControlAssociationState? state, CustomResourceOptions? opts = null)
    public static StandardsControlAssociation get(String name, Output<String> id, StandardsControlAssociationState 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:
    AssociationStatus string
    The desired enablement status of the control in the standard. Valid values: ENABLED, DISABLED.
    SecurityControlId string
    The unique identifier for the security control whose enablement status you want to update.
    StandardsArn string

    The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status.

    The following arguments are optional:

    UpdatedReason string
    The reason for updating the control's enablement status in the standard. Required when association_status is DISABLED.
    AssociationStatus string
    The desired enablement status of the control in the standard. Valid values: ENABLED, DISABLED.
    SecurityControlId string
    The unique identifier for the security control whose enablement status you want to update.
    StandardsArn string

    The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status.

    The following arguments are optional:

    UpdatedReason string
    The reason for updating the control's enablement status in the standard. Required when association_status is DISABLED.
    associationStatus String
    The desired enablement status of the control in the standard. Valid values: ENABLED, DISABLED.
    securityControlId String
    The unique identifier for the security control whose enablement status you want to update.
    standardsArn String

    The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status.

    The following arguments are optional:

    updatedReason String
    The reason for updating the control's enablement status in the standard. Required when association_status is DISABLED.
    associationStatus string
    The desired enablement status of the control in the standard. Valid values: ENABLED, DISABLED.
    securityControlId string
    The unique identifier for the security control whose enablement status you want to update.
    standardsArn string

    The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status.

    The following arguments are optional:

    updatedReason string
    The reason for updating the control's enablement status in the standard. Required when association_status is DISABLED.
    association_status str
    The desired enablement status of the control in the standard. Valid values: ENABLED, DISABLED.
    security_control_id str
    The unique identifier for the security control whose enablement status you want to update.
    standards_arn str

    The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status.

    The following arguments are optional:

    updated_reason str
    The reason for updating the control's enablement status in the standard. Required when association_status is DISABLED.
    associationStatus String
    The desired enablement status of the control in the standard. Valid values: ENABLED, DISABLED.
    securityControlId String
    The unique identifier for the security control whose enablement status you want to update.
    standardsArn String

    The Amazon Resource Name (ARN) of the standard in which you want to update the control's enablement status.

    The following arguments are optional:

    updatedReason String
    The reason for updating the control's enablement status in the standard. Required when association_status is DISABLED.

    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