Class Resource


  • public class Resource
    extends com.pulumi.resources.CustomResource
    Registers a Lake Formation resource (e.g., S3 bucket) as managed by the Data Catalog. In other words, the S3 path is added to the data lake. Choose a role that has read/write access to the chosen Amazon S3 path or use the service-linked role. When you register the S3 path, the service-linked role and a new inline policy are created on your behalf. Lake Formation adds the first path to the inline policy and attaches it to the service-linked role. When you register subsequent paths, Lake Formation adds the path to the existing policy. ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.s3.S3Functions;
     import com.pulumi.aws.s3.inputs.GetBucketArgs;
     import com.pulumi.aws.lakeformation.Resource;
     import com.pulumi.aws.lakeformation.ResourceArgs;
     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) {
             final var example = S3Functions.getBucket(GetBucketArgs.builder()
                 .bucket("an-example-bucket")
                 .build());
     
             var exampleResource = new Resource("exampleResource", ResourceArgs.builder()
                 .arn(example.arn())
                 .build());
     
         }
     }
     
     
    • 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
    • Constructor Summary

      Constructors 
      Constructor Description
      Resource​(java.lang.String name)  
      Resource​(java.lang.String name, ResourceArgs args)  
      Resource​(java.lang.String name, ResourceArgs 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> arn()  
      static Resource get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ResourceState 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.Boolean> hybridAccessEnabled()  
      com.pulumi.core.Output<java.lang.String> lastModified()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> roleArn()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> useServiceLinkedRole()  
      com.pulumi.core.Output<java.lang.Boolean> withFederation()  
      com.pulumi.core.Output<java.lang.Boolean> withPrivilegedAccess()  
      • 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

      • Resource

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

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

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

      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of the resource. The following arguments are optional:
      • hybridAccessEnabled

        public com.pulumi.core.Output<java.lang.Boolean> hybridAccessEnabled()
        Returns:
        Flag to enable AWS Lake Formation hybrid access permission mode.
      • lastModified

        public com.pulumi.core.Output<java.lang.String> lastModified()
        Returns:
        Date and time the resource was last modified in [RFC 3339 format](https://tools.ietf.org/html/rfc3339#section-5.8).
      • 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.
      • roleArn

        public com.pulumi.core.Output<java.lang.String> roleArn()
        Returns:
        Role that has read/write access to the resource.
      • useServiceLinkedRole

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> useServiceLinkedRole()
        Returns:
        Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog.
      • withFederation

        public com.pulumi.core.Output<java.lang.Boolean> withFederation()
        Returns:
        Whether or not the resource is a federated resource. Set to true when registering AWS Glue connections for federated catalog functionality.
      • withPrivilegedAccess

        public com.pulumi.core.Output<java.lang.Boolean> withPrivilegedAccess()
        Returns:
        Boolean to grant the calling principal the permissions to perform all supported Lake Formation operations on the registered data location. > **NOTE:** AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.
      • get

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