diff --git a/scaleway-async/scaleway_async/vpc/v2/api.py b/scaleway-async/scaleway_async/vpc/v2/api.py index 8058b9ace..3c6229f14 100644 --- a/scaleway-async/scaleway_async/vpc/v2/api.py +++ b/scaleway-async/scaleway_async/vpc/v2/api.py @@ -1438,8 +1438,8 @@ async def list_subnet_overlaps( ) -> ListSubnetOverlapsResponse: """ List subnet overlaps. - List subnet overlaps between the VPCConnector VPC and the target VPC or for a specific subnet if specified. - :param vpc_connector_id: VPCConnector ID. + List subnet overlaps between the VPCs on both sides of a connector, or for a specific subnet if specified. + :param vpc_connector_id: VPC Peering connector ID. :param region: Region to target. If none is passed will use default region from the config. :param order_by: Sort order of the returned Subnet overlaps. :param page: Page number to return, from the paginated results. @@ -1485,8 +1485,8 @@ async def list_subnet_overlaps_all( ) -> list[ListSubnetOverlapsResponseSubnetOverlap]: """ List subnet overlaps. - List subnet overlaps between the VPCConnector VPC and the target VPC or for a specific subnet if specified. - :param vpc_connector_id: VPCConnector ID. + List subnet overlaps between the VPCs on both sides of a connector, or for a specific subnet if specified. + :param vpc_connector_id: VPC Peering connector ID. :param region: Region to target. If none is passed will use default region from the config. :param order_by: Sort order of the returned Subnet overlaps. :param page: Page number to return, from the paginated results. @@ -1530,17 +1530,19 @@ async def list_ingress_rules( project_id: Optional[str] = None, ) -> ListIngressRulesResponse: """ + List ingress rules. + List existing ingress rules in the specified region. :param region: Region to target. If none is passed will use default region from the config. - :param order_by: - :param page: - :param page_size: - :param vpc_id: - :param nexthop_resource_ip: - :param nexthop_private_network_id: - :param is_ipv6: - :param tags: - :param organization_id: - :param project_id: + :param order_by: Sort order of the returned ingress rules. + :param page: Page number to return, from the paginated results. + :param page_size: Maximum number of ingress rules to return per page. + :param vpc_id: ID of the VPC to filter for. + :param nexthop_resource_ip: Next hop IP to filter for. + :param nexthop_private_network_id: Next hop Private Network ID to filter for. Only ingress rules with this Private Network as next hop will be returned. + :param is_ipv6: Whether to return only IPv4 or IPv6 ingress rules. + :param tags: Tags to filter for. Only ingress rules with one or more matching tags will be returned. + :param organization_id: Organization ID to filter for. Only ingress rules belonging to this Organization will be returned. + :param project_id: Project ID to filter for. Only ingress rules belonging to this Project will be returned. :return: :class:`ListIngressRulesResponse ` Usage: @@ -1590,17 +1592,19 @@ async def list_ingress_rules_all( project_id: Optional[str] = None, ) -> list[IngressRule]: """ + List ingress rules. + List existing ingress rules in the specified region. :param region: Region to target. If none is passed will use default region from the config. - :param order_by: - :param page: - :param page_size: - :param vpc_id: - :param nexthop_resource_ip: - :param nexthop_private_network_id: - :param is_ipv6: - :param tags: - :param organization_id: - :param project_id: + :param order_by: Sort order of the returned ingress rules. + :param page: Page number to return, from the paginated results. + :param page_size: Maximum number of ingress rules to return per page. + :param vpc_id: ID of the VPC to filter for. + :param nexthop_resource_ip: Next hop IP to filter for. + :param nexthop_private_network_id: Next hop Private Network ID to filter for. Only ingress rules with this Private Network as next hop will be returned. + :param is_ipv6: Whether to return only IPv4 or IPv6 ingress rules. + :param tags: Tags to filter for. Only ingress rules with one or more matching tags will be returned. + :param organization_id: Organization ID to filter for. Only ingress rules belonging to this Organization will be returned. + :param project_id: Project ID to filter for. Only ingress rules belonging to this Project will be returned. :return: :class:`list[IngressRule] ` Usage: @@ -1640,13 +1644,15 @@ async def create_ingress_rule( tags: Optional[list[str]] = None, ) -> IngressRule: """ - :param vpc_id: - :param source: - :param nexthop_resource_ip: - :param nexthop_private_network_id: + Create an ingress rule. + Create an ingress rule in the specified region. + :param vpc_id: ID of the VPC this rule will belong to. + :param source: Source network to match ingress traffic on. Can be IPv6 or IPv4. + :param nexthop_resource_ip: IP of the local resource to redirect ingress traffic to. IP version must be consistent with the source network. + :param nexthop_private_network_id: ID of the Private Network the destination resource is in. :param region: Region to target. If none is passed will use default region from the config. - :param description: - :param tags: + :param description: Description for this ingress rule. + :param tags: Tags for this ingress rule. :return: :class:`IngressRule ` Usage: @@ -1691,7 +1697,9 @@ async def get_ingress_rule( region: Optional[ScwRegion] = None, ) -> IngressRule: """ - :param rule_id: + Get an ingress rule. + Retrieve details of an existing ingress rule, specified by its ingress rule ID. + :param rule_id: ID of the ingress rule to return. :param region: Region to target. If none is passed will use default region from the config. :return: :class:`IngressRule ` @@ -1728,13 +1736,15 @@ async def update_ingress_rule( tags: Optional[list[str]] = None, ) -> IngressRule: """ - :param rule_id: + Update an ingress rule. + Update an ingress rule specified by its ingress rule ID. + :param rule_id: ID of the ingress rule to update. :param region: Region to target. If none is passed will use default region from the config. - :param source: - :param nexthop_resource_ip: - :param nexthop_private_network_id: - :param description: - :param tags: + :param source: Source network to match ingress traffic on. Can be IPv4 or IPv6. + :param nexthop_resource_ip: IP of the local resource to redirect ingress traffic to. IP version must be consistent with the source network. + :param nexthop_private_network_id: ID of the Private Network the destination resource is in. + :param description: Description to set for this ingress rule. + :param tags: Tags to set for this ingress rule. :return: :class:`IngressRule ` Usage: @@ -1777,7 +1787,9 @@ async def delete_ingress_rule( region: Optional[ScwRegion] = None, ) -> None: """ - :param rule_id: + Delete an ingress rule. + Delete an ingress rule specified by its ingress rule ID. + :param rule_id: ID of the ingress rule to delete. :param region: Region to target. If none is passed will use default region from the config. Usage: diff --git a/scaleway-async/scaleway_async/vpc/v2/marshalling.py b/scaleway-async/scaleway_async/vpc/v2/marshalling.py index c7c6c7cb1..30b67554b 100644 --- a/scaleway-async/scaleway_async/vpc/v2/marshalling.py +++ b/scaleway-async/scaleway_async/vpc/v2/marshalling.py @@ -296,7 +296,7 @@ def unmarshal_IngressRule(data: Any) -> IngressRule: if field is not None: args["is_ipv6"] = field else: - args["is_ipv6"] = None + args["is_ipv6"] = False field = data.get("source", None) if field is not None: @@ -338,7 +338,7 @@ def unmarshal_IngressRule(data: Any) -> IngressRule: if field is not None: args["tags"] = field else: - args["tags"] = None + args["tags"] = [] field = data.get("organization_id", None) if field is not None: diff --git a/scaleway-async/scaleway_async/vpc/v2/types.py b/scaleway-async/scaleway_async/vpc/v2/types.py index 55d615025..77d6c9062 100644 --- a/scaleway-async/scaleway_async/vpc/v2/types.py +++ b/scaleway-async/scaleway_async/vpc/v2/types.py @@ -348,22 +348,69 @@ class AclRule: @dataclass class IngressRule: id: str + """ + ID of the ingress rule. + """ + vpc_id: str + """ + ID of the VPC this rule belongs to. + """ + is_ipv6: bool + """ + Whether this rule applies to IPv4 or IPv6 traffic. + """ + source: str + """ + Source network to apply this rule on. + """ + nexthop_resource_ip: str + """ + IP of the local resource to redirect ingress traffic to. + """ + nexthop_private_network_id: str + """ + ID of the Private Network the destination resource is in. + """ + tags: list[str] + """ + Tags of this ingress rule. + """ + organization_id: str + """ + Scaleway Organization the ingress rule belongs to. + """ + project_id: str + """ + Scaleway Project the ingress rule belongs to. + """ + region: ScwRegion """ - Region to target. If none is passed will use default region from the config. + Region of the ingress rule. """ created_at: Optional[datetime] = None + """ + Date the ingress rule was created. + """ + updated_at: Optional[datetime] = None + """ + Date the ingress rule was last modified. + """ + description: Optional[str] = None + """ + Description of this ingress rule. + """ @dataclass @@ -508,16 +555,39 @@ class VPC: @dataclass class CreateIngressRuleRequest: vpc_id: str + """ + ID of the VPC this rule will belong to. + """ + source: str + """ + Source network to match ingress traffic on. Can be IPv6 or IPv4. + """ + nexthop_resource_ip: str + """ + IP of the local resource to redirect ingress traffic to. IP version must be consistent with the source network. + """ + nexthop_private_network_id: str + """ + ID of the Private Network the destination resource is in. + """ + region: Optional[ScwRegion] = None """ Region to target. If none is passed will use default region from the config. """ description: Optional[str] = None + """ + Description for this ingress rule. + """ + tags: Optional[list[str]] = field(default_factory=list) + """ + Tags for this ingress rule. + """ @dataclass @@ -665,6 +735,10 @@ class CreateVPCRequest: @dataclass class DeleteIngressRuleRequest: rule_id: str + """ + ID of the ingress rule to delete. + """ + region: Optional[ScwRegion] = None """ Region to target. If none is passed will use default region from the config. @@ -789,6 +863,10 @@ class GetAclResponse: @dataclass class GetIngressRuleRequest: rule_id: str + """ + ID of the ingress rule to return. + """ + region: Optional[ScwRegion] = None """ Region to target. If none is passed will use default region from the config. @@ -854,16 +932,57 @@ class ListIngressRulesRequest: Region to target. If none is passed will use default region from the config. """ - order_by: Optional[ListIngressRulesRequestOrderBy] = None - page: Optional[int] = None - page_size: Optional[int] = None + order_by: Optional[ListIngressRulesRequestOrderBy] = ( + ListIngressRulesRequestOrderBy.CREATED_AT_ASC + ) + """ + Sort order of the returned ingress rules. + """ + + page: Optional[int] = 0 + """ + Page number to return, from the paginated results. + """ + + page_size: Optional[int] = 0 + """ + Maximum number of ingress rules to return per page. + """ + vpc_id: Optional[str] = None + """ + ID of the VPC to filter for. + """ + nexthop_resource_ip: Optional[str] = None + """ + Next hop IP to filter for. + """ + nexthop_private_network_id: Optional[str] = None - is_ipv6: Optional[bool] = None + """ + Next hop Private Network ID to filter for. Only ingress rules with this Private Network as next hop will be returned. + """ + + is_ipv6: Optional[bool] = False + """ + Whether to return only IPv4 or IPv6 ingress rules. + """ + tags: Optional[list[str]] = field(default_factory=list) + """ + Tags to filter for. Only ingress rules with one or more matching tags will be returned. + """ + organization_id: Optional[str] = None + """ + Organization ID to filter for. Only ingress rules belonging to this Organization will be returned. + """ + project_id: Optional[str] = None + """ + Project ID to filter for. Only ingress rules belonging to this Project will be returned. + """ @dataclass @@ -942,7 +1061,7 @@ class ListPrivateNetworksResponse: class ListSubnetOverlapsRequest: vpc_connector_id: str """ - VPCConnector ID. + VPC Peering connector ID. """ region: Optional[ScwRegion] = None @@ -1189,16 +1308,39 @@ class SetAclResponse: @dataclass class UpdateIngressRuleRequest: rule_id: str + """ + ID of the ingress rule to update. + """ + region: Optional[ScwRegion] = None """ Region to target. If none is passed will use default region from the config. """ source: Optional[str] = None + """ + Source network to match ingress traffic on. Can be IPv4 or IPv6. + """ + nexthop_resource_ip: Optional[str] = None + """ + IP of the local resource to redirect ingress traffic to. IP version must be consistent with the source network. + """ + nexthop_private_network_id: Optional[str] = None + """ + ID of the Private Network the destination resource is in. + """ + description: Optional[str] = None + """ + Description to set for this ingress rule. + """ + tags: Optional[list[str]] = field(default_factory=list) + """ + Tags to set for this ingress rule. + """ @dataclass diff --git a/scaleway/scaleway/vpc/v2/api.py b/scaleway/scaleway/vpc/v2/api.py index ce72f5063..0c084b5a8 100644 --- a/scaleway/scaleway/vpc/v2/api.py +++ b/scaleway/scaleway/vpc/v2/api.py @@ -1438,8 +1438,8 @@ def list_subnet_overlaps( ) -> ListSubnetOverlapsResponse: """ List subnet overlaps. - List subnet overlaps between the VPCConnector VPC and the target VPC or for a specific subnet if specified. - :param vpc_connector_id: VPCConnector ID. + List subnet overlaps between the VPCs on both sides of a connector, or for a specific subnet if specified. + :param vpc_connector_id: VPC Peering connector ID. :param region: Region to target. If none is passed will use default region from the config. :param order_by: Sort order of the returned Subnet overlaps. :param page: Page number to return, from the paginated results. @@ -1485,8 +1485,8 @@ def list_subnet_overlaps_all( ) -> list[ListSubnetOverlapsResponseSubnetOverlap]: """ List subnet overlaps. - List subnet overlaps between the VPCConnector VPC and the target VPC or for a specific subnet if specified. - :param vpc_connector_id: VPCConnector ID. + List subnet overlaps between the VPCs on both sides of a connector, or for a specific subnet if specified. + :param vpc_connector_id: VPC Peering connector ID. :param region: Region to target. If none is passed will use default region from the config. :param order_by: Sort order of the returned Subnet overlaps. :param page: Page number to return, from the paginated results. @@ -1530,17 +1530,19 @@ def list_ingress_rules( project_id: Optional[str] = None, ) -> ListIngressRulesResponse: """ + List ingress rules. + List existing ingress rules in the specified region. :param region: Region to target. If none is passed will use default region from the config. - :param order_by: - :param page: - :param page_size: - :param vpc_id: - :param nexthop_resource_ip: - :param nexthop_private_network_id: - :param is_ipv6: - :param tags: - :param organization_id: - :param project_id: + :param order_by: Sort order of the returned ingress rules. + :param page: Page number to return, from the paginated results. + :param page_size: Maximum number of ingress rules to return per page. + :param vpc_id: ID of the VPC to filter for. + :param nexthop_resource_ip: Next hop IP to filter for. + :param nexthop_private_network_id: Next hop Private Network ID to filter for. Only ingress rules with this Private Network as next hop will be returned. + :param is_ipv6: Whether to return only IPv4 or IPv6 ingress rules. + :param tags: Tags to filter for. Only ingress rules with one or more matching tags will be returned. + :param organization_id: Organization ID to filter for. Only ingress rules belonging to this Organization will be returned. + :param project_id: Project ID to filter for. Only ingress rules belonging to this Project will be returned. :return: :class:`ListIngressRulesResponse ` Usage: @@ -1590,17 +1592,19 @@ def list_ingress_rules_all( project_id: Optional[str] = None, ) -> list[IngressRule]: """ + List ingress rules. + List existing ingress rules in the specified region. :param region: Region to target. If none is passed will use default region from the config. - :param order_by: - :param page: - :param page_size: - :param vpc_id: - :param nexthop_resource_ip: - :param nexthop_private_network_id: - :param is_ipv6: - :param tags: - :param organization_id: - :param project_id: + :param order_by: Sort order of the returned ingress rules. + :param page: Page number to return, from the paginated results. + :param page_size: Maximum number of ingress rules to return per page. + :param vpc_id: ID of the VPC to filter for. + :param nexthop_resource_ip: Next hop IP to filter for. + :param nexthop_private_network_id: Next hop Private Network ID to filter for. Only ingress rules with this Private Network as next hop will be returned. + :param is_ipv6: Whether to return only IPv4 or IPv6 ingress rules. + :param tags: Tags to filter for. Only ingress rules with one or more matching tags will be returned. + :param organization_id: Organization ID to filter for. Only ingress rules belonging to this Organization will be returned. + :param project_id: Project ID to filter for. Only ingress rules belonging to this Project will be returned. :return: :class:`list[IngressRule] ` Usage: @@ -1640,13 +1644,15 @@ def create_ingress_rule( tags: Optional[list[str]] = None, ) -> IngressRule: """ - :param vpc_id: - :param source: - :param nexthop_resource_ip: - :param nexthop_private_network_id: + Create an ingress rule. + Create an ingress rule in the specified region. + :param vpc_id: ID of the VPC this rule will belong to. + :param source: Source network to match ingress traffic on. Can be IPv6 or IPv4. + :param nexthop_resource_ip: IP of the local resource to redirect ingress traffic to. IP version must be consistent with the source network. + :param nexthop_private_network_id: ID of the Private Network the destination resource is in. :param region: Region to target. If none is passed will use default region from the config. - :param description: - :param tags: + :param description: Description for this ingress rule. + :param tags: Tags for this ingress rule. :return: :class:`IngressRule ` Usage: @@ -1691,7 +1697,9 @@ def get_ingress_rule( region: Optional[ScwRegion] = None, ) -> IngressRule: """ - :param rule_id: + Get an ingress rule. + Retrieve details of an existing ingress rule, specified by its ingress rule ID. + :param rule_id: ID of the ingress rule to return. :param region: Region to target. If none is passed will use default region from the config. :return: :class:`IngressRule ` @@ -1728,13 +1736,15 @@ def update_ingress_rule( tags: Optional[list[str]] = None, ) -> IngressRule: """ - :param rule_id: + Update an ingress rule. + Update an ingress rule specified by its ingress rule ID. + :param rule_id: ID of the ingress rule to update. :param region: Region to target. If none is passed will use default region from the config. - :param source: - :param nexthop_resource_ip: - :param nexthop_private_network_id: - :param description: - :param tags: + :param source: Source network to match ingress traffic on. Can be IPv4 or IPv6. + :param nexthop_resource_ip: IP of the local resource to redirect ingress traffic to. IP version must be consistent with the source network. + :param nexthop_private_network_id: ID of the Private Network the destination resource is in. + :param description: Description to set for this ingress rule. + :param tags: Tags to set for this ingress rule. :return: :class:`IngressRule ` Usage: @@ -1777,7 +1787,9 @@ def delete_ingress_rule( region: Optional[ScwRegion] = None, ) -> None: """ - :param rule_id: + Delete an ingress rule. + Delete an ingress rule specified by its ingress rule ID. + :param rule_id: ID of the ingress rule to delete. :param region: Region to target. If none is passed will use default region from the config. Usage: diff --git a/scaleway/scaleway/vpc/v2/marshalling.py b/scaleway/scaleway/vpc/v2/marshalling.py index c7c6c7cb1..30b67554b 100644 --- a/scaleway/scaleway/vpc/v2/marshalling.py +++ b/scaleway/scaleway/vpc/v2/marshalling.py @@ -296,7 +296,7 @@ def unmarshal_IngressRule(data: Any) -> IngressRule: if field is not None: args["is_ipv6"] = field else: - args["is_ipv6"] = None + args["is_ipv6"] = False field = data.get("source", None) if field is not None: @@ -338,7 +338,7 @@ def unmarshal_IngressRule(data: Any) -> IngressRule: if field is not None: args["tags"] = field else: - args["tags"] = None + args["tags"] = [] field = data.get("organization_id", None) if field is not None: diff --git a/scaleway/scaleway/vpc/v2/types.py b/scaleway/scaleway/vpc/v2/types.py index 55d615025..77d6c9062 100644 --- a/scaleway/scaleway/vpc/v2/types.py +++ b/scaleway/scaleway/vpc/v2/types.py @@ -348,22 +348,69 @@ class AclRule: @dataclass class IngressRule: id: str + """ + ID of the ingress rule. + """ + vpc_id: str + """ + ID of the VPC this rule belongs to. + """ + is_ipv6: bool + """ + Whether this rule applies to IPv4 or IPv6 traffic. + """ + source: str + """ + Source network to apply this rule on. + """ + nexthop_resource_ip: str + """ + IP of the local resource to redirect ingress traffic to. + """ + nexthop_private_network_id: str + """ + ID of the Private Network the destination resource is in. + """ + tags: list[str] + """ + Tags of this ingress rule. + """ + organization_id: str + """ + Scaleway Organization the ingress rule belongs to. + """ + project_id: str + """ + Scaleway Project the ingress rule belongs to. + """ + region: ScwRegion """ - Region to target. If none is passed will use default region from the config. + Region of the ingress rule. """ created_at: Optional[datetime] = None + """ + Date the ingress rule was created. + """ + updated_at: Optional[datetime] = None + """ + Date the ingress rule was last modified. + """ + description: Optional[str] = None + """ + Description of this ingress rule. + """ @dataclass @@ -508,16 +555,39 @@ class VPC: @dataclass class CreateIngressRuleRequest: vpc_id: str + """ + ID of the VPC this rule will belong to. + """ + source: str + """ + Source network to match ingress traffic on. Can be IPv6 or IPv4. + """ + nexthop_resource_ip: str + """ + IP of the local resource to redirect ingress traffic to. IP version must be consistent with the source network. + """ + nexthop_private_network_id: str + """ + ID of the Private Network the destination resource is in. + """ + region: Optional[ScwRegion] = None """ Region to target. If none is passed will use default region from the config. """ description: Optional[str] = None + """ + Description for this ingress rule. + """ + tags: Optional[list[str]] = field(default_factory=list) + """ + Tags for this ingress rule. + """ @dataclass @@ -665,6 +735,10 @@ class CreateVPCRequest: @dataclass class DeleteIngressRuleRequest: rule_id: str + """ + ID of the ingress rule to delete. + """ + region: Optional[ScwRegion] = None """ Region to target. If none is passed will use default region from the config. @@ -789,6 +863,10 @@ class GetAclResponse: @dataclass class GetIngressRuleRequest: rule_id: str + """ + ID of the ingress rule to return. + """ + region: Optional[ScwRegion] = None """ Region to target. If none is passed will use default region from the config. @@ -854,16 +932,57 @@ class ListIngressRulesRequest: Region to target. If none is passed will use default region from the config. """ - order_by: Optional[ListIngressRulesRequestOrderBy] = None - page: Optional[int] = None - page_size: Optional[int] = None + order_by: Optional[ListIngressRulesRequestOrderBy] = ( + ListIngressRulesRequestOrderBy.CREATED_AT_ASC + ) + """ + Sort order of the returned ingress rules. + """ + + page: Optional[int] = 0 + """ + Page number to return, from the paginated results. + """ + + page_size: Optional[int] = 0 + """ + Maximum number of ingress rules to return per page. + """ + vpc_id: Optional[str] = None + """ + ID of the VPC to filter for. + """ + nexthop_resource_ip: Optional[str] = None + """ + Next hop IP to filter for. + """ + nexthop_private_network_id: Optional[str] = None - is_ipv6: Optional[bool] = None + """ + Next hop Private Network ID to filter for. Only ingress rules with this Private Network as next hop will be returned. + """ + + is_ipv6: Optional[bool] = False + """ + Whether to return only IPv4 or IPv6 ingress rules. + """ + tags: Optional[list[str]] = field(default_factory=list) + """ + Tags to filter for. Only ingress rules with one or more matching tags will be returned. + """ + organization_id: Optional[str] = None + """ + Organization ID to filter for. Only ingress rules belonging to this Organization will be returned. + """ + project_id: Optional[str] = None + """ + Project ID to filter for. Only ingress rules belonging to this Project will be returned. + """ @dataclass @@ -942,7 +1061,7 @@ class ListPrivateNetworksResponse: class ListSubnetOverlapsRequest: vpc_connector_id: str """ - VPCConnector ID. + VPC Peering connector ID. """ region: Optional[ScwRegion] = None @@ -1189,16 +1308,39 @@ class SetAclResponse: @dataclass class UpdateIngressRuleRequest: rule_id: str + """ + ID of the ingress rule to update. + """ + region: Optional[ScwRegion] = None """ Region to target. If none is passed will use default region from the config. """ source: Optional[str] = None + """ + Source network to match ingress traffic on. Can be IPv4 or IPv6. + """ + nexthop_resource_ip: Optional[str] = None + """ + IP of the local resource to redirect ingress traffic to. IP version must be consistent with the source network. + """ + nexthop_private_network_id: Optional[str] = None + """ + ID of the Private Network the destination resource is in. + """ + description: Optional[str] = None + """ + Description to set for this ingress rule. + """ + tags: Optional[list[str]] = field(default_factory=list) + """ + Tags to set for this ingress rule. + """ @dataclass