create_location_hdfs
async
¶
create_location_hdfs(
name_nodes: HdfsNameNodeList,
authentication_type: HdfsAuthenticationType,
agent_arns: AgentArnList,
*,
config_overrides: Optional[AsyncDataSyncClientConfig] = None,
subdirectory: Optional[HdfsSubdirectory] = None,
block_size: Optional[HdfsBlockSize] = None,
replication_factor: Optional[HdfsReplicationFactor] = None,
kms_key_provider_uri: Optional[KmsKeyProviderUri] = None,
qop_configuration: Optional[QopConfiguration] = None,
simple_user: Optional[HdfsUser] = None,
kerberos_principal: Optional[KerberosPrincipal] = None,
kerberos_keytab: Optional[KerberosKeytabFile] = None,
kerberos_krb5_conf: Optional[KerberosKrb5ConfFile] = None,
tags: Optional[InputTagList] = None,
cmk_secret_config: Optional[CmkSecretConfig] = None,
custom_secret_config: Optional[CustomSecretConfig] = None,
) -> CreateLocationHdfsResponse
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.
Parameters:
-
subdirectory(Optional[HdfsSubdirectory], default:None) –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_nodes(HdfsNameNodeList) –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.
-
-
block_size(Optional[HdfsBlockSize], default:None) –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).
-
replication_factor(Optional[HdfsReplicationFactor], default:None) –The number of DataNodes to replicate the data to when writing to the HDFS cluster. By default, data is replicated to three DataNodes.
-
kms_key_provider_uri(Optional[KmsKeyProviderUri], default:None) –The URI of the HDFS cluster's Key Management Server (KMS).
-
qop_configuration(Optional[QopConfiguration], default:None) –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
QopConfigurationisn't specified,RpcProtectionandDataTransferProtectiondefault toPRIVACY. If you setRpcProtectionorDataTransferProtection, the other parameter assumes the same value. -
authentication_type(HdfsAuthenticationType) –The type of authentication used to determine the identity of the user.
-
simple_user(Optional[HdfsUser], default:None) –The user name used to identify the client on the host operating system.
If
SIMPLEis specified forAuthenticationType, this parameter is required. -
kerberos_principal(Optional[KerberosPrincipal], default:None) –The Kerberos principal with access to the files and folders on the HDFS cluster.
If
KERBEROSis specified forAuthenticationType, this parameter is required. -
kerberos_keytab(Optional[KerberosKeytabFile], default:None) –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
KERBEROSis specified forAuthenticationType, this parameter is required. -
kerberos_krb5_conf(Optional[KerberosKrb5ConfFile], default:None) –The
krb5.conffile that contains the Kerberos configuration information. You can load thekrb5.conffile 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
KERBEROSis specified forAuthenticationType, this parameter is required. -
agent_arns(AgentArnList) –The Amazon Resource Names (ARNs) of the DataSync agents that can connect to your HDFS cluster.
-
tags(Optional[InputTagList], default:None) –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.
-
cmk_secret_config(Optional[CmkSecretConfig], default:None) –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
CreateLocationHdfsrequest, you provide only the KMS key ARN. DataSync uses this KMS key together with theKerberosKeytabyou 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(withKerberosKeytab) orCustomSecretConfig(withoutKerberosKeytab) to provide credentials for aCreateLocationHdfsrequest. Do not provide both parameters for the same request. -
custom_secret_config(Optional[CustomSecretConfig], default:None) –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(withKerberosKeytab) orCustomSecretConfig(withoutKerberosKeytab) to provide credentials for aCreateLocationHdfsrequest. Do not provide both parameters for the same request.
Raises:
-
InternalException–This exception is thrown when an error occurs in the DataSync service.
-
InvalidRequestException–This exception is thrown when the client submits a malformed request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_datasync/_services/async_data_sync.py
942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 | |