Package com.pulumi.aws.securityhub
Class StandardsControlAssociation
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.securityhub.StandardsControlAssociation
-
public class StandardsControlAssociation extends com.pulumi.resources.CustomResourceResource for managing an AWS Security Hub Standards Control Association. Disable/enable Security Hub security control in the standard. The `aws.securityhub.StandardsControlAssociation`, similarly to `aws.securityhub.StandardsControl`, behaves differently from normal resources, in that Terraform does not _create_ this resource, but instead "adopts" it into management. When you _delete_ this resource configuration, Terraform "abandons" resource as is and just removes it from the state. ## Example Usage ### Basic usage
### Disabling security control in all standards ## Import ### Identity Schema #### Required * `securityControlId` (String) Security control ID. * `standardsArn` (String) Standards ARN. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import Security Hub standards control associations using `securityControlId` and `standardsArn` separated by a comma (`,`). For example: ```sh $ pulumi import aws:securityhub/standardsControlAssociation:StandardsControlAssociation example IAM.1,arn:aws:securityhub:us-east-1:123456789012:control/cis-aws-foundations-benchmark/v/1.2.0/1.10 ```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.securityhub.StandardsControlAssociation; import com.pulumi.aws.securityhub.StandardsControlAssociationArgs; import com.pulumi.resources.CustomResourceOptions; import java.util.ArrayList; import java.util.Arrays; 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()); } }
-
-
Constructor Summary
Constructors Constructor Description StandardsControlAssociation(java.lang.String name)StandardsControlAssociation(java.lang.String name, StandardsControlAssociationArgs args)StandardsControlAssociation(java.lang.String name, StandardsControlAssociationArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>associationStatus()static StandardsControlAssociationget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, StandardsControlAssociationState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>securityControlId()com.pulumi.core.Output<java.lang.String>standardsArn()com.pulumi.core.Output<java.util.Optional<java.lang.String>>updatedReason()
-
-
-
Constructor Detail
-
StandardsControlAssociation
public StandardsControlAssociation(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
StandardsControlAssociation
public StandardsControlAssociation(java.lang.String name, StandardsControlAssociationArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
StandardsControlAssociation
public StandardsControlAssociation(java.lang.String name, StandardsControlAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
associationStatus
public com.pulumi.core.Output<java.lang.String> associationStatus()
- Returns:
- The desired enablement status of the control in the standard. Valid values: `ENABLED`, `DISABLED`.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
securityControlId
public com.pulumi.core.Output<java.lang.String> securityControlId()
- Returns:
- The unique identifier for the security control whose enablement status you want to update.
-
standardsArn
public com.pulumi.core.Output<java.lang.String> standardsArn()
- Returns:
- ARN of the standard in which you want to update the control's enablement status. The following arguments are optional:
-
updatedReason
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> updatedReason()
- Returns:
- The reason for updating the control's enablement status in the standard. Required when `associationStatus` is `DISABLED`.
-
get
public static StandardsControlAssociation get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable StandardsControlAssociationState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-