LocationHdfs class

Manages an HDFS Location within AWS DataSync.

> NOTE: The DataSync Agents must be available before creating this resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.datasync.LocationHdfs("example", {
    nameNodes: [{
        hostname: exampleAwsInstance.privateDns,
        port: 80,
    }],
    agentArns: [exampleAwsDatasyncAgent.arn],
    authenticationType: "SIMPLE",
    simpleUser: "example",
});
import pulumi
import pulumi_aws as aws

example = aws.datasync.LocationHdfs("example",
    name_nodes=[{
        "hostname": example_aws_instance["privateDns"],
        "port": 80,
    }],
    agent_arns=[example_aws_datasync_agent["arn"]],
    authentication_type="SIMPLE",
    simple_user="example")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.DataSync.LocationHdfs("example", new()
    {
        NameNodes = new[]
        {
            new Aws.DataSync.Inputs.LocationHdfsNameNodeArgs
            {
                Hostname = exampleAwsInstance.PrivateDns,
                Port = 80,
            },
        },
        AgentArns = new[]
        {
            exampleAwsDatasyncAgent.Arn,
        },
        AuthenticationType = "SIMPLE",
        SimpleUser = "example",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/datasync"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datasync.NewLocationHdfs(ctx, "example", &datasync.LocationHdfsArgs{
			NameNodes: datasync.LocationHdfsNameNodeArray{
				&datasync.LocationHdfsNameNodeArgs{
					Hostname: pulumi.Any(exampleAwsInstance.PrivateDns),
					Port:     pulumi.Int(80),
				},
			},
			AgentArns: pulumi.StringArray{
				exampleAwsDatasyncAgent.Arn,
			},
			AuthenticationType: pulumi.String("SIMPLE"),
			SimpleUser:         pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_datasync_locationhdfs" "example" {
  name_nodes {
    hostname = exampleAwsInstance.privateDns
    port     = 80
  }
  agent_arns          = [exampleAwsDatasyncAgent.arn]
  authentication_type = "SIMPLE"
  simple_user         = "example"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.datasync.LocationHdfs;
import com.pulumi.aws.datasync.LocationHdfsArgs;
import com.pulumi.aws.datasync.inputs.LocationHdfsNameNodeArgs;
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 LocationHdfs("example", LocationHdfsArgs.builder()
            .nameNodes(LocationHdfsNameNodeArgs.builder()
                .hostname(exampleAwsInstance.privateDns())
                .port(80)
                .build())
            .agentArns(exampleAwsDatasyncAgent.arn())
            .authenticationType("SIMPLE")
            .simpleUser("example")
            .build());

    }
}
resources:
  example:
    type: aws:datasync:LocationHdfs
    properties:
      nameNodes:
        - hostname: ${exampleAwsInstance.privateDns}
          port: 80
      agentArns:
        - ${exampleAwsDatasyncAgent.arn}
      authenticationType: SIMPLE
      simpleUser: example

Kerberos Authentication

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";

const example = new aws.datasync.LocationHdfs("example", {
    nameNodes: [{
        hostname: exampleAwsInstance.privateDns,
        port: 80,
    }],
    agentArns: [exampleAwsDatasyncAgent.arn],
    authenticationType: "KERBEROS",
    kerberosPrincipal: "user@example.com",
    kerberosKeytabBase64: std.filebase64({
        input: "user.keytab",
    }).then(invoke => invoke.result),
    kerberosKrb5Conf: std.file({
        input: "krb5.conf",
    }).then(invoke => invoke.result),
});
import pulumi
import pulumi_aws as aws
import pulumi_std as std

example = aws.datasync.LocationHdfs("example",
    name_nodes=[{
        "hostname": example_aws_instance["privateDns"],
        "port": 80,
    }],
    agent_arns=[example_aws_datasync_agent["arn"]],
    authentication_type="KERBEROS",
    kerberos_principal="user@example.com",
    kerberos_keytab_base64=std.filebase64(input="user.keytab").result,
    kerberos_krb5_conf=std.file(input="krb5.conf").result)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.DataSync.LocationHdfs("example", new()
    {
        NameNodes = new[]
        {
            new Aws.DataSync.Inputs.LocationHdfsNameNodeArgs
            {
                Hostname = exampleAwsInstance.PrivateDns,
                Port = 80,
            },
        },
        AgentArns = new[]
        {
            exampleAwsDatasyncAgent.Arn,
        },
        AuthenticationType = "KERBEROS",
        KerberosPrincipal = "user@example.com",
        KerberosKeytabBase64 = Std.Filebase64.Invoke(new()
        {
            Input = "user.keytab",
        }).Apply(invoke => invoke.Result),
        KerberosKrb5Conf = Std.File.Invoke(new()
        {
            Input = "krb5.conf",
        }).Apply(invoke => invoke.Result),
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/datasync"
	"github.com/pulumi/pulumi-std/sdk/go/std"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
			Input: "user.keytab",
		}, nil)
		if err != nil {
			return err
		}
		invokeFile1, err := std.File(ctx, &std.FileArgs{
			Input: "krb5.conf",
		}, nil)
		if err != nil {
			return err
		}
		_, err = datasync.NewLocationHdfs(ctx, "example", &datasync.LocationHdfsArgs{
			NameNodes: datasync.LocationHdfsNameNodeArray{
				&datasync.LocationHdfsNameNodeArgs{
					Hostname: pulumi.Any(exampleAwsInstance.PrivateDns),
					Port:     pulumi.Int(80),
				},
			},
			AgentArns: pulumi.StringArray{
				exampleAwsDatasyncAgent.Arn,
			},
			AuthenticationType:   pulumi.String("KERBEROS"),
			KerberosPrincipal:    pulumi.String("user@example.com"),
			KerberosKeytabBase64: pulumi.String(invokeFilebase64.Result),
			KerberosKrb5Conf:     pulumi.String(invokeFile1.Result),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
    std = {
      source = "pulumi/std"
    }
  }
}

resource "aws_datasync_locationhdfs" "example" {
  name_nodes {
    hostname = exampleAwsInstance.privateDns
    port     = 80
  }
  agent_arns             = [exampleAwsDatasyncAgent.arn]
  authentication_type    = "KERBEROS"
  kerberos_principal     = "user@example.com"
  kerberos_keytab_base64 = filebase64("user.keytab")
  kerberos_krb5_conf     = file("krb5.conf")
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.datasync.LocationHdfs;
import com.pulumi.aws.datasync.LocationHdfsArgs;
import com.pulumi.aws.datasync.inputs.LocationHdfsNameNodeArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.Filebase64Args;
import com.pulumi.std.inputs.FileArgs;
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 LocationHdfs("example", LocationHdfsArgs.builder()
            .nameNodes(LocationHdfsNameNodeArgs.builder()
                .hostname(exampleAwsInstance.privateDns())
                .port(80)
                .build())
            .agentArns(exampleAwsDatasyncAgent.arn())
            .authenticationType("KERBEROS")
            .kerberosPrincipal("user@example.com")
            .kerberosKeytabBase64(StdFunctions.filebase64(Filebase64Args.builder()
                .input("user.keytab")
                .build()).result())
            .kerberosKrb5Conf(StdFunctions.file(FileArgs.builder()
                .input("krb5.conf")
                .build()).result())
            .build());

    }
}
resources:
  example:
    type: aws:datasync:LocationHdfs
    properties:
      nameNodes:
        - hostname: ${exampleAwsInstance.privateDns}
          port: 80
      agentArns:
        - ${exampleAwsDatasyncAgent.arn}
      authenticationType: KERBEROS
      kerberosPrincipal: user@example.com
      kerberosKeytabBase64:
        fn::invoke:
          function: std:filebase64
          arguments:
            input: user.keytab
          return: result
      kerberosKrb5Conf:
        fn::invoke:
          function: std:file
          arguments:
            input: krb5.conf
          return: result

Import

Identity Schema

Required

  • arn (String) ARN of the DataSync HDFS location.

Using pulumi import, import aws.datasync.LocationHdfs using the ARN. For example:

$ pulumi import aws:datasync/locationHdfs:LocationHdfs example arn:aws:datasync:us-east-1:123456789012:location/loc-12345678901234567

Constructors

LocationHdfs(String name, {LocationHdfsArgs? args, CustomResourceOptions? options})
Creates a new LocationHdfs. name The Pulumi resource name. args Arguments used to configure this LocationHdfs. The set of arguments for LocationHdfs. options Resource options controlling this resource's behavior.
LocationHdfs.reference(String urn)
Creates a typed reference to an existing LocationHdfs resource.

Properties

agentArns ↔ Output<List<String>>
A list of DataSync Agent ARNs with which this location will be associated.
latefinal
arn ↔ Output<String>
ARN of the DataSync Location.
latefinal
authenticationType ↔ Output<String?>
The type of authentication used to determine the identity of the user. Valid values are SIMPLE and KERBEROS.
latefinal
blockSize ↔ Output<int?>
The size of data blocks to write into the HDFS cluster. The block size must be a multiple of 512 bytes. The default block size is 128 mebibytes (MiB).
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
kerberosKeytab ↔ Output<String?>
The Kerberos key table (keytab) that contains mappings between the defined Kerberos principal and the encrypted keys. Use kerberosKeytabBase64 instead whenever the value is not a valid UTF-8 string. If KERBEROS is specified for authenticationType, this parameter (or kerberosKeytabBase64) is required.
latefinal
kerberosKeytabBase64 ↔ Output<String?>
Use instead of kerberosKeytab to pass base64-encoded binary data directly. If KERBEROS is specified for authenticationType, this parameter (or kerberosKeytab) is required.
latefinal
kerberosKrb5Conf ↔ Output<String?>
The krb5.conf file that contains the Kerberos configuration information. Use kerberosKrb5ConfBase64 instead whenever the value is not a valid UTF-8 string. If KERBEROS is specified for authenticationType, this parameter (or kerberosKrb5ConfBase64) is required.
latefinal
kerberosKrb5ConfBase64 ↔ Output<String?>
Use instead of kerberosKrb5Conf to pass base64-encoded binary data directly. If KERBEROS is specified for authenticationType, this parameter (or kerberosKrb5Conf) is required.
latefinal
kerberosPrincipal ↔ Output<String?>
The Kerberos principal with access to the files and folders on the HDFS cluster. If KERBEROS is specified for authenticationType, this parameter is required.
latefinal
kmsKeyProviderUri ↔ Output<String?>
The URI of the HDFS cluster's Key Management Server (KMS).
latefinal
nameNodes ↔ Output<List<LocationHdfsNameNode>>
The NameNode that manages the HDFS namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes. You can use only one NameNode. See configuration below.
latefinal
qopConfiguration ↔ Output<LocationHdfsQopConfiguration>
The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer protection settings configured on the Hadoop Distributed File System (HDFS) cluster. If qopConfiguration isn't specified, rpcProtection and dataTransferProtection default to PRIVACY. If you set RpcProtection or DataTransferProtection, the other parameter assumes the same value. See configuration below.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
replicationFactor ↔ Output<int?>
The number of DataNodes to replicate the data to when writing to the HDFS cluster. By default, data is replicated to three DataNodes.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
simpleUser ↔ Output<String?>
The user name used to identify the client on the host operating system. If SIMPLE is specified for authenticationType, this parameter is required.
latefinal
subdirectory ↔ Output<String?>
A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write data to the HDFS cluster. If the subdirectory isn't specified, it will default to /.
latefinal
tags ↔ Output<Map<String, String>?>
Key-value pairs of resource tags to assign to the DataSync Location. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
uri ↔ Output<String>
latefinal
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {LocationHdfsState? state, CustomResourceOptions? options}) → LocationHdfs
Gets an existing LocationHdfs resource's state with the given name and id.