location_hdfs
Creates, updates, deletes, gets or lists a location_hdfs resource.
Overview
| Name | location_hdfs |
| Type | Resource |
| Id | aws.datasync.location_hdfs |
Fields
The following fields are returned by SELECT queries:
- describe_location_hdfs
| Name | Datatype | Description |
|---|---|---|
agent_arns | array | The ARNs of the DataSync agents that can connect with your HDFS cluster. |
authentication_type | string | The type of authentication used to determine the identity of the user. (SIMPLE, KERBEROS) |
block_size | integer | The size of the data blocks to write into the HDFS cluster. |
cmk_secret_config | object | Describes configuration information for a DataSync-managed secret, such as a KerberosKeytab that DataSync uses to access a specific storage location, with a customer-managed KMS key. |
creation_time | string (date-time) | The time that the HDFS location was created. |
custom_secret_config | object | Describes configuration information for a customer-managed secret, such as a KerberosKeytab that DataSync uses to access a specific storage location, with a customer-managed Identity and Access Management (IAM) role that provides access to the secret. |
kerberos_principal | string | The Kerberos principal with access to the files and folders on the HDFS cluster. This parameter is used if the AuthenticationType is defined as KERBEROS. (pattern: <code>^.+$</code>) |
kms_key_provider_uri | string | The URI of the HDFS cluster's Key Management Server (KMS). (pattern: <code>^kms://http[s]?@(([a-zA-Z0-9-][a-zA-Z0-9]).)([A-Za-z0-9-][A-Za-z0-9])(;(([a-zA-Z0-9-][a-zA-Z0-9]).)([A-Za-z0-9-][A-Za-z0-9]))*:[0-9]{1,5}/kms$</code>) |
location_arn | string | The ARN of the HDFS location. (pattern: <code>^arn:(aws|aws-cn|aws-us-gov|aws-eusc|aws-iso|aws-iso-b):datasync:[a-z-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$</code>) |
location_uri | string | The URI of the HDFS location. (pattern: <code>^(efs|nfs|s3|smb|hdfs|fsx[a-z0-9-]+)://[a-zA-Z0-9.:/-]+$</code>) |
managed_secret_config | object | Describes configuration information for a DataSync-managed secret, such as a KerberosKeytab that DataSync uses to access a specific storage location. DataSync uses the default Amazon Web Services-managed KMS key to encrypt this secret in Secrets Manager. |
name_nodes | array | The NameNode that manages the HDFS namespace. |
qop_configuration | object | The Quality of Protection (QOP) configuration, which specifies the Remote Procedure Call (RPC) and data transfer protection settings configured on the HDFS cluster. |
replication_factor | integer | The number of DataNodes to replicate the data to when writing to the HDFS cluster. |
simple_user | string | The user name to identify the client on the host operating system. This parameter is used if the AuthenticationType is defined as SIMPLE. (pattern: <code>^[.A-Za-z0-9][-.A-Za-z0-9]*$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_location_hdfs | select | region | Provides details about how an DataSync transfer location for a Hadoop Distributed File System (HDFS) is configured. | |
create_location_hdfs | insert | region, NameNodes, AuthenticationType, AgentArns | Creates a transfer location for a Hadoop Distributed File System (HDFS). DataSync can use this location as a source or destination for transferring data. Before you begin, make sure that you understand how DataSync accesses HDFS clusters. | |
update_location_hdfs | update | region, LocationArn | Modifies the following configuration parameters of the Hadoop Distributed File System (HDFS) transfer location that you're using with DataSync. For more information, see Configuring DataSync transfers with an HDFS cluster. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_location_hdfs
Provides details about how an DataSync transfer location for a Hadoop Distributed File System (HDFS) is configured.
SELECT
agent_arns,
authentication_type,
block_size,
cmk_secret_config,
creation_time,
custom_secret_config,
kerberos_principal,
kms_key_provider_uri,
location_arn,
location_uri,
managed_secret_config,
name_nodes,
qop_configuration,
replication_factor,
simple_user
FROM aws.datasync.location_hdfs
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_location_hdfs
- Manifest
Creates a transfer location for a Hadoop Distributed File System (HDFS). DataSync can use this location as a source or destination for transferring data. Before you begin, make sure that you understand how DataSync accesses HDFS clusters.
INSERT INTO aws.datasync.location_hdfs (
Subdirectory,
NameNodes,
BlockSize,
ReplicationFactor,
KmsKeyProviderUri,
QopConfiguration,
AuthenticationType,
SimpleUser,
KerberosPrincipal,
KerberosKeytab,
KerberosKrb5Conf,
AgentArns,
Tags,
CmkSecretConfig,
CustomSecretConfig,
region
)
SELECT
'{{ Subdirectory }}',
'{{ NameNodes }}' /* required */,
{{ BlockSize }},
{{ ReplicationFactor }},
'{{ KmsKeyProviderUri }}',
'{{ QopConfiguration }}',
'{{ AuthenticationType }}' /* required */,
'{{ SimpleUser }}',
'{{ KerberosPrincipal }}',
'{{ KerberosKeytab }}',
'{{ KerberosKrb5Conf }}',
'{{ AgentArns }}' /* required */,
'{{ Tags }}',
'{{ CmkSecretConfig }}',
'{{ CustomSecretConfig }}',
'{{ region }}'
RETURNING
location_arn
;
# Description fields are for documentation purposes
- name: location_hdfs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the location_hdfs resource.
- name: Subdirectory
value: "{{ Subdirectory }}"
description: |
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 /.
- name: NameNodes
description: |
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. The number of NameNodes you can specify depends on the task mode: Enhanced mode – You can specify multiple NameNodes for HDFS High Availability (HA) configurations. Basic mode – You can specify only one NameNode.
value:
- Hostname: "{{ Hostname }}"
Port: {{ Port }}
- name: BlockSize
value: {{ BlockSize }}
description: |
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).
- name: ReplicationFactor
value: {{ ReplicationFactor }}
description: |
The number of DataNodes to replicate the data to when writing to the HDFS cluster. By default, data is replicated to three DataNodes.
- name: KmsKeyProviderUri
value: "{{ KmsKeyProviderUri }}"
description: |
The URI of the HDFS cluster's Key Management Server (KMS).
- name: QopConfiguration
description: |
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.
value:
RpcProtection: "{{ RpcProtection }}"
DataTransferProtection: "{{ DataTransferProtection }}"
- name: AuthenticationType
value: "{{ AuthenticationType }}"
description: |
The type of authentication used to determine the identity of the user.
valid_values: ['SIMPLE', 'KERBEROS']
- name: SimpleUser
value: "{{ SimpleUser }}"
description: |
The user name used to identify the client on the host operating system. If SIMPLE is specified for AuthenticationType, this parameter is required.
- name: KerberosPrincipal
value: "{{ KerberosPrincipal }}"
description: |
The Kerberos principal with access to the files and folders on the HDFS cluster. If KERBEROS is specified for AuthenticationType, this parameter is required.
- name: KerberosKeytab
value: "{{ KerberosKeytab }}"
description: |
The Kerberos key table (keytab) that contains mappings between the defined Kerberos principal and the encrypted keys. You can load the keytab from a file by providing the file's address. If KERBEROS is specified for AuthenticationType, this parameter is required.
- name: KerberosKrb5Conf
value: "{{ KerberosKrb5Conf }}"
description: |
The krb5.conf file that contains the Kerberos configuration information. You can load the krb5.conf file by providing the file's address. If you're using the CLI, it performs the base64 encoding for you. Otherwise, provide the base64-encoded text. If KERBEROS is specified for AuthenticationType, this parameter is required.
- name: AgentArns
value:
- "{{ AgentArns }}"
description: |
The Amazon Resource Names (ARNs) of the DataSync agents that can connect to your HDFS cluster.
- name: Tags
description: |
The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: CmkSecretConfig
description: |
Specifies configuration information for a DataSync-managed secret, which includes the Kerberos keytab that DataSync uses to access a specific Hadoop Distributed File System (HDFS) storage location, with a customer-managed KMS key. When you include this parameter as part of a CreateLocationHdfs request, you provide only the KMS key ARN. DataSync uses this KMS key together with the KerberosKeytab you specify for to create a DataSync-managed secret to store the location access credentials. Make sure that DataSync has permission to access the KMS key that you specify. For more information, see Using a service-managed secret encrypted with a custom KMS key. You can use either CmkSecretConfig (with KerberosKeytab) or CustomSecretConfig (without KerberosKeytab) to provide credentials for a CreateLocationHdfs request. Do not provide both parameters for the same request.
value:
SecretArn: "{{ SecretArn }}"
KmsKeyArn: "{{ KmsKeyArn }}"
- name: CustomSecretConfig
description: |
Specifies configuration information for a customer-managed Secrets Manager secret where the Kerberos keytab for the HDFS storage location is stored in binary, in Secrets Manager. This configuration includes the secret ARN, and the ARN for an IAM role that provides access to the secret. For more information, see Using a secret that you manage. You can use either CmkSecretConfig (with KerberosKeytab) or CustomSecretConfig (without KerberosKeytab) to provide credentials for a CreateLocationHdfs request. Do not provide both parameters for the same request.
value:
SecretArn: "{{ SecretArn }}"
SecretAccessRoleArn: "{{ SecretAccessRoleArn }}"
UPDATE examples
- update_location_hdfs
Modifies the following configuration parameters of the Hadoop Distributed File System (HDFS) transfer location that you're using with DataSync. For more information, see Configuring DataSync transfers with an HDFS cluster.
UPDATE aws.datasync.location_hdfs
SET
LocationArn = '{{ LocationArn }}',
Subdirectory = '{{ Subdirectory }}',
NameNodes = '{{ NameNodes }}',
BlockSize = {{ BlockSize }},
ReplicationFactor = {{ ReplicationFactor }},
KmsKeyProviderUri = '{{ KmsKeyProviderUri }}',
QopConfiguration = '{{ QopConfiguration }}',
AuthenticationType = '{{ AuthenticationType }}',
SimpleUser = '{{ SimpleUser }}',
KerberosPrincipal = '{{ KerberosPrincipal }}',
KerberosKeytab = '{{ KerberosKeytab }}',
KerberosKrb5Conf = '{{ KerberosKrb5Conf }}',
AgentArns = '{{ AgentArns }}',
CmkSecretConfig = '{{ CmkSecretConfig }}',
CustomSecretConfig = '{{ CustomSecretConfig }}'
WHERE
region = '{{ region }}' --required
AND LocationArn = '{{ LocationArn }}' --required;