Class OrganizationConfiguration


  • public class OrganizationConfiguration
    extends com.pulumi.resources.CustomResource
    Manages the GuardDuty Organization Configuration in the current AWS Region. The AWS account utilizing this resource must have been assigned as a delegated Organization administrator account, e.g., via the `aws.guardduty.OrganizationAdminAccount` resource. More information about Organizations support in GuardDuty can be found in the [GuardDuty User Guide](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_organizations.html). > **NOTE:** This is an advanced resource. The provider will automatically assume management of the GuardDuty Organization Configuration without import and perform no actions on removal from the resource configuration. ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.guardduty.Detector;
     import com.pulumi.aws.guardduty.DetectorArgs;
     import com.pulumi.aws.guardduty.OrganizationConfiguration;
     import com.pulumi.aws.guardduty.OrganizationConfigurationArgs;
     import com.pulumi.aws.guardduty.inputs.OrganizationConfigurationDatasourcesArgs;
     import com.pulumi.aws.guardduty.inputs.OrganizationConfigurationDatasourcesS3LogsArgs;
     import com.pulumi.aws.guardduty.inputs.OrganizationConfigurationDatasourcesKubernetesArgs;
     import com.pulumi.aws.guardduty.inputs.OrganizationConfigurationDatasourcesKubernetesAuditLogsArgs;
     import com.pulumi.aws.guardduty.inputs.OrganizationConfigurationDatasourcesMalwareProtectionArgs;
     import com.pulumi.aws.guardduty.inputs.OrganizationConfigurationDatasourcesMalwareProtectionScanEc2InstanceWithFindingsArgs;
     import com.pulumi.aws.guardduty.inputs.OrganizationConfigurationDatasourcesMalwareProtectionScanEc2InstanceWithFindingsEbsVolumesArgs;
     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 Detector("example", DetectorArgs.builder()
                 .enable(true)
                 .build());
     
             var exampleOrganizationConfiguration = new OrganizationConfiguration("exampleOrganizationConfiguration", OrganizationConfigurationArgs.builder()
                 .datasources(OrganizationConfigurationDatasourcesArgs.builder()
                     .s3Logs(OrganizationConfigurationDatasourcesS3LogsArgs.builder()
                         .autoEnable(true)
                         .build())
                     .kubernetes(OrganizationConfigurationDatasourcesKubernetesArgs.builder()
                         .auditLogs(OrganizationConfigurationDatasourcesKubernetesAuditLogsArgs.builder()
                             .enable(true)
                             .build())
                         .build())
                     .malwareProtection(OrganizationConfigurationDatasourcesMalwareProtectionArgs.builder()
                         .scanEc2InstanceWithFindings(OrganizationConfigurationDatasourcesMalwareProtectionScanEc2InstanceWithFindingsArgs.builder()
                             .ebsVolumes(OrganizationConfigurationDatasourcesMalwareProtectionScanEc2InstanceWithFindingsEbsVolumesArgs.builder()
                                 .autoEnable(true)
                                 .build())
                             .build())
                         .build())
                     .build())
                 .autoEnableOrganizationMembers("ALL")
                 .detectorId(example.id())
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import GuardDuty Organization Configurations using the GuardDuty Detector ID. For example: ```sh $ pulumi import aws:guardduty/organizationConfiguration:OrganizationConfiguration example 00b00fd5aecc0ab60a708659477e9617 ```
    • 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> autoEnableOrganizationMembers()  
      com.pulumi.core.Output<OrganizationConfigurationDatasources> datasources()  
      com.pulumi.core.Output<java.lang.String> detectorId()  
      static OrganizationConfiguration get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, OrganizationConfigurationState 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()  
      • 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

      • OrganizationConfiguration

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

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

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

      • autoEnableOrganizationMembers

        public com.pulumi.core.Output<java.lang.String> autoEnableOrganizationMembers()
        Returns:
        Auto-enablement configuration of GuardDuty for the member accounts in the organization. Valid values are `ALL`, `NEW`, `NONE`.
      • datasources

        public com.pulumi.core.Output<OrganizationConfigurationDatasources> datasources()
        Returns:
        Configuration for the collected datasources. See `datasources` below. [Deprecated](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty-feature-object-api-changes-march2023.html) in favor of `aws.guardduty.OrganizationConfigurationFeature` resources.
      • detectorId

        public com.pulumi.core.Output<java.lang.String> detectorId()
        Returns:
        Detector ID of the GuardDuty account.
      • 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. > **NOTE:** One of `autoEnable` or `autoEnableOrganizationMembers` must be specified.
      • get

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