diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py index b4cc75d78..c93a5172c 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py @@ -18,6 +18,7 @@ from .types import ListSystemEventsRequestOrderBy from .types import ResourceType from .types import ServerlessContainersTriggerInfoSourceType +from .types import ServerlessFunctionsTriggerInfoInputType from .types import SystemEventKind from .types import AccountContractSignatureInfoAccountContractInfo from .types import AccountContractSignatureInfo @@ -64,6 +65,11 @@ from .types import ServerlessContainersDomainInfo from .types import ServerlessContainersNamespaceInfo from .types import ServerlessContainersTriggerInfo +from .types import ServerlessFunctionsCronInfo +from .types import ServerlessFunctionsDomainInfo +from .types import ServerlessFunctionsFunctionInfo +from .types import ServerlessFunctionsNamespaceInfo +from .types import ServerlessFunctionsTriggerInfo from .types import VpcConnectorInfo from .types import VpcGwGatewayInfo from .types import VpcGwGatewayNetworkInfo @@ -140,6 +146,7 @@ "ListSystemEventsRequestOrderBy", "ResourceType", "ServerlessContainersTriggerInfoSourceType", + "ServerlessFunctionsTriggerInfoInputType", "SystemEventKind", "AccountContractSignatureInfoAccountContractInfo", "AccountContractSignatureInfo", @@ -186,6 +193,11 @@ "ServerlessContainersDomainInfo", "ServerlessContainersNamespaceInfo", "ServerlessContainersTriggerInfo", + "ServerlessFunctionsCronInfo", + "ServerlessFunctionsDomainInfo", + "ServerlessFunctionsFunctionInfo", + "ServerlessFunctionsNamespaceInfo", + "ServerlessFunctionsTriggerInfo", "VpcConnectorInfo", "VpcGwGatewayInfo", "VpcGwGatewayNetworkInfo", diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py index 2e493db39..e1984cebd 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py @@ -73,6 +73,11 @@ ServerlessContainersDomainInfo, ServerlessContainersNamespaceInfo, ServerlessContainersTriggerInfo, + ServerlessFunctionsCronInfo, + ServerlessFunctionsDomainInfo, + ServerlessFunctionsFunctionInfo, + ServerlessFunctionsNamespaceInfo, + ServerlessFunctionsTriggerInfo, VpcConnectorInfo, VpcGwGatewayInfo, VpcGwGatewayNetworkInfo, @@ -1284,6 +1289,97 @@ def unmarshal_ServerlessContainersTriggerInfo( return ServerlessContainersTriggerInfo(**args) +def unmarshal_ServerlessFunctionsCronInfo(data: Any) -> ServerlessFunctionsCronInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'ServerlessFunctionsCronInfo' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("function_id", None) + if field is not None: + args["function_id"] = field + else: + args["function_id"] = None + + return ServerlessFunctionsCronInfo(**args) + + +def unmarshal_ServerlessFunctionsDomainInfo(data: Any) -> ServerlessFunctionsDomainInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'ServerlessFunctionsDomainInfo' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("function_id", None) + if field is not None: + args["function_id"] = field + else: + args["function_id"] = None + + return ServerlessFunctionsDomainInfo(**args) + + +def unmarshal_ServerlessFunctionsFunctionInfo( + data: Any, +) -> ServerlessFunctionsFunctionInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'ServerlessFunctionsFunctionInfo' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("namespace_id", None) + if field is not None: + args["namespace_id"] = field + else: + args["namespace_id"] = None + + return ServerlessFunctionsFunctionInfo(**args) + + +def unmarshal_ServerlessFunctionsNamespaceInfo( + data: Any, +) -> ServerlessFunctionsNamespaceInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'ServerlessFunctionsNamespaceInfo' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + return ServerlessFunctionsNamespaceInfo(**args) + + +def unmarshal_ServerlessFunctionsTriggerInfo( + data: Any, +) -> ServerlessFunctionsTriggerInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'ServerlessFunctionsTriggerInfo' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("function_id", None) + if field is not None: + args["function_id"] = field + else: + args["function_id"] = None + + field = data.get("input_type", None) + if field is not None: + args["input_type"] = field + else: + args["input_type"] = None + + return ServerlessFunctionsTriggerInfo(**args) + + def unmarshal_VpcConnectorInfo(data: Any) -> VpcConnectorInfo: if not isinstance(data, dict): raise TypeError( @@ -1906,6 +2002,46 @@ def unmarshal_Resource(data: Any) -> Resource: else: args["serverless_containers_trigger_info"] = None + field = data.get("serverless_functions_namespace_info", None) + if field is not None: + args["serverless_functions_namespace_info"] = ( + unmarshal_ServerlessFunctionsNamespaceInfo(field) + ) + else: + args["serverless_functions_namespace_info"] = None + + field = data.get("serverless_functions_function_info", None) + if field is not None: + args["serverless_functions_function_info"] = ( + unmarshal_ServerlessFunctionsFunctionInfo(field) + ) + else: + args["serverless_functions_function_info"] = None + + field = data.get("serverless_functions_domain_info", None) + if field is not None: + args["serverless_functions_domain_info"] = ( + unmarshal_ServerlessFunctionsDomainInfo(field) + ) + else: + args["serverless_functions_domain_info"] = None + + field = data.get("serverless_functions_cron_info", None) + if field is not None: + args["serverless_functions_cron_info"] = unmarshal_ServerlessFunctionsCronInfo( + field + ) + else: + args["serverless_functions_cron_info"] = None + + field = data.get("serverless_functions_trigger_info", None) + if field is not None: + args["serverless_functions_trigger_info"] = ( + unmarshal_ServerlessFunctionsTriggerInfo(field) + ) + else: + args["serverless_functions_trigger_info"] = None + return Resource(**args) diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py index 62b2e00e1..807e982c5 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py @@ -259,6 +259,11 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta): SERVERLESS_CONTAINERS_CONTAINER = "serverless_containers_container" SERVERLESS_CONTAINERS_DOMAIN = "serverless_containers_domain" SERVERLESS_CONTAINERS_TRIGGER = "serverless_containers_trigger" + SERVERLESS_FUNCTIONS_NAMESPACE = "serverless_functions_namespace" + SERVERLESS_FUNCTIONS_FUNCTION = "serverless_functions_function" + SERVERLESS_FUNCTIONS_DOMAIN = "serverless_functions_domain" + SERVERLESS_FUNCTIONS_CRON = "serverless_functions_cron" + SERVERLESS_FUNCTIONS_TRIGGER = "serverless_functions_trigger" def __str__(self) -> str: return str(self.value) @@ -274,6 +279,15 @@ def __str__(self) -> str: return str(self.value) +class ServerlessFunctionsTriggerInfoInputType(str, Enum, metaclass=StrEnumMeta): + UNKNOWN_INPUT_TYPE = "unknown_input_type" + SCW_SQS = "scw_sqs" + SCW_NATS = "scw_nats" + + def __str__(self) -> str: + return str(self.value) + + class SystemEventKind(str, Enum, metaclass=StrEnumMeta): UNKNOWN_KIND = "unknown_kind" CRON = "cron" @@ -531,6 +545,32 @@ class ServerlessContainersTriggerInfo: source_type: ServerlessContainersTriggerInfoSourceType +@dataclass +class ServerlessFunctionsCronInfo: + function_id: str + + +@dataclass +class ServerlessFunctionsDomainInfo: + function_id: str + + +@dataclass +class ServerlessFunctionsFunctionInfo: + namespace_id: str + + +@dataclass +class ServerlessFunctionsNamespaceInfo: + pass + + +@dataclass +class ServerlessFunctionsTriggerInfo: + function_id: str + input_type: ServerlessFunctionsTriggerInfoInputType + + @dataclass class VpcConnectorInfo: vpc_id: str @@ -702,6 +742,18 @@ class Resource: serverless_containers_trigger_info: Optional[ServerlessContainersTriggerInfo] = None + serverless_functions_namespace_info: Optional[ServerlessFunctionsNamespaceInfo] = ( + None + ) + + serverless_functions_function_info: Optional[ServerlessFunctionsFunctionInfo] = None + + serverless_functions_domain_info: Optional[ServerlessFunctionsDomainInfo] = None + + serverless_functions_cron_info: Optional[ServerlessFunctionsCronInfo] = None + + serverless_functions_trigger_info: Optional[ServerlessFunctionsTriggerInfo] = None + @dataclass class EventPrincipal: diff --git a/scaleway-async/scaleway_async/block/v1/marshalling.py b/scaleway-async/scaleway_async/block/v1/marshalling.py index 7ceb69335..c206bde0c 100644 --- a/scaleway-async/scaleway_async/block/v1/marshalling.py +++ b/scaleway-async/scaleway_async/block/v1/marshalling.py @@ -208,6 +208,12 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: else: args["public"] = False + field = data.get("kms_key_id", None) + if field is not None: + args["kms_key_id"] = field + else: + args["kms_key_id"] = None + return Snapshot(**args) diff --git a/scaleway-async/scaleway_async/block/v1/types.py b/scaleway-async/scaleway_async/block/v1/types.py index 15e524b5b..b07a93fac 100644 --- a/scaleway-async/scaleway_async/block/v1/types.py +++ b/scaleway-async/scaleway_async/block/v1/types.py @@ -259,6 +259,11 @@ class Snapshot: Last modification date of the properties of a snapshot. """ + kms_key_id: Optional[str] = None + """ + KMS Key used for securing the parent volume's encryption. + """ + @dataclass class VolumeType: diff --git a/scaleway-async/scaleway_async/vpc/v2/__init__.py b/scaleway-async/scaleway_async/vpc/v2/__init__.py index 7b12ff39c..e75252e82 100644 --- a/scaleway-async/scaleway_async/vpc/v2/__init__.py +++ b/scaleway-async/scaleway_async/vpc/v2/__init__.py @@ -19,24 +19,24 @@ from .types import ListSubnetOverlapsResponseSubnetOverlap from .types import VPCConnector from .types import VPC -from .types import AddPrivateNetworkS3EndpointRequest -from .types import AddPrivateNetworkS3EndpointResponse +from .types import AddPrivateNetworkObjectStoragePrivateAccessRequest +from .types import AddPrivateNetworkObjectStoragePrivateAccessResponse from .types import CreateIngressRuleRequest from .types import CreatePrivateNetworkRequest from .types import CreateRouteRequest from .types import CreateVPCConnectorRequest from .types import CreateVPCRequest from .types import DeleteIngressRuleRequest +from .types import DeletePrivateNetworkObjectStoragePrivateAccessRequest from .types import DeletePrivateNetworkRequest -from .types import DeletePrivateNetworkS3EndpointRequest from .types import DeleteRouteRequest from .types import DeleteVPCConnectorRequest from .types import DeleteVPCRequest -from .types import DisableS3EndpointRequest +from .types import DisableObjectStoragePrivateAccessRequest from .types import EnableCustomRoutesPropagationRequest from .types import EnableDHCPRequest +from .types import EnableObjectStoragePrivateAccessRequest from .types import EnableRoutingRequest -from .types import EnableS3EndpointRequest from .types import GetAclRequest from .types import GetAclResponse from .types import GetIngressRuleRequest @@ -58,8 +58,8 @@ from .types import ListVPCsResponse from .types import SetAclRequest from .types import SetAclResponse -from .types import SetPrivateNetworksS3EndpointRequest -from .types import SetPrivateNetworksS3EndpointResponse +from .types import SetPrivateNetworksObjectStoragePrivateAccessRequest +from .types import SetPrivateNetworksObjectStoragePrivateAccessResponse from .types import UpdateIngressRuleRequest from .types import UpdatePrivateNetworkRequest from .types import UpdateRouteRequest @@ -87,24 +87,24 @@ "ListSubnetOverlapsResponseSubnetOverlap", "VPCConnector", "VPC", - "AddPrivateNetworkS3EndpointRequest", - "AddPrivateNetworkS3EndpointResponse", + "AddPrivateNetworkObjectStoragePrivateAccessRequest", + "AddPrivateNetworkObjectStoragePrivateAccessResponse", "CreateIngressRuleRequest", "CreatePrivateNetworkRequest", "CreateRouteRequest", "CreateVPCConnectorRequest", "CreateVPCRequest", "DeleteIngressRuleRequest", + "DeletePrivateNetworkObjectStoragePrivateAccessRequest", "DeletePrivateNetworkRequest", - "DeletePrivateNetworkS3EndpointRequest", "DeleteRouteRequest", "DeleteVPCConnectorRequest", "DeleteVPCRequest", - "DisableS3EndpointRequest", + "DisableObjectStoragePrivateAccessRequest", "EnableCustomRoutesPropagationRequest", "EnableDHCPRequest", + "EnableObjectStoragePrivateAccessRequest", "EnableRoutingRequest", - "EnableS3EndpointRequest", "GetAclRequest", "GetAclResponse", "GetIngressRuleRequest", @@ -126,8 +126,8 @@ "ListVPCsResponse", "SetAclRequest", "SetAclResponse", - "SetPrivateNetworksS3EndpointRequest", - "SetPrivateNetworksS3EndpointResponse", + "SetPrivateNetworksObjectStoragePrivateAccessRequest", + "SetPrivateNetworksObjectStoragePrivateAccessResponse", "UpdateIngressRuleRequest", "UpdatePrivateNetworkRequest", "UpdateRouteRequest", diff --git a/scaleway-async/scaleway_async/vpc/v2/api.py b/scaleway-async/scaleway_async/vpc/v2/api.py index c0f68175c..9bf8c2831 100644 --- a/scaleway-async/scaleway_async/vpc/v2/api.py +++ b/scaleway-async/scaleway_async/vpc/v2/api.py @@ -22,8 +22,8 @@ ListVPCsRequestOrderBy, VPCConnectorStatus, AclRule, - AddPrivateNetworkS3EndpointRequest, - AddPrivateNetworkS3EndpointResponse, + AddPrivateNetworkObjectStoragePrivateAccessRequest, + AddPrivateNetworkObjectStoragePrivateAccessResponse, CreateIngressRuleRequest, CreatePrivateNetworkRequest, CreateRouteRequest, @@ -42,8 +42,8 @@ Route, SetAclRequest, SetAclResponse, - SetPrivateNetworksS3EndpointRequest, - SetPrivateNetworksS3EndpointResponse, + SetPrivateNetworksObjectStoragePrivateAccessRequest, + SetPrivateNetworksObjectStoragePrivateAccessResponse, Subnet, UpdateIngressRuleRequest, UpdatePrivateNetworkRequest, @@ -59,7 +59,7 @@ unmarshal_IngressRule, unmarshal_VPCConnector, unmarshal_VPC, - unmarshal_AddPrivateNetworkS3EndpointResponse, + unmarshal_AddPrivateNetworkObjectStoragePrivateAccessResponse, unmarshal_GetAclResponse, unmarshal_ListIngressRulesResponse, unmarshal_ListPrivateNetworksResponse, @@ -68,15 +68,15 @@ unmarshal_ListVPCConnectorsResponse, unmarshal_ListVPCsResponse, unmarshal_SetAclResponse, - unmarshal_SetPrivateNetworksS3EndpointResponse, - marshal_AddPrivateNetworkS3EndpointRequest, + unmarshal_SetPrivateNetworksObjectStoragePrivateAccessResponse, + marshal_AddPrivateNetworkObjectStoragePrivateAccessRequest, marshal_CreateIngressRuleRequest, marshal_CreatePrivateNetworkRequest, marshal_CreateRouteRequest, marshal_CreateVPCConnectorRequest, marshal_CreateVPCRequest, marshal_SetAclRequest, - marshal_SetPrivateNetworksS3EndpointRequest, + marshal_SetPrivateNetworksObjectStoragePrivateAccessRequest, marshal_UpdateIngressRuleRequest, marshal_UpdatePrivateNetworkRequest, marshal_UpdateRouteRequest, @@ -103,7 +103,7 @@ async def list_vp_cs( project_id: Optional[str] = None, is_default: Optional[bool] = None, routing_enabled: Optional[bool] = None, - s3_integration_enabled: Optional[bool] = None, + object_storage_private_access_enabled: Optional[bool] = None, ) -> ListVPCsResponse: """ List VPCs. @@ -118,7 +118,7 @@ async def list_vp_cs( :param project_id: Project ID to filter for. Only VPCs belonging to this Project will be returned. :param is_default: Defines whether to filter only for VPCs which are the default one for their Project. :param routing_enabled: Defines whether to filter only for VPCs which route traffic between their Private Networks. - :param s3_integration_enabled: Defines whether to filter only for VPCs with S3 integration enabled. + :param object_storage_private_access_enabled: Defines whether to filter only for VPCs with Object Storage private access enabled. :return: :class:`ListVPCsResponse ` Usage: @@ -137,6 +137,7 @@ async def list_vp_cs( params={ "is_default": is_default, "name": name, + "object_storage_private_access_enabled": object_storage_private_access_enabled, "order_by": order_by, "organization_id": organization_id or self.client.default_organization_id, @@ -144,7 +145,6 @@ async def list_vp_cs( "page_size": page_size or self.client.default_page_size, "project_id": project_id or self.client.default_project_id, "routing_enabled": routing_enabled, - "s3_integration_enabled": s3_integration_enabled, "tags": tags, }, ) @@ -165,7 +165,7 @@ async def list_vp_cs_all( project_id: Optional[str] = None, is_default: Optional[bool] = None, routing_enabled: Optional[bool] = None, - s3_integration_enabled: Optional[bool] = None, + object_storage_private_access_enabled: Optional[bool] = None, ) -> list[VPC]: """ List VPCs. @@ -180,7 +180,7 @@ async def list_vp_cs_all( :param project_id: Project ID to filter for. Only VPCs belonging to this Project will be returned. :param is_default: Defines whether to filter only for VPCs which are the default one for their Project. :param routing_enabled: Defines whether to filter only for VPCs which route traffic between their Private Networks. - :param s3_integration_enabled: Defines whether to filter only for VPCs with S3 integration enabled. + :param object_storage_private_access_enabled: Defines whether to filter only for VPCs with Object Storage private access enabled. :return: :class:`list[VPC] ` Usage: @@ -204,7 +204,7 @@ async def list_vp_cs_all( "project_id": project_id, "is_default": is_default, "routing_enabled": routing_enabled, - "s3_integration_enabled": s3_integration_enabled, + "object_storage_private_access_enabled": object_storage_private_access_enabled, }, ) @@ -388,7 +388,7 @@ async def list_private_networks( private_network_ids: Optional[list[str]] = None, vpc_id: Optional[str] = None, dhcp_enabled: Optional[bool] = None, - s3_integration_enabled: Optional[bool] = None, + object_storage_private_access_enabled: Optional[bool] = None, ) -> ListPrivateNetworksResponse: """ List Private Networks. @@ -404,7 +404,7 @@ async def list_private_networks( :param private_network_ids: Private Network IDs to filter for. Only Private Networks with one of these IDs will be returned. :param vpc_id: VPC ID to filter for. Only Private Networks belonging to this VPC will be returned. :param dhcp_enabled: DHCP status to filter for. When true, only Private Networks with managed DHCP enabled will be returned. - :param s3_integration_enabled: Filter by whether S3 integration is enabled. When set, only matching Private Networks will be returned. + :param object_storage_private_access_enabled: Filter by whether Object Storage private access is enabled. When set, only matching Private Networks will be returned. :return: :class:`ListPrivateNetworksResponse ` Usage: @@ -423,6 +423,7 @@ async def list_private_networks( params={ "dhcp_enabled": dhcp_enabled, "name": name, + "object_storage_private_access_enabled": object_storage_private_access_enabled, "order_by": order_by, "organization_id": organization_id or self.client.default_organization_id, @@ -430,7 +431,6 @@ async def list_private_networks( "page_size": page_size or self.client.default_page_size, "private_network_ids": private_network_ids, "project_id": project_id or self.client.default_project_id, - "s3_integration_enabled": s3_integration_enabled, "tags": tags, "vpc_id": vpc_id, }, @@ -453,7 +453,7 @@ async def list_private_networks_all( private_network_ids: Optional[list[str]] = None, vpc_id: Optional[str] = None, dhcp_enabled: Optional[bool] = None, - s3_integration_enabled: Optional[bool] = None, + object_storage_private_access_enabled: Optional[bool] = None, ) -> list[PrivateNetwork]: """ List Private Networks. @@ -469,7 +469,7 @@ async def list_private_networks_all( :param private_network_ids: Private Network IDs to filter for. Only Private Networks with one of these IDs will be returned. :param vpc_id: VPC ID to filter for. Only Private Networks belonging to this VPC will be returned. :param dhcp_enabled: DHCP status to filter for. When true, only Private Networks with managed DHCP enabled will be returned. - :param s3_integration_enabled: Filter by whether S3 integration is enabled. When set, only matching Private Networks will be returned. + :param object_storage_private_access_enabled: Filter by whether Object Storage private access is enabled. When set, only matching Private Networks will be returned. :return: :class:`list[PrivateNetwork] ` Usage: @@ -494,7 +494,7 @@ async def list_private_networks_all( "private_network_ids": private_network_ids, "vpc_id": vpc_id, "dhcp_enabled": dhcp_enabled, - "s3_integration_enabled": s3_integration_enabled, + "object_storage_private_access_enabled": object_storage_private_access_enabled, }, ) @@ -1832,7 +1832,7 @@ async def delete_ingress_rule( self._throw_on_error(res) - async def enable_s3_endpoint( + async def enable_object_storage_private_access( self, *, vpc_id: str, @@ -1840,17 +1840,17 @@ async def enable_s3_endpoint( private_network_ids: Optional[list[str]] = None, ) -> VPC: """ - Enable S3 integration. - Enable S3 integration for a VPC. - :param vpc_id: ID of the VPC for which to enable S3 integration. + Enable Object Storage private access. + Enable Object Storage private access for a VPC. + :param vpc_id: ID of the VPC for which to enable Object Storage private access. :param region: Region to target. If none is passed will use default region from the config. - :param private_network_ids: IDs of the Private Networks for which to enable S3 integration. + :param private_network_ids: IDs of the Private Networks for which to enable Object Storage private access. :return: :class:`VPC ` Usage: :: - result = await api.enable_s3_endpoint( + result = await api.enable_object_storage_private_access( vpc_id="example", ) """ @@ -1862,7 +1862,7 @@ async def enable_s3_endpoint( res = self._request( "POST", - f"/vpc/v2/regions/{param_region}/s3-integration/{param_vpc_id}/enable", + f"/vpc/v2/regions/{param_region}/object-storage-private-access/{param_vpc_id}/enable", params={ "private_network_ids": private_network_ids, }, @@ -1871,23 +1871,23 @@ async def enable_s3_endpoint( self._throw_on_error(res) return unmarshal_VPC(res.json()) - async def disable_s3_endpoint( + async def disable_object_storage_private_access( self, *, vpc_id: str, region: Optional[ScwRegion] = None, ) -> VPC: """ - Disable S3 integration. - Disable S3 integration for a VPC. - :param vpc_id: ID of the VPC for which to disable S3 integration. + Disable Object Storage private access. + Disable Object Storage private access for a VPC. + :param vpc_id: ID of the VPC for which to disable Object Storage private access. :param region: Region to target. If none is passed will use default region from the config. :return: :class:`VPC ` Usage: :: - result = await api.disable_s3_endpoint( + result = await api.disable_object_storage_private_access( vpc_id="example", ) """ @@ -1899,31 +1899,31 @@ async def disable_s3_endpoint( res = self._request( "POST", - f"/vpc/v2/regions/{param_region}/s3-integration/{param_vpc_id}/disable", + f"/vpc/v2/regions/{param_region}/object-storage-private-access/{param_vpc_id}/disable", ) self._throw_on_error(res) return unmarshal_VPC(res.json()) - async def add_private_network_s3_endpoint( + async def add_private_network_object_storage_private_access( self, *, vpc_id: str, private_network_id: str, region: Optional[ScwRegion] = None, - ) -> AddPrivateNetworkS3EndpointResponse: + ) -> AddPrivateNetworkObjectStoragePrivateAccessResponse: """ - Add a Private Network to an S3 Endpoint. - Add a Private Network to the S3 Endpoint to enable S3 integration for its resources. - :param vpc_id: ID of the VPC containing the S3 Endpoint. - :param private_network_id: ID of the Private Network to add to the S3 Endpoint. + Add a Private Network to an Object Storage private access. + Add a Private Network to the Object Storage private access to enable Object Storage integration for its resources. + :param vpc_id: ID of the VPC containing the Object Storage private access. + :param private_network_id: ID of the Private Network to add to the Object Storage private access. :param region: Region to target. If none is passed will use default region from the config. - :return: :class:`AddPrivateNetworkS3EndpointResponse ` + :return: :class:`AddPrivateNetworkObjectStoragePrivateAccessResponse ` Usage: :: - result = await api.add_private_network_s3_endpoint( + result = await api.add_private_network_object_storage_private_access( vpc_id="example", private_network_id="example", ) @@ -1936,9 +1936,9 @@ async def add_private_network_s3_endpoint( res = self._request( "POST", - f"/vpc/v2/regions/{param_region}/s3-integration/{param_vpc_id}/private-networks", - body=marshal_AddPrivateNetworkS3EndpointRequest( - AddPrivateNetworkS3EndpointRequest( + f"/vpc/v2/regions/{param_region}/object-storage-private-access/{param_vpc_id}/private-networks", + body=marshal_AddPrivateNetworkObjectStoragePrivateAccessRequest( + AddPrivateNetworkObjectStoragePrivateAccessRequest( vpc_id=vpc_id, private_network_id=private_network_id, region=region, @@ -1948,27 +1948,27 @@ async def add_private_network_s3_endpoint( ) self._throw_on_error(res) - return unmarshal_AddPrivateNetworkS3EndpointResponse(res.json()) + return unmarshal_AddPrivateNetworkObjectStoragePrivateAccessResponse(res.json()) - async def set_private_networks_s3_endpoint( + async def set_private_networks_object_storage_private_access( self, *, vpc_id: str, private_network_ids: list[str], region: Optional[ScwRegion] = None, - ) -> SetPrivateNetworksS3EndpointResponse: + ) -> SetPrivateNetworksObjectStoragePrivateAccessResponse: """ - Set S3 Endpoint Private Networks. - Set the Private Networks associated with the S3 Endpoint to enable S3 integration for their resources. - :param vpc_id: ID of the VPC containing the S3 Endpoint. - :param private_network_ids: IDs of the Private Networks to associate with the S3 Endpoint. + Set Object Storage private access Private Networks. + Set the Private Networks associated with the Object Storage private access to enable Object Storage integration for their resources. + :param vpc_id: ID of the VPC containing the Object Storage private access. + :param private_network_ids: IDs of the Private Networks to associate with the Object Storage private access. :param region: Region to target. If none is passed will use default region from the config. - :return: :class:`SetPrivateNetworksS3EndpointResponse ` + :return: :class:`SetPrivateNetworksObjectStoragePrivateAccessResponse ` Usage: :: - result = await api.set_private_networks_s3_endpoint( + result = await api.set_private_networks_object_storage_private_access( vpc_id="example", private_network_ids=[], ) @@ -1981,9 +1981,9 @@ async def set_private_networks_s3_endpoint( res = self._request( "PUT", - f"/vpc/v2/regions/{param_region}/s3-integration/{param_vpc_id}/private-networks", - body=marshal_SetPrivateNetworksS3EndpointRequest( - SetPrivateNetworksS3EndpointRequest( + f"/vpc/v2/regions/{param_region}/object-storage-private-access/{param_vpc_id}/private-networks", + body=marshal_SetPrivateNetworksObjectStoragePrivateAccessRequest( + SetPrivateNetworksObjectStoragePrivateAccessRequest( vpc_id=vpc_id, private_network_ids=private_network_ids, region=region, @@ -1993,9 +1993,11 @@ async def set_private_networks_s3_endpoint( ) self._throw_on_error(res) - return unmarshal_SetPrivateNetworksS3EndpointResponse(res.json()) + return unmarshal_SetPrivateNetworksObjectStoragePrivateAccessResponse( + res.json() + ) - async def delete_private_network_s3_endpoint( + async def delete_private_network_object_storage_private_access( self, *, vpc_id: str, @@ -2003,16 +2005,16 @@ async def delete_private_network_s3_endpoint( region: Optional[ScwRegion] = None, ) -> None: """ - Remove a Private Network from an S3 Endpoint. - Remove a Private Network from the S3 Endpoint to disable S3 integration for its resources. - :param vpc_id: ID of the VPC containing the S3 Endpoint. - :param private_network_id: ID of the Private Network to remove from the S3 Endpoint. + Remove a Private Network from an Object Storage private access. + Remove a Private Network from the Object Storage private access to disable Object Storage integration for its resources. + :param vpc_id: ID of the VPC containing the Object Storage private access. + :param private_network_id: ID of the Private Network to remove from the Object Storage private access. :param region: Region to target. If none is passed will use default region from the config. Usage: :: - result = await api.delete_private_network_s3_endpoint( + result = await api.delete_private_network_object_storage_private_access( vpc_id="example", private_network_id="example", ) @@ -2028,7 +2030,7 @@ async def delete_private_network_s3_endpoint( res = self._request( "DELETE", - f"/vpc/v2/regions/{param_region}/s3-integration/{param_vpc_id}/private-networks/{param_private_network_id}", + f"/vpc/v2/regions/{param_region}/object-storage-private-access/{param_vpc_id}/private-networks/{param_private_network_id}", ) self._throw_on_error(res) diff --git a/scaleway-async/scaleway_async/vpc/v2/marshalling.py b/scaleway-async/scaleway_async/vpc/v2/marshalling.py index ce2f42d14..04979d393 100644 --- a/scaleway-async/scaleway_async/vpc/v2/marshalling.py +++ b/scaleway-async/scaleway_async/vpc/v2/marshalling.py @@ -15,7 +15,7 @@ VPCConnectorPeerInfo, VPCConnector, VPC, - AddPrivateNetworkS3EndpointResponse, + AddPrivateNetworkObjectStoragePrivateAccessResponse, AclRule, GetAclResponse, ListIngressRulesResponse, @@ -26,15 +26,15 @@ ListVPCConnectorsResponse, ListVPCsResponse, SetAclResponse, - SetPrivateNetworksS3EndpointResponse, - AddPrivateNetworkS3EndpointRequest, + SetPrivateNetworksObjectStoragePrivateAccessResponse, + AddPrivateNetworkObjectStoragePrivateAccessRequest, CreateIngressRuleRequest, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCConnectorRequest, CreateVPCRequest, SetAclRequest, - SetPrivateNetworksS3EndpointRequest, + SetPrivateNetworksObjectStoragePrivateAccessRequest, UpdateIngressRuleRequest, UpdatePrivateNetworkRequest, UpdateRouteRequest, @@ -184,11 +184,11 @@ def unmarshal_PrivateNetwork(data: Any) -> PrivateNetwork: else: args["default_route_propagation_enabled"] = False - field = data.get("has_s3_integration", None) + field = data.get("has_object_storage_private_access", None) if field is not None: - args["has_s3_integration"] = field + args["has_object_storage_private_access"] = field else: - args["has_s3_integration"] = False + args["has_object_storage_private_access"] = False return PrivateNetwork(**args) @@ -557,11 +557,11 @@ def unmarshal_VPC(data: Any) -> VPC: else: args["transitivity_enabled"] = False - field = data.get("s3_integration_enabled", None) + field = data.get("object_storage_private_access_enabled", None) if field is not None: - args["s3_integration_enabled"] = field + args["object_storage_private_access_enabled"] = field else: - args["s3_integration_enabled"] = False + args["object_storage_private_access_enabled"] = False field = data.get("created_at", None) if field is not None: @@ -578,12 +578,12 @@ def unmarshal_VPC(data: Any) -> VPC: return VPC(**args) -def unmarshal_AddPrivateNetworkS3EndpointResponse( +def unmarshal_AddPrivateNetworkObjectStoragePrivateAccessResponse( data: Any, -) -> AddPrivateNetworkS3EndpointResponse: +) -> AddPrivateNetworkObjectStoragePrivateAccessResponse: if not isinstance(data, dict): raise TypeError( - "Unmarshalling the type 'AddPrivateNetworkS3EndpointResponse' failed as data isn't a dictionary." + "Unmarshalling the type 'AddPrivateNetworkObjectStoragePrivateAccessResponse' failed as data isn't a dictionary." ) args: dict[str, Any] = {} @@ -600,7 +600,7 @@ def unmarshal_AddPrivateNetworkS3EndpointResponse( else: args["private_network_ids"] = [] - return AddPrivateNetworkS3EndpointResponse(**args) + return AddPrivateNetworkObjectStoragePrivateAccessResponse(**args) def unmarshal_AclRule(data: Any) -> AclRule: @@ -905,12 +905,12 @@ def unmarshal_SetAclResponse(data: Any) -> SetAclResponse: return SetAclResponse(**args) -def unmarshal_SetPrivateNetworksS3EndpointResponse( +def unmarshal_SetPrivateNetworksObjectStoragePrivateAccessResponse( data: Any, -) -> SetPrivateNetworksS3EndpointResponse: +) -> SetPrivateNetworksObjectStoragePrivateAccessResponse: if not isinstance(data, dict): raise TypeError( - "Unmarshalling the type 'SetPrivateNetworksS3EndpointResponse' failed as data isn't a dictionary." + "Unmarshalling the type 'SetPrivateNetworksObjectStoragePrivateAccessResponse' failed as data isn't a dictionary." ) args: dict[str, Any] = {} @@ -927,11 +927,11 @@ def unmarshal_SetPrivateNetworksS3EndpointResponse( else: args["private_network_ids"] = [] - return SetPrivateNetworksS3EndpointResponse(**args) + return SetPrivateNetworksObjectStoragePrivateAccessResponse(**args) -def marshal_AddPrivateNetworkS3EndpointRequest( - request: AddPrivateNetworkS3EndpointRequest, +def marshal_AddPrivateNetworkObjectStoragePrivateAccessRequest( + request: AddPrivateNetworkObjectStoragePrivateAccessRequest, defaults: ProfileDefaults, ) -> dict[str, Any]: output: dict[str, Any] = {} @@ -1131,8 +1131,8 @@ def marshal_SetAclRequest( return output -def marshal_SetPrivateNetworksS3EndpointRequest( - request: SetPrivateNetworksS3EndpointRequest, +def marshal_SetPrivateNetworksObjectStoragePrivateAccessRequest( + request: SetPrivateNetworksObjectStoragePrivateAccessRequest, defaults: ProfileDefaults, ) -> dict[str, Any]: output: dict[str, Any] = {} diff --git a/scaleway-async/scaleway_async/vpc/v2/types.py b/scaleway-async/scaleway_async/vpc/v2/types.py index b0ec1e9a5..e3fee5196 100644 --- a/scaleway-async/scaleway_async/vpc/v2/types.py +++ b/scaleway-async/scaleway_async/vpc/v2/types.py @@ -211,9 +211,9 @@ class PrivateNetwork: Defines whether default v4 and v6 routes are propagated for this Private Network. """ - has_s3_integration: bool + has_object_storage_private_access: bool """ - Defines whether this Private Network is enabled for S3 integration. + Defines whether this Private Network is enabled for Object Storage private access. """ created_at: Optional[datetime] = None @@ -546,9 +546,9 @@ class VPC: Defines whether the VPC allows packets from peered VPCs to transit through. """ - s3_integration_enabled: bool + object_storage_private_access_enabled: bool """ - Defines whether the S3 integration is enabled for the VPC. + Defines whether the Object Storage private access is enabled for the VPC. """ created_at: Optional[datetime] = None @@ -563,15 +563,15 @@ class VPC: @dataclass -class AddPrivateNetworkS3EndpointRequest: +class AddPrivateNetworkObjectStoragePrivateAccessRequest: vpc_id: str """ - ID of the VPC containing the S3 Endpoint. + ID of the VPC containing the Object Storage private access. """ private_network_id: str """ - ID of the Private Network to add to the S3 Endpoint. + ID of the Private Network to add to the Object Storage private access. """ region: Optional[ScwRegion] = None @@ -581,15 +581,15 @@ class AddPrivateNetworkS3EndpointRequest: @dataclass -class AddPrivateNetworkS3EndpointResponse: +class AddPrivateNetworkObjectStoragePrivateAccessResponse: vpc_id: str """ - ID of the VPC containing the S3 Endpoint. + ID of the VPC containing the Object Storage private access. """ private_network_ids: list[str] """ - IDs of the Private Networks associated with the S3 Endpoint. + IDs of the Private Networks associated with the Object Storage private access. """ @@ -787,10 +787,15 @@ class DeleteIngressRuleRequest: @dataclass -class DeletePrivateNetworkRequest: +class DeletePrivateNetworkObjectStoragePrivateAccessRequest: + vpc_id: str + """ + ID of the VPC containing the Object Storage private access. + """ + private_network_id: str """ - Private Network ID. + ID of the Private Network to remove from the Object Storage private access. """ region: Optional[ScwRegion] = None @@ -800,15 +805,10 @@ class DeletePrivateNetworkRequest: @dataclass -class DeletePrivateNetworkS3EndpointRequest: - vpc_id: str - """ - ID of the VPC containing the S3 Endpoint. - """ - +class DeletePrivateNetworkRequest: private_network_id: str """ - ID of the Private Network to remove from the S3 Endpoint. + Private Network ID. """ region: Optional[ScwRegion] = None @@ -857,10 +857,10 @@ class DeleteVPCRequest: @dataclass -class DisableS3EndpointRequest: +class DisableObjectStoragePrivateAccessRequest: vpc_id: str """ - ID of the VPC for which to disable S3 integration. + ID of the VPC for which to disable Object Storage private access. """ region: Optional[ScwRegion] = None @@ -896,10 +896,10 @@ class EnableDHCPRequest: @dataclass -class EnableRoutingRequest: +class EnableObjectStoragePrivateAccessRequest: vpc_id: str """ - VPC ID. + ID of the VPC for which to enable Object Storage private access. """ region: Optional[ScwRegion] = None @@ -907,12 +907,17 @@ class EnableRoutingRequest: Region to target. If none is passed will use default region from the config. """ + private_network_ids: Optional[list[str]] = field(default_factory=list) + """ + IDs of the Private Networks for which to enable Object Storage private access. + """ + @dataclass -class EnableS3EndpointRequest: +class EnableRoutingRequest: vpc_id: str """ - ID of the VPC for which to enable S3 integration. + VPC ID. """ region: Optional[ScwRegion] = None @@ -920,11 +925,6 @@ class EnableS3EndpointRequest: Region to target. If none is passed will use default region from the config. """ - private_network_ids: Optional[list[str]] = field(default_factory=list) - """ - IDs of the Private Networks for which to enable S3 integration. - """ - @dataclass class GetAclRequest: @@ -1140,9 +1140,9 @@ class ListPrivateNetworksRequest: DHCP status to filter for. When true, only Private Networks with managed DHCP enabled will be returned. """ - s3_integration_enabled: Optional[bool] = False + object_storage_private_access_enabled: Optional[bool] = False """ - Filter by whether S3 integration is enabled. When set, only matching Private Networks will be returned. + Filter by whether Object Storage private access is enabled. When set, only matching Private Networks will be returned. """ @@ -1359,9 +1359,9 @@ class ListVPCsRequest: Defines whether to filter only for VPCs which route traffic between their Private Networks. """ - s3_integration_enabled: Optional[bool] = False + object_storage_private_access_enabled: Optional[bool] = False """ - Defines whether to filter only for VPCs with S3 integration enabled. + Defines whether to filter only for VPCs with Object Storage private access enabled. """ @@ -1406,15 +1406,15 @@ class SetAclResponse: @dataclass -class SetPrivateNetworksS3EndpointRequest: +class SetPrivateNetworksObjectStoragePrivateAccessRequest: vpc_id: str """ - ID of the VPC containing the S3 Endpoint. + ID of the VPC containing the Object Storage private access. """ private_network_ids: list[str] """ - IDs of the Private Networks to associate with the S3 Endpoint. + IDs of the Private Networks to associate with the Object Storage private access. """ region: Optional[ScwRegion] = None @@ -1424,15 +1424,15 @@ class SetPrivateNetworksS3EndpointRequest: @dataclass -class SetPrivateNetworksS3EndpointResponse: +class SetPrivateNetworksObjectStoragePrivateAccessResponse: vpc_id: str """ - ID of the VPC containing the S3 Endpoint. + ID of the VPC containing the Object Storage private access. """ private_network_ids: list[str] """ - IDs of the Private Networks associated with the S3 Endpoint. + IDs of the Private Networks associated with the Object Storage private access. """ diff --git a/scaleway/scaleway/audit_trail/v1alpha1/__init__.py b/scaleway/scaleway/audit_trail/v1alpha1/__init__.py index b4cc75d78..c93a5172c 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/__init__.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/__init__.py @@ -18,6 +18,7 @@ from .types import ListSystemEventsRequestOrderBy from .types import ResourceType from .types import ServerlessContainersTriggerInfoSourceType +from .types import ServerlessFunctionsTriggerInfoInputType from .types import SystemEventKind from .types import AccountContractSignatureInfoAccountContractInfo from .types import AccountContractSignatureInfo @@ -64,6 +65,11 @@ from .types import ServerlessContainersDomainInfo from .types import ServerlessContainersNamespaceInfo from .types import ServerlessContainersTriggerInfo +from .types import ServerlessFunctionsCronInfo +from .types import ServerlessFunctionsDomainInfo +from .types import ServerlessFunctionsFunctionInfo +from .types import ServerlessFunctionsNamespaceInfo +from .types import ServerlessFunctionsTriggerInfo from .types import VpcConnectorInfo from .types import VpcGwGatewayInfo from .types import VpcGwGatewayNetworkInfo @@ -140,6 +146,7 @@ "ListSystemEventsRequestOrderBy", "ResourceType", "ServerlessContainersTriggerInfoSourceType", + "ServerlessFunctionsTriggerInfoInputType", "SystemEventKind", "AccountContractSignatureInfoAccountContractInfo", "AccountContractSignatureInfo", @@ -186,6 +193,11 @@ "ServerlessContainersDomainInfo", "ServerlessContainersNamespaceInfo", "ServerlessContainersTriggerInfo", + "ServerlessFunctionsCronInfo", + "ServerlessFunctionsDomainInfo", + "ServerlessFunctionsFunctionInfo", + "ServerlessFunctionsNamespaceInfo", + "ServerlessFunctionsTriggerInfo", "VpcConnectorInfo", "VpcGwGatewayInfo", "VpcGwGatewayNetworkInfo", diff --git a/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py b/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py index 2e493db39..e1984cebd 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py @@ -73,6 +73,11 @@ ServerlessContainersDomainInfo, ServerlessContainersNamespaceInfo, ServerlessContainersTriggerInfo, + ServerlessFunctionsCronInfo, + ServerlessFunctionsDomainInfo, + ServerlessFunctionsFunctionInfo, + ServerlessFunctionsNamespaceInfo, + ServerlessFunctionsTriggerInfo, VpcConnectorInfo, VpcGwGatewayInfo, VpcGwGatewayNetworkInfo, @@ -1284,6 +1289,97 @@ def unmarshal_ServerlessContainersTriggerInfo( return ServerlessContainersTriggerInfo(**args) +def unmarshal_ServerlessFunctionsCronInfo(data: Any) -> ServerlessFunctionsCronInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'ServerlessFunctionsCronInfo' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("function_id", None) + if field is not None: + args["function_id"] = field + else: + args["function_id"] = None + + return ServerlessFunctionsCronInfo(**args) + + +def unmarshal_ServerlessFunctionsDomainInfo(data: Any) -> ServerlessFunctionsDomainInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'ServerlessFunctionsDomainInfo' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("function_id", None) + if field is not None: + args["function_id"] = field + else: + args["function_id"] = None + + return ServerlessFunctionsDomainInfo(**args) + + +def unmarshal_ServerlessFunctionsFunctionInfo( + data: Any, +) -> ServerlessFunctionsFunctionInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'ServerlessFunctionsFunctionInfo' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("namespace_id", None) + if field is not None: + args["namespace_id"] = field + else: + args["namespace_id"] = None + + return ServerlessFunctionsFunctionInfo(**args) + + +def unmarshal_ServerlessFunctionsNamespaceInfo( + data: Any, +) -> ServerlessFunctionsNamespaceInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'ServerlessFunctionsNamespaceInfo' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + return ServerlessFunctionsNamespaceInfo(**args) + + +def unmarshal_ServerlessFunctionsTriggerInfo( + data: Any, +) -> ServerlessFunctionsTriggerInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'ServerlessFunctionsTriggerInfo' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("function_id", None) + if field is not None: + args["function_id"] = field + else: + args["function_id"] = None + + field = data.get("input_type", None) + if field is not None: + args["input_type"] = field + else: + args["input_type"] = None + + return ServerlessFunctionsTriggerInfo(**args) + + def unmarshal_VpcConnectorInfo(data: Any) -> VpcConnectorInfo: if not isinstance(data, dict): raise TypeError( @@ -1906,6 +2002,46 @@ def unmarshal_Resource(data: Any) -> Resource: else: args["serverless_containers_trigger_info"] = None + field = data.get("serverless_functions_namespace_info", None) + if field is not None: + args["serverless_functions_namespace_info"] = ( + unmarshal_ServerlessFunctionsNamespaceInfo(field) + ) + else: + args["serverless_functions_namespace_info"] = None + + field = data.get("serverless_functions_function_info", None) + if field is not None: + args["serverless_functions_function_info"] = ( + unmarshal_ServerlessFunctionsFunctionInfo(field) + ) + else: + args["serverless_functions_function_info"] = None + + field = data.get("serverless_functions_domain_info", None) + if field is not None: + args["serverless_functions_domain_info"] = ( + unmarshal_ServerlessFunctionsDomainInfo(field) + ) + else: + args["serverless_functions_domain_info"] = None + + field = data.get("serverless_functions_cron_info", None) + if field is not None: + args["serverless_functions_cron_info"] = unmarshal_ServerlessFunctionsCronInfo( + field + ) + else: + args["serverless_functions_cron_info"] = None + + field = data.get("serverless_functions_trigger_info", None) + if field is not None: + args["serverless_functions_trigger_info"] = ( + unmarshal_ServerlessFunctionsTriggerInfo(field) + ) + else: + args["serverless_functions_trigger_info"] = None + return Resource(**args) diff --git a/scaleway/scaleway/audit_trail/v1alpha1/types.py b/scaleway/scaleway/audit_trail/v1alpha1/types.py index 62b2e00e1..807e982c5 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/types.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/types.py @@ -259,6 +259,11 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta): SERVERLESS_CONTAINERS_CONTAINER = "serverless_containers_container" SERVERLESS_CONTAINERS_DOMAIN = "serverless_containers_domain" SERVERLESS_CONTAINERS_TRIGGER = "serverless_containers_trigger" + SERVERLESS_FUNCTIONS_NAMESPACE = "serverless_functions_namespace" + SERVERLESS_FUNCTIONS_FUNCTION = "serverless_functions_function" + SERVERLESS_FUNCTIONS_DOMAIN = "serverless_functions_domain" + SERVERLESS_FUNCTIONS_CRON = "serverless_functions_cron" + SERVERLESS_FUNCTIONS_TRIGGER = "serverless_functions_trigger" def __str__(self) -> str: return str(self.value) @@ -274,6 +279,15 @@ def __str__(self) -> str: return str(self.value) +class ServerlessFunctionsTriggerInfoInputType(str, Enum, metaclass=StrEnumMeta): + UNKNOWN_INPUT_TYPE = "unknown_input_type" + SCW_SQS = "scw_sqs" + SCW_NATS = "scw_nats" + + def __str__(self) -> str: + return str(self.value) + + class SystemEventKind(str, Enum, metaclass=StrEnumMeta): UNKNOWN_KIND = "unknown_kind" CRON = "cron" @@ -531,6 +545,32 @@ class ServerlessContainersTriggerInfo: source_type: ServerlessContainersTriggerInfoSourceType +@dataclass +class ServerlessFunctionsCronInfo: + function_id: str + + +@dataclass +class ServerlessFunctionsDomainInfo: + function_id: str + + +@dataclass +class ServerlessFunctionsFunctionInfo: + namespace_id: str + + +@dataclass +class ServerlessFunctionsNamespaceInfo: + pass + + +@dataclass +class ServerlessFunctionsTriggerInfo: + function_id: str + input_type: ServerlessFunctionsTriggerInfoInputType + + @dataclass class VpcConnectorInfo: vpc_id: str @@ -702,6 +742,18 @@ class Resource: serverless_containers_trigger_info: Optional[ServerlessContainersTriggerInfo] = None + serverless_functions_namespace_info: Optional[ServerlessFunctionsNamespaceInfo] = ( + None + ) + + serverless_functions_function_info: Optional[ServerlessFunctionsFunctionInfo] = None + + serverless_functions_domain_info: Optional[ServerlessFunctionsDomainInfo] = None + + serverless_functions_cron_info: Optional[ServerlessFunctionsCronInfo] = None + + serverless_functions_trigger_info: Optional[ServerlessFunctionsTriggerInfo] = None + @dataclass class EventPrincipal: diff --git a/scaleway/scaleway/block/v1/marshalling.py b/scaleway/scaleway/block/v1/marshalling.py index 7ceb69335..c206bde0c 100644 --- a/scaleway/scaleway/block/v1/marshalling.py +++ b/scaleway/scaleway/block/v1/marshalling.py @@ -208,6 +208,12 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: else: args["public"] = False + field = data.get("kms_key_id", None) + if field is not None: + args["kms_key_id"] = field + else: + args["kms_key_id"] = None + return Snapshot(**args) diff --git a/scaleway/scaleway/block/v1/types.py b/scaleway/scaleway/block/v1/types.py index 15e524b5b..b07a93fac 100644 --- a/scaleway/scaleway/block/v1/types.py +++ b/scaleway/scaleway/block/v1/types.py @@ -259,6 +259,11 @@ class Snapshot: Last modification date of the properties of a snapshot. """ + kms_key_id: Optional[str] = None + """ + KMS Key used for securing the parent volume's encryption. + """ + @dataclass class VolumeType: diff --git a/scaleway/scaleway/vpc/v2/__init__.py b/scaleway/scaleway/vpc/v2/__init__.py index 7b12ff39c..e75252e82 100644 --- a/scaleway/scaleway/vpc/v2/__init__.py +++ b/scaleway/scaleway/vpc/v2/__init__.py @@ -19,24 +19,24 @@ from .types import ListSubnetOverlapsResponseSubnetOverlap from .types import VPCConnector from .types import VPC -from .types import AddPrivateNetworkS3EndpointRequest -from .types import AddPrivateNetworkS3EndpointResponse +from .types import AddPrivateNetworkObjectStoragePrivateAccessRequest +from .types import AddPrivateNetworkObjectStoragePrivateAccessResponse from .types import CreateIngressRuleRequest from .types import CreatePrivateNetworkRequest from .types import CreateRouteRequest from .types import CreateVPCConnectorRequest from .types import CreateVPCRequest from .types import DeleteIngressRuleRequest +from .types import DeletePrivateNetworkObjectStoragePrivateAccessRequest from .types import DeletePrivateNetworkRequest -from .types import DeletePrivateNetworkS3EndpointRequest from .types import DeleteRouteRequest from .types import DeleteVPCConnectorRequest from .types import DeleteVPCRequest -from .types import DisableS3EndpointRequest +from .types import DisableObjectStoragePrivateAccessRequest from .types import EnableCustomRoutesPropagationRequest from .types import EnableDHCPRequest +from .types import EnableObjectStoragePrivateAccessRequest from .types import EnableRoutingRequest -from .types import EnableS3EndpointRequest from .types import GetAclRequest from .types import GetAclResponse from .types import GetIngressRuleRequest @@ -58,8 +58,8 @@ from .types import ListVPCsResponse from .types import SetAclRequest from .types import SetAclResponse -from .types import SetPrivateNetworksS3EndpointRequest -from .types import SetPrivateNetworksS3EndpointResponse +from .types import SetPrivateNetworksObjectStoragePrivateAccessRequest +from .types import SetPrivateNetworksObjectStoragePrivateAccessResponse from .types import UpdateIngressRuleRequest from .types import UpdatePrivateNetworkRequest from .types import UpdateRouteRequest @@ -87,24 +87,24 @@ "ListSubnetOverlapsResponseSubnetOverlap", "VPCConnector", "VPC", - "AddPrivateNetworkS3EndpointRequest", - "AddPrivateNetworkS3EndpointResponse", + "AddPrivateNetworkObjectStoragePrivateAccessRequest", + "AddPrivateNetworkObjectStoragePrivateAccessResponse", "CreateIngressRuleRequest", "CreatePrivateNetworkRequest", "CreateRouteRequest", "CreateVPCConnectorRequest", "CreateVPCRequest", "DeleteIngressRuleRequest", + "DeletePrivateNetworkObjectStoragePrivateAccessRequest", "DeletePrivateNetworkRequest", - "DeletePrivateNetworkS3EndpointRequest", "DeleteRouteRequest", "DeleteVPCConnectorRequest", "DeleteVPCRequest", - "DisableS3EndpointRequest", + "DisableObjectStoragePrivateAccessRequest", "EnableCustomRoutesPropagationRequest", "EnableDHCPRequest", + "EnableObjectStoragePrivateAccessRequest", "EnableRoutingRequest", - "EnableS3EndpointRequest", "GetAclRequest", "GetAclResponse", "GetIngressRuleRequest", @@ -126,8 +126,8 @@ "ListVPCsResponse", "SetAclRequest", "SetAclResponse", - "SetPrivateNetworksS3EndpointRequest", - "SetPrivateNetworksS3EndpointResponse", + "SetPrivateNetworksObjectStoragePrivateAccessRequest", + "SetPrivateNetworksObjectStoragePrivateAccessResponse", "UpdateIngressRuleRequest", "UpdatePrivateNetworkRequest", "UpdateRouteRequest", diff --git a/scaleway/scaleway/vpc/v2/api.py b/scaleway/scaleway/vpc/v2/api.py index 53557d76b..d928ba647 100644 --- a/scaleway/scaleway/vpc/v2/api.py +++ b/scaleway/scaleway/vpc/v2/api.py @@ -22,8 +22,8 @@ ListVPCsRequestOrderBy, VPCConnectorStatus, AclRule, - AddPrivateNetworkS3EndpointRequest, - AddPrivateNetworkS3EndpointResponse, + AddPrivateNetworkObjectStoragePrivateAccessRequest, + AddPrivateNetworkObjectStoragePrivateAccessResponse, CreateIngressRuleRequest, CreatePrivateNetworkRequest, CreateRouteRequest, @@ -42,8 +42,8 @@ Route, SetAclRequest, SetAclResponse, - SetPrivateNetworksS3EndpointRequest, - SetPrivateNetworksS3EndpointResponse, + SetPrivateNetworksObjectStoragePrivateAccessRequest, + SetPrivateNetworksObjectStoragePrivateAccessResponse, Subnet, UpdateIngressRuleRequest, UpdatePrivateNetworkRequest, @@ -59,7 +59,7 @@ unmarshal_IngressRule, unmarshal_VPCConnector, unmarshal_VPC, - unmarshal_AddPrivateNetworkS3EndpointResponse, + unmarshal_AddPrivateNetworkObjectStoragePrivateAccessResponse, unmarshal_GetAclResponse, unmarshal_ListIngressRulesResponse, unmarshal_ListPrivateNetworksResponse, @@ -68,15 +68,15 @@ unmarshal_ListVPCConnectorsResponse, unmarshal_ListVPCsResponse, unmarshal_SetAclResponse, - unmarshal_SetPrivateNetworksS3EndpointResponse, - marshal_AddPrivateNetworkS3EndpointRequest, + unmarshal_SetPrivateNetworksObjectStoragePrivateAccessResponse, + marshal_AddPrivateNetworkObjectStoragePrivateAccessRequest, marshal_CreateIngressRuleRequest, marshal_CreatePrivateNetworkRequest, marshal_CreateRouteRequest, marshal_CreateVPCConnectorRequest, marshal_CreateVPCRequest, marshal_SetAclRequest, - marshal_SetPrivateNetworksS3EndpointRequest, + marshal_SetPrivateNetworksObjectStoragePrivateAccessRequest, marshal_UpdateIngressRuleRequest, marshal_UpdatePrivateNetworkRequest, marshal_UpdateRouteRequest, @@ -103,7 +103,7 @@ def list_vp_cs( project_id: Optional[str] = None, is_default: Optional[bool] = None, routing_enabled: Optional[bool] = None, - s3_integration_enabled: Optional[bool] = None, + object_storage_private_access_enabled: Optional[bool] = None, ) -> ListVPCsResponse: """ List VPCs. @@ -118,7 +118,7 @@ def list_vp_cs( :param project_id: Project ID to filter for. Only VPCs belonging to this Project will be returned. :param is_default: Defines whether to filter only for VPCs which are the default one for their Project. :param routing_enabled: Defines whether to filter only for VPCs which route traffic between their Private Networks. - :param s3_integration_enabled: Defines whether to filter only for VPCs with S3 integration enabled. + :param object_storage_private_access_enabled: Defines whether to filter only for VPCs with Object Storage private access enabled. :return: :class:`ListVPCsResponse ` Usage: @@ -137,6 +137,7 @@ def list_vp_cs( params={ "is_default": is_default, "name": name, + "object_storage_private_access_enabled": object_storage_private_access_enabled, "order_by": order_by, "organization_id": organization_id or self.client.default_organization_id, @@ -144,7 +145,6 @@ def list_vp_cs( "page_size": page_size or self.client.default_page_size, "project_id": project_id or self.client.default_project_id, "routing_enabled": routing_enabled, - "s3_integration_enabled": s3_integration_enabled, "tags": tags, }, ) @@ -165,7 +165,7 @@ def list_vp_cs_all( project_id: Optional[str] = None, is_default: Optional[bool] = None, routing_enabled: Optional[bool] = None, - s3_integration_enabled: Optional[bool] = None, + object_storage_private_access_enabled: Optional[bool] = None, ) -> list[VPC]: """ List VPCs. @@ -180,7 +180,7 @@ def list_vp_cs_all( :param project_id: Project ID to filter for. Only VPCs belonging to this Project will be returned. :param is_default: Defines whether to filter only for VPCs which are the default one for their Project. :param routing_enabled: Defines whether to filter only for VPCs which route traffic between their Private Networks. - :param s3_integration_enabled: Defines whether to filter only for VPCs with S3 integration enabled. + :param object_storage_private_access_enabled: Defines whether to filter only for VPCs with Object Storage private access enabled. :return: :class:`list[VPC] ` Usage: @@ -204,7 +204,7 @@ def list_vp_cs_all( "project_id": project_id, "is_default": is_default, "routing_enabled": routing_enabled, - "s3_integration_enabled": s3_integration_enabled, + "object_storage_private_access_enabled": object_storage_private_access_enabled, }, ) @@ -388,7 +388,7 @@ def list_private_networks( private_network_ids: Optional[list[str]] = None, vpc_id: Optional[str] = None, dhcp_enabled: Optional[bool] = None, - s3_integration_enabled: Optional[bool] = None, + object_storage_private_access_enabled: Optional[bool] = None, ) -> ListPrivateNetworksResponse: """ List Private Networks. @@ -404,7 +404,7 @@ def list_private_networks( :param private_network_ids: Private Network IDs to filter for. Only Private Networks with one of these IDs will be returned. :param vpc_id: VPC ID to filter for. Only Private Networks belonging to this VPC will be returned. :param dhcp_enabled: DHCP status to filter for. When true, only Private Networks with managed DHCP enabled will be returned. - :param s3_integration_enabled: Filter by whether S3 integration is enabled. When set, only matching Private Networks will be returned. + :param object_storage_private_access_enabled: Filter by whether Object Storage private access is enabled. When set, only matching Private Networks will be returned. :return: :class:`ListPrivateNetworksResponse ` Usage: @@ -423,6 +423,7 @@ def list_private_networks( params={ "dhcp_enabled": dhcp_enabled, "name": name, + "object_storage_private_access_enabled": object_storage_private_access_enabled, "order_by": order_by, "organization_id": organization_id or self.client.default_organization_id, @@ -430,7 +431,6 @@ def list_private_networks( "page_size": page_size or self.client.default_page_size, "private_network_ids": private_network_ids, "project_id": project_id or self.client.default_project_id, - "s3_integration_enabled": s3_integration_enabled, "tags": tags, "vpc_id": vpc_id, }, @@ -453,7 +453,7 @@ def list_private_networks_all( private_network_ids: Optional[list[str]] = None, vpc_id: Optional[str] = None, dhcp_enabled: Optional[bool] = None, - s3_integration_enabled: Optional[bool] = None, + object_storage_private_access_enabled: Optional[bool] = None, ) -> list[PrivateNetwork]: """ List Private Networks. @@ -469,7 +469,7 @@ def list_private_networks_all( :param private_network_ids: Private Network IDs to filter for. Only Private Networks with one of these IDs will be returned. :param vpc_id: VPC ID to filter for. Only Private Networks belonging to this VPC will be returned. :param dhcp_enabled: DHCP status to filter for. When true, only Private Networks with managed DHCP enabled will be returned. - :param s3_integration_enabled: Filter by whether S3 integration is enabled. When set, only matching Private Networks will be returned. + :param object_storage_private_access_enabled: Filter by whether Object Storage private access is enabled. When set, only matching Private Networks will be returned. :return: :class:`list[PrivateNetwork] ` Usage: @@ -494,7 +494,7 @@ def list_private_networks_all( "private_network_ids": private_network_ids, "vpc_id": vpc_id, "dhcp_enabled": dhcp_enabled, - "s3_integration_enabled": s3_integration_enabled, + "object_storage_private_access_enabled": object_storage_private_access_enabled, }, ) @@ -1832,7 +1832,7 @@ def delete_ingress_rule( self._throw_on_error(res) - def enable_s3_endpoint( + def enable_object_storage_private_access( self, *, vpc_id: str, @@ -1840,17 +1840,17 @@ def enable_s3_endpoint( private_network_ids: Optional[list[str]] = None, ) -> VPC: """ - Enable S3 integration. - Enable S3 integration for a VPC. - :param vpc_id: ID of the VPC for which to enable S3 integration. + Enable Object Storage private access. + Enable Object Storage private access for a VPC. + :param vpc_id: ID of the VPC for which to enable Object Storage private access. :param region: Region to target. If none is passed will use default region from the config. - :param private_network_ids: IDs of the Private Networks for which to enable S3 integration. + :param private_network_ids: IDs of the Private Networks for which to enable Object Storage private access. :return: :class:`VPC ` Usage: :: - result = api.enable_s3_endpoint( + result = api.enable_object_storage_private_access( vpc_id="example", ) """ @@ -1862,7 +1862,7 @@ def enable_s3_endpoint( res = self._request( "POST", - f"/vpc/v2/regions/{param_region}/s3-integration/{param_vpc_id}/enable", + f"/vpc/v2/regions/{param_region}/object-storage-private-access/{param_vpc_id}/enable", params={ "private_network_ids": private_network_ids, }, @@ -1871,23 +1871,23 @@ def enable_s3_endpoint( self._throw_on_error(res) return unmarshal_VPC(res.json()) - def disable_s3_endpoint( + def disable_object_storage_private_access( self, *, vpc_id: str, region: Optional[ScwRegion] = None, ) -> VPC: """ - Disable S3 integration. - Disable S3 integration for a VPC. - :param vpc_id: ID of the VPC for which to disable S3 integration. + Disable Object Storage private access. + Disable Object Storage private access for a VPC. + :param vpc_id: ID of the VPC for which to disable Object Storage private access. :param region: Region to target. If none is passed will use default region from the config. :return: :class:`VPC ` Usage: :: - result = api.disable_s3_endpoint( + result = api.disable_object_storage_private_access( vpc_id="example", ) """ @@ -1899,31 +1899,31 @@ def disable_s3_endpoint( res = self._request( "POST", - f"/vpc/v2/regions/{param_region}/s3-integration/{param_vpc_id}/disable", + f"/vpc/v2/regions/{param_region}/object-storage-private-access/{param_vpc_id}/disable", ) self._throw_on_error(res) return unmarshal_VPC(res.json()) - def add_private_network_s3_endpoint( + def add_private_network_object_storage_private_access( self, *, vpc_id: str, private_network_id: str, region: Optional[ScwRegion] = None, - ) -> AddPrivateNetworkS3EndpointResponse: + ) -> AddPrivateNetworkObjectStoragePrivateAccessResponse: """ - Add a Private Network to an S3 Endpoint. - Add a Private Network to the S3 Endpoint to enable S3 integration for its resources. - :param vpc_id: ID of the VPC containing the S3 Endpoint. - :param private_network_id: ID of the Private Network to add to the S3 Endpoint. + Add a Private Network to an Object Storage private access. + Add a Private Network to the Object Storage private access to enable Object Storage integration for its resources. + :param vpc_id: ID of the VPC containing the Object Storage private access. + :param private_network_id: ID of the Private Network to add to the Object Storage private access. :param region: Region to target. If none is passed will use default region from the config. - :return: :class:`AddPrivateNetworkS3EndpointResponse ` + :return: :class:`AddPrivateNetworkObjectStoragePrivateAccessResponse ` Usage: :: - result = api.add_private_network_s3_endpoint( + result = api.add_private_network_object_storage_private_access( vpc_id="example", private_network_id="example", ) @@ -1936,9 +1936,9 @@ def add_private_network_s3_endpoint( res = self._request( "POST", - f"/vpc/v2/regions/{param_region}/s3-integration/{param_vpc_id}/private-networks", - body=marshal_AddPrivateNetworkS3EndpointRequest( - AddPrivateNetworkS3EndpointRequest( + f"/vpc/v2/regions/{param_region}/object-storage-private-access/{param_vpc_id}/private-networks", + body=marshal_AddPrivateNetworkObjectStoragePrivateAccessRequest( + AddPrivateNetworkObjectStoragePrivateAccessRequest( vpc_id=vpc_id, private_network_id=private_network_id, region=region, @@ -1948,27 +1948,27 @@ def add_private_network_s3_endpoint( ) self._throw_on_error(res) - return unmarshal_AddPrivateNetworkS3EndpointResponse(res.json()) + return unmarshal_AddPrivateNetworkObjectStoragePrivateAccessResponse(res.json()) - def set_private_networks_s3_endpoint( + def set_private_networks_object_storage_private_access( self, *, vpc_id: str, private_network_ids: list[str], region: Optional[ScwRegion] = None, - ) -> SetPrivateNetworksS3EndpointResponse: + ) -> SetPrivateNetworksObjectStoragePrivateAccessResponse: """ - Set S3 Endpoint Private Networks. - Set the Private Networks associated with the S3 Endpoint to enable S3 integration for their resources. - :param vpc_id: ID of the VPC containing the S3 Endpoint. - :param private_network_ids: IDs of the Private Networks to associate with the S3 Endpoint. + Set Object Storage private access Private Networks. + Set the Private Networks associated with the Object Storage private access to enable Object Storage integration for their resources. + :param vpc_id: ID of the VPC containing the Object Storage private access. + :param private_network_ids: IDs of the Private Networks to associate with the Object Storage private access. :param region: Region to target. If none is passed will use default region from the config. - :return: :class:`SetPrivateNetworksS3EndpointResponse ` + :return: :class:`SetPrivateNetworksObjectStoragePrivateAccessResponse ` Usage: :: - result = api.set_private_networks_s3_endpoint( + result = api.set_private_networks_object_storage_private_access( vpc_id="example", private_network_ids=[], ) @@ -1981,9 +1981,9 @@ def set_private_networks_s3_endpoint( res = self._request( "PUT", - f"/vpc/v2/regions/{param_region}/s3-integration/{param_vpc_id}/private-networks", - body=marshal_SetPrivateNetworksS3EndpointRequest( - SetPrivateNetworksS3EndpointRequest( + f"/vpc/v2/regions/{param_region}/object-storage-private-access/{param_vpc_id}/private-networks", + body=marshal_SetPrivateNetworksObjectStoragePrivateAccessRequest( + SetPrivateNetworksObjectStoragePrivateAccessRequest( vpc_id=vpc_id, private_network_ids=private_network_ids, region=region, @@ -1993,9 +1993,11 @@ def set_private_networks_s3_endpoint( ) self._throw_on_error(res) - return unmarshal_SetPrivateNetworksS3EndpointResponse(res.json()) + return unmarshal_SetPrivateNetworksObjectStoragePrivateAccessResponse( + res.json() + ) - def delete_private_network_s3_endpoint( + def delete_private_network_object_storage_private_access( self, *, vpc_id: str, @@ -2003,16 +2005,16 @@ def delete_private_network_s3_endpoint( region: Optional[ScwRegion] = None, ) -> None: """ - Remove a Private Network from an S3 Endpoint. - Remove a Private Network from the S3 Endpoint to disable S3 integration for its resources. - :param vpc_id: ID of the VPC containing the S3 Endpoint. - :param private_network_id: ID of the Private Network to remove from the S3 Endpoint. + Remove a Private Network from an Object Storage private access. + Remove a Private Network from the Object Storage private access to disable Object Storage integration for its resources. + :param vpc_id: ID of the VPC containing the Object Storage private access. + :param private_network_id: ID of the Private Network to remove from the Object Storage private access. :param region: Region to target. If none is passed will use default region from the config. Usage: :: - result = api.delete_private_network_s3_endpoint( + result = api.delete_private_network_object_storage_private_access( vpc_id="example", private_network_id="example", ) @@ -2028,7 +2030,7 @@ def delete_private_network_s3_endpoint( res = self._request( "DELETE", - f"/vpc/v2/regions/{param_region}/s3-integration/{param_vpc_id}/private-networks/{param_private_network_id}", + f"/vpc/v2/regions/{param_region}/object-storage-private-access/{param_vpc_id}/private-networks/{param_private_network_id}", ) self._throw_on_error(res) diff --git a/scaleway/scaleway/vpc/v2/marshalling.py b/scaleway/scaleway/vpc/v2/marshalling.py index ce2f42d14..04979d393 100644 --- a/scaleway/scaleway/vpc/v2/marshalling.py +++ b/scaleway/scaleway/vpc/v2/marshalling.py @@ -15,7 +15,7 @@ VPCConnectorPeerInfo, VPCConnector, VPC, - AddPrivateNetworkS3EndpointResponse, + AddPrivateNetworkObjectStoragePrivateAccessResponse, AclRule, GetAclResponse, ListIngressRulesResponse, @@ -26,15 +26,15 @@ ListVPCConnectorsResponse, ListVPCsResponse, SetAclResponse, - SetPrivateNetworksS3EndpointResponse, - AddPrivateNetworkS3EndpointRequest, + SetPrivateNetworksObjectStoragePrivateAccessResponse, + AddPrivateNetworkObjectStoragePrivateAccessRequest, CreateIngressRuleRequest, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCConnectorRequest, CreateVPCRequest, SetAclRequest, - SetPrivateNetworksS3EndpointRequest, + SetPrivateNetworksObjectStoragePrivateAccessRequest, UpdateIngressRuleRequest, UpdatePrivateNetworkRequest, UpdateRouteRequest, @@ -184,11 +184,11 @@ def unmarshal_PrivateNetwork(data: Any) -> PrivateNetwork: else: args["default_route_propagation_enabled"] = False - field = data.get("has_s3_integration", None) + field = data.get("has_object_storage_private_access", None) if field is not None: - args["has_s3_integration"] = field + args["has_object_storage_private_access"] = field else: - args["has_s3_integration"] = False + args["has_object_storage_private_access"] = False return PrivateNetwork(**args) @@ -557,11 +557,11 @@ def unmarshal_VPC(data: Any) -> VPC: else: args["transitivity_enabled"] = False - field = data.get("s3_integration_enabled", None) + field = data.get("object_storage_private_access_enabled", None) if field is not None: - args["s3_integration_enabled"] = field + args["object_storage_private_access_enabled"] = field else: - args["s3_integration_enabled"] = False + args["object_storage_private_access_enabled"] = False field = data.get("created_at", None) if field is not None: @@ -578,12 +578,12 @@ def unmarshal_VPC(data: Any) -> VPC: return VPC(**args) -def unmarshal_AddPrivateNetworkS3EndpointResponse( +def unmarshal_AddPrivateNetworkObjectStoragePrivateAccessResponse( data: Any, -) -> AddPrivateNetworkS3EndpointResponse: +) -> AddPrivateNetworkObjectStoragePrivateAccessResponse: if not isinstance(data, dict): raise TypeError( - "Unmarshalling the type 'AddPrivateNetworkS3EndpointResponse' failed as data isn't a dictionary." + "Unmarshalling the type 'AddPrivateNetworkObjectStoragePrivateAccessResponse' failed as data isn't a dictionary." ) args: dict[str, Any] = {} @@ -600,7 +600,7 @@ def unmarshal_AddPrivateNetworkS3EndpointResponse( else: args["private_network_ids"] = [] - return AddPrivateNetworkS3EndpointResponse(**args) + return AddPrivateNetworkObjectStoragePrivateAccessResponse(**args) def unmarshal_AclRule(data: Any) -> AclRule: @@ -905,12 +905,12 @@ def unmarshal_SetAclResponse(data: Any) -> SetAclResponse: return SetAclResponse(**args) -def unmarshal_SetPrivateNetworksS3EndpointResponse( +def unmarshal_SetPrivateNetworksObjectStoragePrivateAccessResponse( data: Any, -) -> SetPrivateNetworksS3EndpointResponse: +) -> SetPrivateNetworksObjectStoragePrivateAccessResponse: if not isinstance(data, dict): raise TypeError( - "Unmarshalling the type 'SetPrivateNetworksS3EndpointResponse' failed as data isn't a dictionary." + "Unmarshalling the type 'SetPrivateNetworksObjectStoragePrivateAccessResponse' failed as data isn't a dictionary." ) args: dict[str, Any] = {} @@ -927,11 +927,11 @@ def unmarshal_SetPrivateNetworksS3EndpointResponse( else: args["private_network_ids"] = [] - return SetPrivateNetworksS3EndpointResponse(**args) + return SetPrivateNetworksObjectStoragePrivateAccessResponse(**args) -def marshal_AddPrivateNetworkS3EndpointRequest( - request: AddPrivateNetworkS3EndpointRequest, +def marshal_AddPrivateNetworkObjectStoragePrivateAccessRequest( + request: AddPrivateNetworkObjectStoragePrivateAccessRequest, defaults: ProfileDefaults, ) -> dict[str, Any]: output: dict[str, Any] = {} @@ -1131,8 +1131,8 @@ def marshal_SetAclRequest( return output -def marshal_SetPrivateNetworksS3EndpointRequest( - request: SetPrivateNetworksS3EndpointRequest, +def marshal_SetPrivateNetworksObjectStoragePrivateAccessRequest( + request: SetPrivateNetworksObjectStoragePrivateAccessRequest, defaults: ProfileDefaults, ) -> dict[str, Any]: output: dict[str, Any] = {} diff --git a/scaleway/scaleway/vpc/v2/types.py b/scaleway/scaleway/vpc/v2/types.py index b0ec1e9a5..e3fee5196 100644 --- a/scaleway/scaleway/vpc/v2/types.py +++ b/scaleway/scaleway/vpc/v2/types.py @@ -211,9 +211,9 @@ class PrivateNetwork: Defines whether default v4 and v6 routes are propagated for this Private Network. """ - has_s3_integration: bool + has_object_storage_private_access: bool """ - Defines whether this Private Network is enabled for S3 integration. + Defines whether this Private Network is enabled for Object Storage private access. """ created_at: Optional[datetime] = None @@ -546,9 +546,9 @@ class VPC: Defines whether the VPC allows packets from peered VPCs to transit through. """ - s3_integration_enabled: bool + object_storage_private_access_enabled: bool """ - Defines whether the S3 integration is enabled for the VPC. + Defines whether the Object Storage private access is enabled for the VPC. """ created_at: Optional[datetime] = None @@ -563,15 +563,15 @@ class VPC: @dataclass -class AddPrivateNetworkS3EndpointRequest: +class AddPrivateNetworkObjectStoragePrivateAccessRequest: vpc_id: str """ - ID of the VPC containing the S3 Endpoint. + ID of the VPC containing the Object Storage private access. """ private_network_id: str """ - ID of the Private Network to add to the S3 Endpoint. + ID of the Private Network to add to the Object Storage private access. """ region: Optional[ScwRegion] = None @@ -581,15 +581,15 @@ class AddPrivateNetworkS3EndpointRequest: @dataclass -class AddPrivateNetworkS3EndpointResponse: +class AddPrivateNetworkObjectStoragePrivateAccessResponse: vpc_id: str """ - ID of the VPC containing the S3 Endpoint. + ID of the VPC containing the Object Storage private access. """ private_network_ids: list[str] """ - IDs of the Private Networks associated with the S3 Endpoint. + IDs of the Private Networks associated with the Object Storage private access. """ @@ -787,10 +787,15 @@ class DeleteIngressRuleRequest: @dataclass -class DeletePrivateNetworkRequest: +class DeletePrivateNetworkObjectStoragePrivateAccessRequest: + vpc_id: str + """ + ID of the VPC containing the Object Storage private access. + """ + private_network_id: str """ - Private Network ID. + ID of the Private Network to remove from the Object Storage private access. """ region: Optional[ScwRegion] = None @@ -800,15 +805,10 @@ class DeletePrivateNetworkRequest: @dataclass -class DeletePrivateNetworkS3EndpointRequest: - vpc_id: str - """ - ID of the VPC containing the S3 Endpoint. - """ - +class DeletePrivateNetworkRequest: private_network_id: str """ - ID of the Private Network to remove from the S3 Endpoint. + Private Network ID. """ region: Optional[ScwRegion] = None @@ -857,10 +857,10 @@ class DeleteVPCRequest: @dataclass -class DisableS3EndpointRequest: +class DisableObjectStoragePrivateAccessRequest: vpc_id: str """ - ID of the VPC for which to disable S3 integration. + ID of the VPC for which to disable Object Storage private access. """ region: Optional[ScwRegion] = None @@ -896,10 +896,10 @@ class EnableDHCPRequest: @dataclass -class EnableRoutingRequest: +class EnableObjectStoragePrivateAccessRequest: vpc_id: str """ - VPC ID. + ID of the VPC for which to enable Object Storage private access. """ region: Optional[ScwRegion] = None @@ -907,12 +907,17 @@ class EnableRoutingRequest: Region to target. If none is passed will use default region from the config. """ + private_network_ids: Optional[list[str]] = field(default_factory=list) + """ + IDs of the Private Networks for which to enable Object Storage private access. + """ + @dataclass -class EnableS3EndpointRequest: +class EnableRoutingRequest: vpc_id: str """ - ID of the VPC for which to enable S3 integration. + VPC ID. """ region: Optional[ScwRegion] = None @@ -920,11 +925,6 @@ class EnableS3EndpointRequest: Region to target. If none is passed will use default region from the config. """ - private_network_ids: Optional[list[str]] = field(default_factory=list) - """ - IDs of the Private Networks for which to enable S3 integration. - """ - @dataclass class GetAclRequest: @@ -1140,9 +1140,9 @@ class ListPrivateNetworksRequest: DHCP status to filter for. When true, only Private Networks with managed DHCP enabled will be returned. """ - s3_integration_enabled: Optional[bool] = False + object_storage_private_access_enabled: Optional[bool] = False """ - Filter by whether S3 integration is enabled. When set, only matching Private Networks will be returned. + Filter by whether Object Storage private access is enabled. When set, only matching Private Networks will be returned. """ @@ -1359,9 +1359,9 @@ class ListVPCsRequest: Defines whether to filter only for VPCs which route traffic between their Private Networks. """ - s3_integration_enabled: Optional[bool] = False + object_storage_private_access_enabled: Optional[bool] = False """ - Defines whether to filter only for VPCs with S3 integration enabled. + Defines whether to filter only for VPCs with Object Storage private access enabled. """ @@ -1406,15 +1406,15 @@ class SetAclResponse: @dataclass -class SetPrivateNetworksS3EndpointRequest: +class SetPrivateNetworksObjectStoragePrivateAccessRequest: vpc_id: str """ - ID of the VPC containing the S3 Endpoint. + ID of the VPC containing the Object Storage private access. """ private_network_ids: list[str] """ - IDs of the Private Networks to associate with the S3 Endpoint. + IDs of the Private Networks to associate with the Object Storage private access. """ region: Optional[ScwRegion] = None @@ -1424,15 +1424,15 @@ class SetPrivateNetworksS3EndpointRequest: @dataclass -class SetPrivateNetworksS3EndpointResponse: +class SetPrivateNetworksObjectStoragePrivateAccessResponse: vpc_id: str """ - ID of the VPC containing the S3 Endpoint. + ID of the VPC containing the Object Storage private access. """ private_network_ids: list[str] """ - IDs of the Private Networks associated with the S3 Endpoint. + IDs of the Private Networks associated with the Object Storage private access. """