create_replication_subnet_group
¶
create_replication_subnet_group(
replication_subnet_group_identifier: String,
replication_subnet_group_description: String,
subnet_ids: SubnetIdentifierList,
*,
config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
tags: Optional[TagList] = None,
) -> CreateReplicationSubnetGroupResponse
Creates a replication subnet group given a list of the subnet IDs in a VPC.
The VPC needs to have at least one subnet in at least two availability zones in the Amazon Web Services Region, otherwise the service will throw a ReplicationSubnetGroupDoesNotCoverEnoughAZs exception.
If a replication subnet group exists in your Amazon Web Services account, the CreateReplicationSubnetGroup action returns the following error message: The Replication Subnet Group already exists. In this case, delete the existing replication subnet group. To do so, use the DeleteReplicationSubnetGroup action. Optionally, choose Subnet groups in the DMS console, then choose your subnet group. Next, choose Delete from Actions.
Parameters:
-
replication_subnet_group_identifier(String) –The name for the replication subnet group. This value is stored as a lowercase string.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, or hyphens. Must not be "default".
Example:
mySubnetgroup -
replication_subnet_group_description(String) –The description for the subnet group.
Constraints: This parameter Must not contain non-printable control characters.
-
subnet_ids(SubnetIdentifierList) –Two or more subnet IDs to be assigned to the subnet group.
-
tags(Optional[TagList], default:None) –One or more tags to be assigned to the subnet group.
Raises:
-
AccessDeniedFault–DMS was denied access to the endpoint. Check that the role is correctly configured.
-
InvalidSubnet–The subnet provided isn't valid.
-
ReplicationSubnetGroupDoesNotCoverEnoughAZs–The replication subnet group does not cover enough Availability Zones (AZs). Edit the replication subnet group and add more AZs.
-
ResourceAlreadyExistsFault–The resource you are attempting to create already exists.
-
ResourceNotFoundFault–The resource could not be found.
-
ResourceQuotaExceededFault–The quota for this resource quota has been exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Create replication subnet group Creates a replication subnet group given a list of the subnet IDs in a VPC.
>>> client.create_replication_subnet_group(replication_subnet_group_identifier='us-west-2ab-vpc-215ds366', replication_subnet_group_description='US West subnet group', subnet_ids=['subnet-e145356n', 'subnet-58f79200'], tags=[{'Key': 'Acount', 'Value': '145235'}])
Source code in docs_src/capo_database_migration_service/_services/database_migration_service.py
1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 | |