create_location_smb
¶
create_location_smb(
subdirectory: SmbSubdirectory,
server_hostname: ServerHostname,
agent_arns: AgentArnList,
*,
config_overrides: Optional[DataSyncClientConfig] = 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/data_sync.py
1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 | |