Class StandardsControl


  • public class StandardsControl
    extends com.pulumi.resources.CustomResource
    Disable/enable Security Hub standards control in the current region. The `aws.securityhub.StandardsControl` behaves differently from normal resources, in that Pulumi does not _create_ this resource, but instead "adopts" it into management. When you _delete_ this resource configuration, Pulumi "abandons" resource as is and just removes it from the state. ## Example Usage
     
     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.StandardsControl;
     import com.pulumi.aws.securityhub.StandardsControlArgs;
     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 ensureIamPasswordPolicyPreventsPasswordReuse = new StandardsControl("ensureIamPasswordPolicyPreventsPasswordReuse", StandardsControlArgs.builder()
                 .standardsControlArn("arn:aws:securityhub:us-east-1:111111111111:control/cis-aws-foundations-benchmark/v/1.2.0/1.10")
                 .controlStatus("DISABLED")
                 .disabledReason("We handle password policies within Okta")
                 .build(), CustomResourceOptions.builder()
                     .dependsOn(cisAwsFoundationsBenchmark)
                     .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required - `standardsControlArn` (String) Standards control ARN. Using `pulumi import`, import Security Hub standards controls using `standardsControlArn`. For example: ```sh $ pulumi import aws:securityhub/standardsControl:StandardsControl example arn:aws:securityhub:us-east-1:123456789012:control/cis-aws-foundations-benchmark/v/1.2.0/1.10 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> controlId()  
      com.pulumi.core.Output<java.lang.String> controlStatus()  
      com.pulumi.core.Output<java.lang.String> controlStatusUpdatedAt()  
      com.pulumi.core.Output<java.lang.String> description()  
      com.pulumi.core.Output<java.lang.String> disabledReason()  
      static StandardsControl get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, StandardsControlState 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.util.List<java.lang.String>> relatedRequirements()  
      com.pulumi.core.Output<java.lang.String> remediationUrl()  
      com.pulumi.core.Output<java.lang.String> severityRating()  
      com.pulumi.core.Output<java.lang.String> standardsControlArn()  
      com.pulumi.core.Output<java.lang.String> title()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StandardsControl

        public StandardsControl​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • StandardsControl

        public StandardsControl​(java.lang.String name,
                                StandardsControlArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • StandardsControl

        public StandardsControl​(java.lang.String name,
                                StandardsControlArgs 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

      • controlId

        public com.pulumi.core.Output<java.lang.String> controlId()
        Returns:
        The identifier of the security standard control.
      • controlStatus

        public com.pulumi.core.Output<java.lang.String> controlStatus()
        Returns:
        The control status could be `ENABLED` or `DISABLED`. You have to specify `disabledReason` argument for `DISABLED` control status.
      • controlStatusUpdatedAt

        public com.pulumi.core.Output<java.lang.String> controlStatusUpdatedAt()
        Returns:
        The date and time that the status of the security standard control was most recently updated.
      • description

        public com.pulumi.core.Output<java.lang.String> description()
        Returns:
        The standard control longer description. Provides information about what the control is checking for.
      • disabledReason

        public com.pulumi.core.Output<java.lang.String> disabledReason()
        Returns:
        A description of the reason why you are disabling a security standard control. If you specify this attribute, `controlStatus` will be set to `DISABLED` automatically.
      • 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.
      • relatedRequirements

        public com.pulumi.core.Output<java.util.List<java.lang.String>> relatedRequirements()
        Returns:
        The list of requirements that are related to this control.
      • remediationUrl

        public com.pulumi.core.Output<java.lang.String> remediationUrl()
        Returns:
        A link to remediation information for the control in the Security Hub user documentation.
      • severityRating

        public com.pulumi.core.Output<java.lang.String> severityRating()
        Returns:
        The severity of findings generated from this security standard control.
      • standardsControlArn

        public com.pulumi.core.Output<java.lang.String> standardsControlArn()
        Returns:
        The standards control ARN. See the AWS documentation for how to list existing controls using [`get-enabled-standards`](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/securityhub/get-enabled-standards.html) and [`describe-standards-controls`](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/securityhub/describe-standards-controls.html).
      • title

        public com.pulumi.core.Output<java.lang.String> title()
        Returns:
        The standard control title.
      • get

        public static StandardsControl get​(java.lang.String name,
                                           com.pulumi.core.Output<java.lang.String> id,
                                           @Nullable
                                           StandardsControlState 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.