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
1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 | |