Package com.pulumi.aws.securityhub
Class FeatureV2
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.securityhub.FeatureV2
-
public class FeatureV2 extends com.pulumi.resources.CustomResourceManages an opt-in [Security Hub V2](https://docs.aws.amazon.com/securityhub/latest/userguide/what-is-securityhub.html) feature, such as network scanning (NetScan), for the calling account in the current AWS Region. > **NOTE:** Security Hub V2 must be enabled (see `aws.securityhub.AccountV2`) before you can enable a feature. Use `dependsOn` to ensure the correct ordering. > **NOTE:** Deleting this resource does not disable the feature, the resource in simply removed from state instead. > **NOTE:** You cannot enable a feature that is managed by an organization policy. ## Example Usage ### Basic
## Import ### Identity Schema #### Required * `featureName` (String) Name of the opt-in Security Hub V2 feature. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import Security Hub V2 features using `featureName`. For example: ```sh $ pulumi import aws:securityhub/featureV2:FeatureV2 example NETWORK_SCANNING ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.securityhub.AccountV2; import com.pulumi.aws.securityhub.FeatureV2; import com.pulumi.aws.securityhub.FeatureV2Args; 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 AccountV2("example"); var exampleFeatureV2 = new FeatureV2("exampleFeatureV2", FeatureV2Args.builder() .featureName("NETWORK_SCANNING") .featureStatus("ENABLED") .build(), CustomResourceOptions.builder() .dependsOn(example) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description FeatureV2(java.lang.String name)FeatureV2(java.lang.String name, FeatureV2Args args)FeatureV2(java.lang.String name, FeatureV2Args 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>featureName()com.pulumi.core.Output<java.lang.String>featureStatus()static FeatureV2get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, FeatureV2State 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()
-
-
-
Constructor Detail
-
FeatureV2
public FeatureV2(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
FeatureV2
public FeatureV2(java.lang.String name, FeatureV2Args args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
FeatureV2
public FeatureV2(java.lang.String name, FeatureV2Args 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
-
featureName
public com.pulumi.core.Output<java.lang.String> featureName()
- Returns:
- Name of the opt-in feature to enable. Valid values: `NETWORK_SCANNING`. Changing this forces a new resource to be created.
-
featureStatus
public com.pulumi.core.Output<java.lang.String> featureStatus()
- Returns:
- Current enablement status of the feature. 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.
-
get
public static FeatureV2 get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable FeatureV2State 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.
-
-