create_location_smb
async
¶
create_location_smb(
subdirectory: SmbSubdirectory,
server_hostname: ServerHostname,
agent_arns: AgentArnList,
*,
config_overrides: Optional[AsyncDataSyncClientConfig] = None,
user: Optional[SmbUser] = None,
domain: Optional[SmbDomain] = None,
password: Optional[SmbPassword] = None,
cmk_secret_config: Optional[CmkSecretConfig] = None,
custom_secret_config: Optional[CustomSecretConfig] = None,
mount_options: Optional[SmbMountOptions] = None,
tags: Optional[InputTagList] = None,
authentication_type: Optional[SmbAuthenticationType] = None,
dns_ip_addresses: Optional[DnsIpList] = None,
kerberos_principal: Optional[KerberosPrincipal] = None,
kerberos_keytab: Optional[KerberosKeytabFile] = None,
kerberos_krb5_conf: Optional[KerberosKrb5ConfFile] = None,
) -> CreateLocationSmbResponse
Creates a transfer location for a Server Message Block (SMB) file server. DataSync can use this location as a source or destination for transferring data.
Before you begin, make sure that you understand how DataSync accesses SMB file servers. For more information, see Providing DataSync access to SMB file servers.
Parameters:
-
subdirectory(SmbSubdirectory) –Specifies the name of the share exported by your SMB file server where DataSync will read or write data. You can include a subdirectory in the share path (for example,
/path/to/subdirectory). Make sure that other SMB clients in your network can also mount this path.To copy all data in the subdirectory, DataSync must be able to mount the SMB share and access all of its data. For more information, see Providing DataSync access to SMB file servers.
-
server_hostname(ServerHostname) –Specifies the domain name or IP address (IPv4 or IPv6) of the SMB file server that your DataSync agent connects to.
If you're using Kerberos authentication, you must specify a domain name.
-
user(Optional[SmbUser], default:None) –Specifies the user that can mount and access the files, folders, and file metadata in your SMB file server. This parameter applies only if
AuthenticationTypeis set toNTLM.For information about choosing a user with the right level of access for your transfer, see Providing DataSync access to SMB file servers.
-
domain(Optional[SmbDomain], default:None) –Specifies the Windows domain name that your SMB file server belongs to. This parameter applies only if
AuthenticationTypeis set toNTLM.If you have multiple domains in your environment, configuring this parameter makes sure that DataSync connects to the right file server.
-
password(Optional[SmbPassword], default:None) –Specifies the password of the user who can mount your SMB file server and has permission to access the files and folders involved in your transfer. This parameter applies only if
AuthenticationTypeis set toNTLM. -
cmk_secret_config(Optional[CmkSecretConfig], default:None) –Specifies configuration information for a DataSync-managed secret, either a
PasswordorKerberosKeytab(forNTLM(default) andKERBEROSauthentication types, respectively) that DataSync uses to access a specific SMB storage location, with a customer-managed KMS key.When you include this parameter as part of a
CreateLocationSmbRequestrequest, you provide only the KMS key ARN. DataSync uses this KMS key together with either thePasswordorKerberosKeytabyou specify 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 eitherPasswordorKerberosKeytab) orCustomSecretConfig(without anyPasswordandKerberosKeytab) to provide credentials for aCreateLocationSmbRequestrequest. Do not provide bothCmkSecretConfigandCustomSecretConfigparameters for the same request. -
custom_secret_config(Optional[CustomSecretConfig], default:None) –Specifies configuration information for a customer-managed Secrets Manager secret where the SMB storage location credentials is stored in Secrets Manager as plain text (for
Password) or binary (forKerberosKeytab). 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(withSasConfiguration) orCustomSecretConfig(withoutSasConfiguration) to provide credentials for aCreateLocationSmbRequestrequest. Do not provide both parameters for the same request. -
agent_arns(AgentArnList) –Specifies the DataSync agent (or agents) that can connect to your SMB file server. You specify an agent by using its Amazon Resource Name (ARN).
-
mount_options(Optional[SmbMountOptions], default:None) –Specifies the version of the SMB protocol that DataSync uses to access your SMB file server.
-
tags(Optional[InputTagList], default:None) –Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.
-
authentication_type(Optional[SmbAuthenticationType], default:None) –Specifies the authentication protocol that DataSync uses to connect to your SMB file server. DataSync supports
NTLM(default) andKERBEROSauthentication.For more information, see Providing DataSync access to SMB file servers.
-
dns_ip_addresses(Optional[DnsIpList], default:None) –Specifies the IPv4 or IPv6 addresses for the DNS servers that your SMB file server belongs to. This parameter applies only if
AuthenticationTypeis set toKERBEROS.If you have multiple domains in your environment, configuring this parameter makes sure that DataSync connects to the right SMB file server.
-
kerberos_principal(Optional[KerberosPrincipal], default:None) –Specifies a Kerberos principal, which is an identity in your Kerberos realm that has permission to access the files, folders, and file metadata in your SMB file server.
A Kerberos principal might look like
HOST/[email protected].Principal names are case sensitive. Your DataSync task execution will fail if the principal that you specify for this parameter doesn’t exactly match the principal that you use to create the keytab file.
-
kerberos_keytab(Optional[KerberosKeytabFile], default:None) –Specifies your Kerberos key table (keytab) file, which includes mappings between your Kerberos principal and encryption keys.
To avoid task execution errors, make sure that the Kerberos principal that you use to create the keytab file matches exactly what you specify for
KerberosPrincipal. -
kerberos_krb5_conf(Optional[KerberosKrb5ConfFile], default:None) –Specifies a Kerberos configuration file (
krb5.conf) that defines your Kerberos realm configuration.The file must be base64 encoded. If you're using the CLI, the encoding is done for you.
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
1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 | |