From 325a2539ce1e094575121a783110b7fe820fc6ce Mon Sep 17 00:00:00 2001 From: Matthias Gatto Date: Tue, 24 Dec 2024 15:50:00 +0100 Subject: [PATCH] update cognac Signed-off-by: Matthias Gatto --- osc-sdk-C | 2 +- osc_sdk.c | 19289 +++++++++++++++++++++++++++------------------------- osc_sdk.h | 10279 ++++++++++++++-------------- 3 files changed, 15254 insertions(+), 14316 deletions(-) diff --git a/osc-sdk-C b/osc-sdk-C index 5bda2e2..d14a0ab 160000 --- a/osc-sdk-C +++ b/osc-sdk-C @@ -1 +1 @@ -Subproject commit 5bda2e2561e9c70446b4fd13a5d5aaeb37cfe2f7 +Subproject commit d14a0ab6a808f45765e40bb5491c2cae7cde4eab diff --git a/osc_sdk.c b/osc_sdk.c index f638269..d723236 100644 --- a/osc_sdk.c +++ b/osc_sdk.c @@ -79,930 +79,1178 @@ static inline char* stpcpy(char *dest, const char *src) #ifdef WITH_DESCRIPTION static const char *calls_name[] = { - "UpdateVpnConnection", - "UpdateVolume", - "UpdateVmTemplate", - "UpdateVmGroup", - "UpdateVm", - "UpdateUserGroup", - "UpdateUser", - "UpdateSubnet", - "UpdateSnapshot", - "UpdateServerCertificate", - "UpdateRouteTableLink", - "UpdateRoutePropagation", - "UpdateRoute", - "UpdateNic", - "UpdateNetAccessPoint", - "UpdateNet", - "UpdateLoadBalancer", - "UpdateListenerRule", - "UpdateImage", - "UpdateFlexibleGpu", - "UpdateDirectLinkInterface", - "UpdateDedicatedGroup", - "UpdateCa", - "UpdateApiAccessRule", - "UpdateApiAccessPolicy", - "UpdateAccount", - "UpdateAccessKey", - "UnlinkVolume", - "UnlinkVirtualGateway", - "UnlinkRouteTable", - "UnlinkPublicIp", - "UnlinkPrivateIps", - "UnlinkPolicy", - "UnlinkNic", - "UnlinkManagedPolicyFromUserGroup", - "UnlinkLoadBalancerBackendMachines", - "UnlinkInternetService", - "UnlinkFlexibleGpu", - "StopVms", - "StartVms", - "SetDefaultPolicyVersion", - "ScaleUpVmGroup", - "ScaleDownVmGroup", - "RemoveUserFromUserGroup", - "RejectNetPeering", - "RegisterVmsInLoadBalancer", - "RebootVms", - "ReadVpnConnections", - "ReadVolumes", - "ReadVmsState", - "ReadVmsHealth", - "ReadVms", - "ReadVmTypes", - "ReadVmTemplates", - "ReadVmGroups", - "ReadVirtualGateways", - "ReadUsers", - "ReadUserGroupsPerUser", - "ReadUserGroups", - "ReadUserGroupPolicy", - "ReadUserGroupPolicies", - "ReadUserGroup", - "ReadUnitPrice", - "ReadTags", - "ReadSubregions", - "ReadSubnets", - "ReadSnapshots", - "ReadSnapshotExportTasks", - "ReadServerCertificates", - "ReadSecurityGroups", - "ReadSecretAccessKey", - "ReadRouteTables", - "ReadRegions", - "ReadQuotas", - "ReadPublicIps", - "ReadPublicIpRanges", - "ReadPublicCatalog", - "ReadProductTypes", - "ReadPolicyVersions", - "ReadPolicyVersion", - "ReadPolicy", - "ReadPolicies", - "ReadNics", - "ReadNets", - "ReadNetPeerings", - "ReadNetAccessPoints", - "ReadNetAccessPointServices", - "ReadNatServices", - "ReadManagedPoliciesLinkedToUserGroup", - "ReadLocations", - "ReadLoadBalancers", - "ReadLoadBalancerTags", - "ReadListenerRules", - "ReadLinkedPolicies", - "ReadKeypairs", - "ReadInternetServices", - "ReadImages", - "ReadImageExportTasks", - "ReadFlexibleGpus", - "ReadFlexibleGpuCatalog", - "ReadEntitiesLinkedToPolicy", - "ReadDirectLinks", - "ReadDirectLinkInterfaces", - "ReadDhcpOptions", - "ReadDedicatedGroups", - "ReadConsumptionAccount", - "ReadConsoleOutput", - "ReadClientGateways", - "ReadCatalogs", - "ReadCatalog", - "ReadCas", - "ReadApiLogs", - "ReadApiAccessRules", - "ReadApiAccessPolicy", - "ReadAdminPassword", - "ReadAccounts", - "ReadAccessKeys", - "PutUserGroupPolicy", - "LinkVolume", - "LinkVirtualGateway", - "LinkRouteTable", - "LinkPublicIp", - "LinkPrivateIps", - "LinkPolicy", - "LinkNic", - "LinkManagedPolicyToUserGroup", - "LinkLoadBalancerBackendMachines", - "LinkInternetService", - "LinkFlexibleGpu", - "DeregisterVmsInLoadBalancer", - "DeleteVpnConnectionRoute", - "DeleteVpnConnection", - "DeleteVolume", - "DeleteVms", - "DeleteVmTemplate", - "DeleteVmGroup", - "DeleteVirtualGateway", - "DeleteUserGroupPolicy", - "DeleteUserGroup", - "DeleteUser", - "DeleteTags", - "DeleteSubnet", - "DeleteSnapshot", - "DeleteServerCertificate", - "DeleteSecurityGroupRule", - "DeleteSecurityGroup", - "DeleteRouteTable", - "DeleteRoute", - "DeletePublicIp", - "DeletePolicyVersion", - "DeletePolicy", - "DeleteNic", - "DeleteNetPeering", - "DeleteNetAccessPoint", - "DeleteNet", - "DeleteNatService", - "DeleteLoadBalancerTags", - "DeleteLoadBalancerPolicy", - "DeleteLoadBalancerListeners", - "DeleteLoadBalancer", - "DeleteListenerRule", - "DeleteKeypair", - "DeleteInternetService", - "DeleteImage", - "DeleteFlexibleGpu", - "DeleteExportTask", - "DeleteDirectLinkInterface", - "DeleteDirectLink", - "DeleteDhcpOptions", - "DeleteDedicatedGroup", - "DeleteClientGateway", - "DeleteCa", - "DeleteApiAccessRule", - "DeleteAccessKey", - "CreateVpnConnectionRoute", - "CreateVpnConnection", - "CreateVolume", - "CreateVms", - "CreateVmTemplate", - "CreateVmGroup", - "CreateVirtualGateway", - "CreateUserGroup", - "CreateUser", - "CreateTags", - "CreateSubnet", - "CreateSnapshotExportTask", - "CreateSnapshot", - "CreateServerCertificate", - "CreateSecurityGroupRule", - "CreateSecurityGroup", - "CreateRouteTable", - "CreateRoute", - "CreatePublicIp", - "CreateProductType", - "CreatePolicyVersion", - "CreatePolicy", - "CreateNic", - "CreateNetPeering", - "CreateNetAccessPoint", - "CreateNet", - "CreateNatService", - "CreateLoadBalancerTags", - "CreateLoadBalancerPolicy", - "CreateLoadBalancerListeners", - "CreateLoadBalancer", - "CreateListenerRule", - "CreateKeypair", - "CreateInternetService", - "CreateImageExportTask", - "CreateImage", - "CreateFlexibleGpu", + "AcceptNetPeering", + "AddUserToUserGroup", + "CheckAuthentication", + "CreateAccessKey", + "CreateAccount", + "CreateApiAccessRule", + "CreateCa", + "CreateClientGateway", + "CreateDedicatedGroup", + "CreateDhcpOptions", "CreateDirectLinkInterface", "CreateDirectLink", - "CreateDhcpOptions", - "CreateDedicatedGroup", - "CreateClientGateway", - "CreateCa", - "CreateApiAccessRule", - "CreateAccount", - "CreateAccessKey", - "CheckAuthentication", - "AddUserToUserGroup", - "AcceptNetPeering", + "CreateFlexibleGpu", + "CreateImageExportTask", + "CreateImage", + "CreateInternetService", + "CreateKeypair", + "CreateListenerRule", + "CreateLoadBalancerListeners", + "CreateLoadBalancerPolicy", + "CreateLoadBalancer", + "CreateLoadBalancerTags", + "CreateNatService", + "CreateNetAccessPoint", + "CreateNetPeering", + "CreateNet", + "CreateNic", + "CreatePolicy", + "CreatePolicyVersion", + "CreateProductType", + "CreatePublicIp", + "CreateRoute", + "CreateRouteTable", + "CreateSecurityGroup", + "CreateSecurityGroupRule", + "CreateServerCertificate", + "CreateSnapshotExportTask", + "CreateSnapshot", + "CreateSubnet", + "CreateTags", + "CreateUserGroup", + "CreateUser", + "CreateVirtualGateway", + "CreateVmGroup", + "CreateVmTemplate", + "CreateVms", + "CreateVolume", + "CreateVpnConnection", + "CreateVpnConnectionRoute", + "DeleteAccessKey", + "DeleteApiAccessRule", + "DeleteCa", + "DeleteClientGateway", + "DeleteDedicatedGroup", + "DeleteDhcpOptions", + "DeleteDirectLinkInterface", + "DeleteDirectLink", + "DeleteExportTask", + "DeleteFlexibleGpu", + "DeleteImage", + "DeleteInternetService", + "DeleteKeypair", + "DeleteListenerRule", + "DeleteLoadBalancerListeners", + "DeleteLoadBalancerPolicy", + "DeleteLoadBalancer", + "DeleteLoadBalancerTags", + "DeleteNatService", + "DeleteNetAccessPoint", + "DeleteNetPeering", + "DeleteNet", + "DeleteNic", + "DeletePolicy", + "DeletePolicyVersion", + "DeletePublicIp", + "DeleteRoute", + "DeleteRouteTable", + "DeleteSecurityGroup", + "DeleteSecurityGroupRule", + "DeleteServerCertificate", + "DeleteSnapshot", + "DeleteSubnet", + "DeleteTags", + "DeleteUserGroupPolicy", + "DeleteUserGroup", + "DeleteUser", + "DeleteVirtualGateway", + "DeleteVmGroup", + "DeleteVmTemplate", + "DeleteVms", + "DeleteVolume", + "DeleteVpnConnection", + "DeleteVpnConnectionRoute", + "DeregisterVmsInLoadBalancer", + "LinkFlexibleGpu", + "LinkInternetService", + "LinkLoadBalancerBackendMachines", + "LinkManagedPolicyToUserGroup", + "LinkNic", + "LinkPolicy", + "LinkPrivateIps", + "LinkPublicIp", + "LinkRouteTable", + "LinkVirtualGateway", + "LinkVolume", + "PutUserGroupPolicy", + "ReadAccessKeys", + "ReadAccounts", + "ReadAdminPassword", + "ReadApiAccessPolicy", + "ReadApiAccessRules", + "ReadApiLogs", + "ReadCas", + "ReadCatalog", + "ReadCatalogs", + "ReadClientGateways", + "ReadConsoleOutput", + "ReadConsumptionAccount", + "ReadDedicatedGroups", + "ReadDhcpOptions", + "ReadDirectLinkInterfaces", + "ReadDirectLinks", + "ReadEntitiesLinkedToPolicy", + "ReadFlexibleGpuCatalog", + "ReadFlexibleGpus", + "ReadImageExportTasks", + "ReadImages", + "ReadInternetServices", + "ReadKeypairs", + "ReadLinkedPolicies", + "ReadListenerRules", + "ReadLoadBalancerTags", + "ReadLoadBalancers", + "ReadLocations", + "ReadManagedPoliciesLinkedToUserGroup", + "ReadNatServices", + "ReadNetAccessPointServices", + "ReadNetAccessPoints", + "ReadNetPeerings", + "ReadNets", + "ReadNics", + "ReadPolicies", + "ReadPolicy", + "ReadPolicyVersion", + "ReadPolicyVersions", + "ReadProductTypes", + "ReadPublicCatalog", + "ReadPublicIpRanges", + "ReadPublicIps", + "ReadQuotas", + "ReadRegions", + "ReadRouteTables", + "ReadSecretAccessKey", + "ReadSecurityGroups", + "ReadServerCertificates", + "ReadSnapshotExportTasks", + "ReadSnapshots", + "ReadSubnets", + "ReadSubregions", + "ReadTags", + "ReadUnitPrice", + "ReadUserGroupPolicies", + "ReadUserGroupPolicy", + "ReadUserGroup", + "ReadUserGroupsPerUser", + "ReadUserGroups", + "ReadUsers", + "ReadVirtualGateways", + "ReadVmGroups", + "ReadVmTemplates", + "ReadVmTypes", + "ReadVmsHealth", + "ReadVms", + "ReadVmsState", + "ReadVolumes", + "ReadVpnConnections", + "RebootVms", + "RegisterVmsInLoadBalancer", + "RejectNetPeering", + "RemoveUserFromUserGroup", + "ScaleDownVmGroup", + "ScaleUpVmGroup", + "SetDefaultPolicyVersion", + "StartVms", + "StopVms", + "UnlinkFlexibleGpu", + "UnlinkInternetService", + "UnlinkLoadBalancerBackendMachines", + "UnlinkManagedPolicyFromUserGroup", + "UnlinkNic", + "UnlinkPolicy", + "UnlinkPrivateIps", + "UnlinkPublicIp", + "UnlinkRouteTable", + "UnlinkVirtualGateway", + "UnlinkVolume", + "UpdateAccessKey", + "UpdateAccount", + "UpdateApiAccessPolicy", + "UpdateApiAccessRule", + "UpdateCa", + "UpdateDedicatedGroup", + "UpdateDirectLinkInterface", + "UpdateFlexibleGpu", + "UpdateImage", + "UpdateListenerRule", + "UpdateLoadBalancer", + "UpdateNetAccessPoint", + "UpdateNet", + "UpdateNic", + "UpdateRoutePropagation", + "UpdateRoute", + "UpdateRouteTableLink", + "UpdateServerCertificate", + "UpdateSnapshot", + "UpdateSubnet", + "UpdateUserGroup", + "UpdateUser", + "UpdateVmGroup", + "UpdateVm", + "UpdateVmTemplate", + "UpdateVolume", + "UpdateVpnConnection", NULL }; static const char *calls_descriptions[] = { - "Usage: oapi-cli UpdateVpnConnection --VpnConnectionId=vpnconnectionid [OPTIONS]\n" "Modifies the specified attributes of a VPN connection.\n" "\nRequired Argument: VpnConnectionId \n" + "Usage: oapi-cli AcceptNetPeering --NetPeeringId=netpeeringid [OPTIONS]\n" "Accepts a Net peering request.\nTo accept this request, you must be the owner \n" "of the peer Net. If you do not accept the request within 7 days, the state of \n" "the Net peering becomes `expired`.\n\n**[NOTE]**\nA peering connection between \n" "two Nets works both ways. Therefore, when an A-to-B peering connection is \n" "accepted, any pending B-to-A peering connection is automatically rejected as \n" "redundant.\n" "\nRequired Argument: NetPeeringId \n" , - "Usage: oapi-cli UpdateVolume --VolumeId=volumeid [OPTIONS]\n" "Modifies the specified attributes of a volume.\nCold volumes are volumes that \n" "are attached to stopped or stopping VMs, or that are detached. Hot volumes are \n" "volumes that are attached to running VMs.\n\n**[NOTE]**\nWhen the modification \n" "is not instantaneous, the response displays the previous value. You can use the \n" "[ReadVolumes](#readvolumes) method to see the new value.\n" "\nRequired Argument: VolumeId \n" + "Usage: oapi-cli AddUserToUserGroup --UserGroupName=usergroupname --UserName=username [OPTIONS]\n" "Adds a user to a specified group.\n" "\nRequired Argument: UserGroupName UserName \n" , - "Usage: oapi-cli UpdateVmTemplate --VmTemplateId=vmtemplateid [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nModifies the specified attributes of a template of virtual \n" "machines (VMs).\n" "\nRequired Argument: VmTemplateId \n" + "Usage: oapi-cli CheckAuthentication --Login=login --Password=password [OPTIONS]\n" "Validates the authenticity of the account.\n" "\nRequired Argument: Login Password \n" , - "Usage: oapi-cli UpdateVmGroup --VmGroupId=vmgroupid [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nModifies the specified attributes of a group of virtual machines \n" "(VMs).\n" "\nRequired Argument: VmGroupId \n" + "Usage: oapi-cli CreateAccessKey [OPTIONS]\n" "Creates an access key for either your root account or an EIM user. The new key \n" "is automatically set to `ACTIVE`.\nFor more information, see [About Access \n" "Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli UpdateVm --VmId=vmid [OPTIONS]\n" "Modifies the specified attributes of a virtual machine (VM).\nYou must stop the \n" "VM before modifying the following attributes:\n* `NestedVirtualization`\n* \n" "`Performance`\n* `UserData`\n* `VmType`\n" "\nRequired Argument: VmId \n" + "Usage: oapi-cli CreateAccount --City=city --CompanyName=companyname --Country=country --CustomerId=customerid --Email=email --FirstName=firstname --LastName=lastname --ZipCode=zipcode [OPTIONS]\n" "Creates an OUTSCALE account.\n\n**[IMPORTANT]**\n* You need OUTSCALE \n" "credentials and the appropriate quotas to create an account via API. To get \n" "quotas, you can send an email to sales@outscale.com.\n* If you want to pass a \n" "numeral value as a string instead of an integer, you must wrap your string in \n" "additional quotes (for example, `'"92000"'`).\n\nFor more \n" "information, see [About Your \n" "Account](https://docs.outscale.com/en/userguide/About-Your-Account.html).\n" "\nRequired Argument: City CompanyName Country CustomerId Email FirstName LastName ZipCode \n" , - "Usage: oapi-cli UpdateUserGroup --UserGroupName=usergroupname [OPTIONS]\n" "Modifies the name and/or the path of a specified group.\n" "\nRequired Argument: UserGroupName \n" + "Usage: oapi-cli CreateApiAccessRule [OPTIONS]\n" "Creates a rule to allow access to the API from your account.\nYou need to \n" "specify at least the `CaIds` or the `IpRanges` parameter.\n\n**[NOTE]**\nBy \n" "default, your account has a set of rules allowing global access, that you can \n" "delete.\nFor more information, see [About API Access \n" "Rules](https://docs.outscale.com/en/userguide/About-API-Access-Rules.html).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli UpdateUser --UserName=username [OPTIONS]\n" "Modifies the name and/or the path of a specified EIM user.\n" "\nRequired Argument: UserName \n" + "Usage: oapi-cli CreateCa --CaPem=capem [OPTIONS]\n" "Creates a Client Certificate Authority (CA).\nFor more information, see [About \n" "API Access \n" "Rules](https://docs.outscale.com/en/userguide/About-API-Access-Rules.html).\n" "\nRequired Argument: CaPem \n" , - "Usage: oapi-cli UpdateSubnet --SubnetId=subnetid --MapPublicIpOnLaunch=mappubliciponlaunch [OPTIONS]\n" "Modifies the specified attribute of a Subnet.\n" "\nRequired Argument: SubnetId, MapPublicIpOnLaunch \n" + "Usage: oapi-cli CreateClientGateway --BgpAsn=bgpasn --PublicIp=publicip --ConnectionType=connectiontype [OPTIONS]\n" "Provides information about your client gateway.\nThis action registers \n" "information to identify the client gateway that you deployed in your \n" "network.\nTo open a tunnel to the client gateway, you must provide the \n" "communication protocol type, the fixed public IP of the gateway, and an \n" "Autonomous System Number (ASN).\nFor more information, see [About Client \n" "Gateways](https://docs.outscale.com/en/userguide/About-Client-Gateways.html).\n" "\nRequired Argument: BgpAsn PublicIp ConnectionType \n" , - "Usage: oapi-cli UpdateSnapshot --SnapshotId=snapshotid --PermissionsToCreateVolume=permissionstocreatevolume [OPTIONS]\n" "Modifies the permissions for a specified snapshot.\nYou must specify either the \n" "`Additions` or the `Removals` parameter.\nAfter sharing a snapshot with an \n" "account, the other account can create a copy of it that they own. For more \n" "information about copying snapshots, see [CreateSnapshot](#createsnapshot).\n" "\nRequired Argument: SnapshotId, PermissionsToCreateVolume \n" + "Usage: oapi-cli CreateDedicatedGroup --CpuGeneration=cpugeneration --Name=name --SubregionName=subregionname [OPTIONS]\n" "> [WARNING]\n> This feature is currently in beta.\n\nCreates a dedicated group \n" "for virtual machines (VMs).\nFor more information, see [About Dedicated \n" "Groups](https://docs.outscale.com/en/userguide/About-Dedicated-Groups.html).\n" "\nRequired Argument: CpuGeneration Name SubregionName \n" , - "Usage: oapi-cli UpdateServerCertificate --Name=name [OPTIONS]\n" "Modifies the name and/or the path of a specified server certificate.\n" "\nRequired Argument: Name \n" + "Usage: oapi-cli CreateDhcpOptions [OPTIONS]\n" "Creates a set of DHCP options, that you can then associate with a Net using the \n" "[UpdateNet](#updatenet) method.\nFor more information, see [About DHCP \n" "Options](https://docs.outscale.com/en/userguide/About-DHCP-Options.html).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli UpdateRouteTableLink --RouteTableId=routetableid --LinkRouteTableId=linkroutetableid [OPTIONS]\n" "Replaces the route table associated with a specific Subnet in a Net with \n" "another one.\nAfter the route table is replaced, the Subnet uses the routes in \n" "the new route table it is associated with.\n" "\nRequired Argument: RouteTableId, LinkRouteTableId \n" + "Usage: oapi-cli CreateDirectLinkInterface --DirectLinkId=directlinkid --DirectLinkInterface=directlinkinterface [OPTIONS]\n" "Creates a DirectLink interface.\nDirectLink interfaces enable you to reach one \n" "of your Nets through a virtual gateway.\nFor more information, see [About \n" "DirectLink](https://docs.outscale.com/en/userguide/About-DirectLink.html).\n" "\nRequired Argument: DirectLinkId DirectLinkInterface \n" , - "Usage: oapi-cli UpdateRoutePropagation --Enable=enable --RouteTableId=routetableid --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Configures the propagation of routes to a specified route table of a Net by a \n" "virtual gateway.\n" "\nRequired Argument: Enable, RouteTableId, VirtualGatewayId \n" + "Usage: oapi-cli CreateDirectLink --Bandwidth=bandwidth --DirectLinkName=directlinkname --Location=location [OPTIONS]\n" "Creates a DirectLink between a customer network and a specified DirectLink \n" "location.\nFor more information, see [About \n" "DirectLink](https://docs.outscale.com/en/userguide/About-DirectLink.html).\n" "\nRequired Argument: Bandwidth DirectLinkName Location \n" , - "Usage: oapi-cli UpdateRoute --RouteTableId=routetableid --DestinationIpRange=destinationiprange [OPTIONS]\n" "Replaces an existing route within a route table in a Net.\nYou must specify one \n" "of the following elements as the target:\n\n* Net peering\n* NAT virtual \n" "machine (VM)\n* Internet service\n* Virtual gateway\n* NAT service\n* Network \n" "interface card (NIC)\n\nThe routing algorithm is based on the most specific \n" "match.\n" "\nRequired Argument: RouteTableId, DestinationIpRange \n" + "Usage: oapi-cli CreateFlexibleGpu --ModelName=modelname --SubregionName=subregionname [OPTIONS]\n" "Allocates a flexible GPU (fGPU) to your account.\nYou can then attach this fGPU \n" "to a virtual machine (VM).\nFor more information, see [About Flexible \n" "GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html).\n" "\nRequired Argument: ModelName SubregionName \n" , - "Usage: oapi-cli UpdateNic --NicId=nicid [OPTIONS]\n" "Modifies the specified network interface card (NIC). You can specify only one \n" "attribute at a time.\n" "\nRequired Argument: NicId \n" + "Usage: oapi-cli CreateImageExportTask --OsuExport=osuexport --ImageId=imageid [OPTIONS]\n" "Exports an OUTSCALE machine image (OMI) to an OUTSCALE Object Storage (OOS) \n" "bucket.\nThis enables you to copy an OMI between accounts in different \n" "Regions.\nThis action creates the necessary snapshots and manifest file in the \n" "bucket. The OMI can then be imported to another account using a pre-signed URL \n" "of its manifest file. For more information, see [Creating a Pre-Signed \n" "URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\nTo\n" " copy an OMI in the same Region, you can also use the \n" "[CreateImage](#createimage) method.\n\n**[IMPORTANT]**\nYou cannot export a \n" "shared or public OMI, as they do not belong to you. To do so, you must first \n" "copy it to your account. The copy then belongs to you and you can export \n" "it.\nFor more information, see [About \n" "OMIs](https://docs.outscale.com/en/userguide/About-OMIs.html).\n" "\nRequired Argument: OsuExport ImageId \n" , - "Usage: oapi-cli UpdateNetAccessPoint --NetAccessPointId=netaccesspointid [OPTIONS]\n" "Modifies the attributes of a Net access point.\nThis action enables you to add \n" "or remove route tables associated with the specified Net access point.\n" "\nRequired Argument: NetAccessPointId \n" + "Usage: oapi-cli CreateImage [OPTIONS]\n" "Creates an OUTSCALE machine image (OMI).\nYou can use this method in different \n" "ways:\n* **Creating from a VM**: You create an OMI from one of your virtual \n" "machines (VMs).
\n* **Copying an OMI**: You copy an existing OMI. The source \n" "OMI can be one of your own OMIs, or an OMI owned by another account that has \n" "granted you permission via the [UpdateImage](#updateimage) method.
\n* \n" "**Registering from a snapshot**: You register an OMI from an existing snapshot. \n" "The source snapshot can be one of your own snapshots, or a snapshot owned by \n" "another account that has granted you permission via the \n" "[UpdateSnapshot](#updatesnapshot) method.
\n* **Registering from a bucket by \n" "using a manifest file**: You register an OMI from the manifest file of an OMI \n" "that was exported to an OUTSCALE Object Storage (OOS) bucket. First, the owner \n" "of the source OMI must export it to the bucket by using the \n" "[CreateImageExportTask](#createimageexporttask) method. Then, they must grant \n" "you permission to read the manifest file via a pre-signed URL. For more \n" "information, see [Creating a Pre-Signed \n" "URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\n\n\n" "**[TIP]**\nRegistering from a bucket enables you to copy an OMI across \n" "Regions.\n\nFor more information, see [About \n" "OMIs](https://docs.outscale.com/en/userguide/About-OMIs.html).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli UpdateNet --DhcpOptionsSetId=dhcpoptionssetid --NetId=netid [OPTIONS]\n" "Associates a DHCP options set with a specified Net.\n" "\nRequired Argument: DhcpOptionsSetId, NetId \n" + "Usage: oapi-cli CreateInternetService [OPTIONS]\n" "Creates an Internet service you can use with a Net.\nAn Internet service \n" "enables virtual machines (VMs) launched in a Net to connect to the Internet. It \n" "allows routing of incoming and outgoing Internet traffic and management of \n" "public IP addresses.\nFor more information, see [About Internet \n" "Services](https://docs.outscale.com/en/userguide/About-Internet-Services.html).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli UpdateLoadBalancer --LoadBalancerName=loadbalancername [OPTIONS]\n" "Modifies the specified attribute of a load balancer. You can specify only one \n" "attribute at a time.\n\nYou can set a new SSL certificate to an SSL or HTTPS \n" "listener of a load balancer.\nThis certificate replaces any certificate used on \n" "the same load balancer and port.\n\nYou can also replace the currently enabled \n" "policy for the load balancer with another one.\nIf the `PolicyNames` parameter \n" "is empty, the currently enabled policy is disabled.\n" "\nRequired Argument: LoadBalancerName \n" + "Usage: oapi-cli CreateKeypair --KeypairName=keypairname [OPTIONS]\n" "Creates a keypair to use with your virtual machines (VMs).\nYou can use this \n" "method in two different ways:\n* **Creating a keypair**: In that case, 3DS \n" "OUTSCALE creates a 2048-bit RSA keypair, stores its public key in your account, \n" "and returns its private key in the response of the call so that you can save it \n" "in a file.\nWhen you save the returned private key, make sure you replace the \n" "`\\n` escape sequences with real line breaks.\n* **Importing a keypair created \n" "locally**: If you already have a keypair that you have created locally with a \n" "third-party tool, you can import its public key in your account. The following \n" "types of key can be imported: RSA (2048 bits or preferably 4096 bits), Ed25519, \n" "and ECDSA (256 bits, 384 bits, or 521 bits). The following formats can be used: \n" "PEM, PKCS8, RFC4716, and OpenSSH.\n\nFor more information, see [About \n" "Keypairs](https://docs.outscale.com/en/userguide/About-Keypairs.html).\n" "\nRequired Argument: KeypairName \n" , - "Usage: oapi-cli UpdateListenerRule --ListenerRuleName=listenerrulename [OPTIONS]\n" "Updates the pattern of the listener rule.\nThis call updates the pattern \n" "matching algorithm for incoming traffic.\n" "\nRequired Argument: ListenerRuleName \n" + "Usage: oapi-cli CreateListenerRule --VmIds=vmids --Listener=listener --ListenerRule=listenerrule [OPTIONS]\n" "Creates a rule for traffic redirection for the specified listener. Each rule \n" "must have either the `HostNamePattern` or `PathPattern` parameter specified. \n" "Rules are treated in priority order, from the highest value to the lowest \n" "value.\nOnce the rule is created, you need to register backend VMs with it. For \n" "more information, see the \n" "[RegisterVmsInLoadBalancer](#registervmsinloadbalancer) method.\nFor more \n" "information, see [About Load \n" "Balancers](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).\n" "\nRequired Argument: VmIds Listener ListenerRule \n" , - "Usage: oapi-cli UpdateImage --ImageId=imageid [OPTIONS]\n" "Modifies the access permissions for an OUTSCALE machine image (OMI).\nYou must \n" "specify either the `Additions` or the `Removals` parameter.\nAfter sharing an \n" "OMI with an account, the other account can create a copy of it that they own. \n" "For more information about copying OMIs, see [CreateImage](#createimage).\n" "\nRequired Argument: ImageId \n" + "Usage: oapi-cli CreateLoadBalancerListeners --Listeners=listeners --LoadBalancerName=loadbalancername [OPTIONS]\n" "Creates one or more listeners for a specified load balancer.\nFor more \n" "information, see [About Load \n" "Balancers](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).\n" "\nRequired Argument: Listeners LoadBalancerName \n" , - "Usage: oapi-cli UpdateFlexibleGpu --FlexibleGpuId=flexiblegpuid [OPTIONS]\n" "Modifies a flexible GPU (fGPU) behavior.\n" "\nRequired Argument: FlexibleGpuId \n" + "Usage: oapi-cli CreateLoadBalancerPolicy --PolicyType=policytype --LoadBalancerName=loadbalancername --PolicyName=policyname [OPTIONS]\n" "Creates a stickiness policy with sticky session lifetimes defined by the \n" "browser lifetime.\nThe created policy can be used with HTTP or HTTPS listeners \n" "only.\nIf this policy is implemented by a load balancer, this load balancer \n" "uses this cookie in all incoming requests to direct them to the specified \n" "backend server virtual machine (VM). If this cookie is not present, the load \n" "balancer sends the request to any other server according to its load-balancing \n" "algorithm.\n\nYou can also create a stickiness policy with sticky session \n" "lifetimes following the lifetime of an application-generated cookie.\nUnlike \n" "the other type of stickiness policy, the lifetime of the special Load Balancer \n" "Unit (LBU) cookie follows the lifetime of the application-generated cookie \n" "specified in the policy configuration. The load balancer inserts a new \n" "stickiness cookie only when the application response includes a new application \n" "cookie.\nThe session stops being sticky if the application cookie is removed or \n" "expires, until a new application cookie is issued.\nFor more information, see \n" "[About Load \n" "Balancers](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).\n" "\nRequired Argument: PolicyType LoadBalancerName PolicyName \n" , - "Usage: oapi-cli UpdateDirectLinkInterface --DirectLinkInterfaceId=directlinkinterfaceid --Mtu=mtu [OPTIONS]\n" "Modifies the maximum transmission unit (MTU) of a DirectLink interface.\n" "\nRequired Argument: DirectLinkInterfaceId, Mtu \n" + "Usage: oapi-cli CreateLoadBalancer --Listeners=listeners --LoadBalancerName=loadbalancername [OPTIONS]\n" "Creates a load balancer.\nThe load balancer is created with a unique Domain \n" "Name Service (DNS) name. It receives the incoming traffic and routes it to its \n" "registered virtual machines (VMs).\nBy default, this action creates an \n" "Internet-facing load balancer, resolving to public IPs. To create an internal \n" "load balancer in a Net, resolving to private IPs, use the `LoadBalancerType` \n" "parameter.\nYou must specify either the `Subnets` or the `SubregionNames` \n" "parameters.\nFor more information, see [About Load \n" "Balancers](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).\n" "\nRequired Argument: Listeners LoadBalancerName \n" , - "Usage: oapi-cli UpdateDedicatedGroup --DedicatedGroupId=dedicatedgroupid --Name=name [OPTIONS]\n" "> [WARNING]\n> This feature is currently in beta.\n\nModifies the name of a \n" "specified dedicated group.\n" "\nRequired Argument: DedicatedGroupId, Name \n" + "Usage: oapi-cli CreateLoadBalancerTags --LoadBalancerNames=loadbalancernames --Tags=tags [OPTIONS]\n" "Adds one or more tags to the specified load balancers.\nIf a tag with the same \n" "key already exists for the load balancer, the tag value is replaced.\nFor more \n" "information, see [About \n" "Tags](https://docs.outscale.com/en/userguide/About-Tags.html).\n" "\nRequired Argument: LoadBalancerNames Tags \n" , - "Usage: oapi-cli UpdateCa --CaId=caid [OPTIONS]\n" "Modifies the specified attribute of a Client Certificate Authority (CA).\n" "\nRequired Argument: CaId \n" + "Usage: oapi-cli CreateNatService --PublicIpId=publicipid --SubnetId=subnetid [OPTIONS]\n" "Creates a network address translation (NAT) service in the specified public \n" "Subnet of a Net.\nA NAT service enables virtual machines (VMs) placed in the \n" "private Subnet of this Net to connect to the Internet, without being accessible \n" "from the Internet.\nWhen creating a NAT service, you specify the allocation ID \n" "of the public IP you want to use as public IP for the NAT service. Once the NAT \n" "service is created, you need to create a route in the route table of the \n" "private Subnet, with 0.0.0.0/0 as destination and the ID of the NAT service as \n" "target. For more information, see [LinkPublicIP](#linkpublicip) and \n" "[CreateRoute](#createroute).\nThis action also enables you to create multiple \n" "NAT services in the same Net (one per public Subnet).\n\n**[IMPORTANT]**\nYou \n" "cannot modify the public IP associated with a NAT service after its creation. \n" "To do so, you need to delete the NAT service and create a new one with another \n" "public IP.\nFor more information, see [About NAT \n" "Services](https://docs.outscale.com/en/userguide/About-NAT-Services.html).\n" "\nRequired Argument: PublicIpId SubnetId \n" , - "Usage: oapi-cli UpdateApiAccessRule --ApiAccessRuleId=apiaccessruleid [OPTIONS]\n" "Modifies a specified API access rule.\n\n**[WARNING]** \n- The new rule you \n" "specify fully replaces the old rule. Therefore, for a parameter that is not \n" "specified, any previously set value is deleted.\n- If, as result of your \n" "modification, you no longer have access to the APIs, you will need to contact \n" "the Support team to regain access. For more information, see [Technical \n" "Support](https://docs.outscale.com/en/userguide/Technical-Support.html).\n" "\nRequired Argument: ApiAccessRuleId \n" + "Usage: oapi-cli CreateNetAccessPoint --ServiceName=servicename --NetId=netid [OPTIONS]\n" "Creates a Net access point to access an OUTSCALE service from this Net without \n" "using the Internet and public IPs.\nYou specify the service using its name. For \n" "more information about the available services, see \n" "[ReadNetAccessPointServices](#readnetaccesspointservices). \nTo control the \n" "routing of traffic between the Net and the specified service, you can specify \n" "one or more route tables. Virtual machines placed in Subnets associated with \n" "the specified route table thus use the Net access point to access the service. \n" "When you specify a route table, a route is automatically added to it with the \n" "destination set to the prefix list ID of the service, and the target set to the \n" "ID of the access point.\nWhen a Net access point is created, a public IP is \n" "automatically allocated to your account and used for the Net access point. This \n" "public IP is not connected to the Internet. It is counted in your quota, but it \n" "is not billed. \nFor more information, see [About Net Access \n" "Points](https://docs.outscale.com/en/userguide/About-Net-Access-Points.html).\n" "\nRequired Argument: ServiceName NetId \n" , - "Usage: oapi-cli UpdateApiAccessPolicy --MaxAccessKeyExpirationSeconds=maxaccesskeyexpirationseconds --RequireTrustedEnv=requiretrustedenv [OPTIONS]\n" "Updates the API access policy of your account.\n\n**[IMPORTANT]**\nOnly one API \n" "access policy can be associated with your account.\n" "\nRequired Argument: MaxAccessKeyExpirationSeconds, RequireTrustedEnv \n" + "Usage: oapi-cli CreateNetPeering --AccepterNetId=accepternetid --SourceNetId=sourcenetid [OPTIONS]\n" "Requests a Net peering between a Net you own and a peer Net that belongs to you \n" "or another account.\nThis action creates a Net peering that remains in the \n" "`pending-acceptance` state until it is accepted by the owner of the peer Net. \n" "If the owner of the peer Net does not accept the request within 7 days, the \n" "state of the Net peering becomes `expired`. For more information, see \n" "[AcceptNetPeering](#acceptnetpeering).\n\n**[IMPORTANT]**\n* Peered Nets must \n" "contain at least one virtual machine (VM) each before the creation of the Net \n" "peering.\n* The two Nets must not have overlapping IP ranges. Otherwise, the \n" "Net peering is in the `failed` state.\n* A peering connection between two Nets \n" "works both ways. If an A-to-B connection is already created and accepted, \n" "creating a B-to-A connection is not necessary and would be automatically \n" "rejected.\n\nFor more information, see [About Net \n" "Peerings](https://docs.outscale.com/en/userguide/About-Net-Peerings.html).\n" "\nRequired Argument: AccepterNetId SourceNetId \n" , - "Usage: oapi-cli UpdateAccount [OPTIONS]\n" "Updates the account information for the account that sends the request.\n" "\nRequired Argument: \n" + "Usage: oapi-cli CreateNet --IpRange=iprange [OPTIONS]\n" "Creates a Net with a specified IP range.\nThe IP range (network range) of your \n" "Net must be between a /28 netmask (16 IPs) and a /16 netmask (65536 IPs).\nFor \n" "more information, see [About \n" "Nets](https://docs.outscale.com/en/userguide/About-Nets.html).\n" "\nRequired Argument: IpRange \n" , - "Usage: oapi-cli UpdateAccessKey --AccessKeyId=accesskeyid --State=state [OPTIONS]\n" "Modifies the attributes of the specified access key of either your root account \n" "or an EIM user.\n" "\nRequired Argument: AccessKeyId, State \n" + "Usage: oapi-cli CreateNic --SubnetId=subnetid [OPTIONS]\n" "Creates a network interface card (NIC) in the specified Subnet.\nFor more \n" "information, see [About \n" "NICs](https://docs.outscale.com/en/userguide/About-NICs.html).\n" "\nRequired Argument: SubnetId \n" , - "Usage: oapi-cli UnlinkVolume --VolumeId=volumeid [OPTIONS]\n" "Detaches a Block Storage Unit (BSU) volume from a virtual machine (VM).\nTo \n" "detach the root device of a VM, this VM must be stopped.\n" "\nRequired Argument: VolumeId \n" + "Usage: oapi-cli CreatePolicy --Document=document --PolicyName=policyname [OPTIONS]\n" "Creates a managed policy to apply to a user.\nThis action creates a policy \n" "version and sets v1 as the default one.\n" "\nRequired Argument: Document PolicyName \n" , - "Usage: oapi-cli UnlinkVirtualGateway --NetId=netid --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Detaches a virtual gateway from a Net.\nYou must wait until the virtual gateway \n" "is in the detached state before you can attach another Net to it or delete the \n" "Net it was previously attached to.\n" "\nRequired Argument: NetId, VirtualGatewayId \n" + "Usage: oapi-cli CreatePolicyVersion --Document=document --PolicyOrn=policyorn [OPTIONS]\n" "Creates a version of a specified managed policy.\nA managed policy can have up \n" "to five versions.\n" "\nRequired Argument: Document PolicyOrn \n" , - "Usage: oapi-cli UnlinkRouteTable --LinkRouteTableId=linkroutetableid [OPTIONS]\n" "Disassociates a Subnet from a route table.\nAfter disassociation, the Subnet \n" "can no longer use the routes in this route table, but uses the routes in the \n" "main route table of the Net instead.\n" "\nRequired Argument: LinkRouteTableId \n" + "Usage: oapi-cli CreateProductType --Description=description [OPTIONS]\n" "Creates a product type you can associate with an OMI for consumption monitoring \n" "and billing purposes.\n" "\nRequired Argument: Description \n" , - "Usage: oapi-cli UnlinkPublicIp [OPTIONS]\n" "Disassociates a public IP from the virtual machine (VM) or network interface \n" "card (NIC) it is associated with.\n\n**[IMPORTANT]**\nTo disassociate the \n" "public IP from a NAT service, you need to delete the NAT service. For more \n" "information, see the [DeleteNatService](#deletenatservice) method.\n" "\nRequired Argument: \n" + "Usage: oapi-cli CreatePublicIp [OPTIONS]\n" "Acquires a public IP for your account.\nA public IP is a static IP designed for \n" "dynamic Cloud computing. It can be associated with a virtual machine (VM) in \n" "the public Cloud or in a Net, a network interface card (NIC), a NAT \n" "service.\nFor more information, see [About Public \n" "IPs](https://docs.outscale.com/en/userguide/About-Public-IPs.html).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli UnlinkPrivateIps --NicId=nicid --PrivateIps=privateips [OPTIONS]\n" "Unassigns one or more secondary private IPs from a network interface card (NIC).\n" "\nRequired Argument: NicId, PrivateIps \n" + "Usage: oapi-cli CreateRoute --DestinationIpRange=destinationiprange --RouteTableId=routetableid [OPTIONS]\n" "Creates a route in a specified route table within a specified Net.\nYou must \n" "specify one of the following elements as the target:\n\n* Net peering\n* NAT \n" "VM\n* Internet service\n* Virtual gateway\n* NAT service\n* Network interface \n" "card (NIC)\n\nThe routing algorithm is based on the most specific match.\nFor \n" "more information, see [About Route \n" "Tables](https://docs.outscale.com/en/userguide/About-Route-Tables.html).\n" "\nRequired Argument: DestinationIpRange RouteTableId \n" , - "Usage: oapi-cli UnlinkPolicy --PolicyOrn=policyorn --UserName=username [OPTIONS]\n" "Removes a managed policy from a specific user.\n" "\nRequired Argument: PolicyOrn, UserName \n" + "Usage: oapi-cli CreateRouteTable --NetId=netid [OPTIONS]\n" "Creates a route table for a specified Net.\nYou can then add routes and \n" "associate this route table with a Subnet.\nFor more information, see [About \n" "Route Tables](https://docs.outscale.com/en/userguide/About-Route-Tables.html).\n" "\nRequired Argument: NetId \n" , - "Usage: oapi-cli UnlinkNic --LinkNicId=linknicid [OPTIONS]\n" "Detaches a network interface card (NIC) from a virtual machine (VM).\nThe \n" "primary NIC cannot be detached.\n" "\nRequired Argument: LinkNicId \n" + "Usage: oapi-cli CreateSecurityGroup --Description=description --SecurityGroupName=securitygroupname [OPTIONS]\n" "Creates a security group.\nThis action creates a security group either in the \n" "public Cloud or in a specified Net. By default, a default security group for \n" "use in the public Cloud and a default security group for use in a Net are \n" "created.\nWhen launching a virtual machine (VM), if no security group is \n" "explicitly specified, the appropriate default security group is assigned to the \n" "VM. Default security groups include a default rule granting VMs network access \n" "to each other.\nWhen creating a security group, you specify a name. Two \n" "security groups for use in the public Cloud or for use in a Net cannot have the \n" "same name.\nYou can have up to 500 security groups in the public Cloud. You can \n" "create up to 500 security groups per Net.\nTo add or remove rules, use the \n" "[CreateSecurityGroupRule](#createsecuritygrouprule) method.\nFor more \n" "information, see [About Security \n" "Groups](https://docs.outscale.com/en/userguide/About-Security-Groups.html).\n" "\nRequired Argument: Description SecurityGroupName \n" , - "Usage: oapi-cli UnlinkManagedPolicyFromUserGroup --PolicyOrn=policyorn --UserGroupName=usergroupname [OPTIONS]\n" "Unlinks a managed policy from a specific group.\n" "\nRequired Argument: PolicyOrn, UserGroupName \n" + "Usage: oapi-cli CreateSecurityGroupRule --SecurityGroupId=securitygroupid --Flow=flow [OPTIONS]\n" "Adds one or more rules to a security group.\nUse the `SecurityGroupId` \n" "parameter to specify the security group for which you want to create a \n" "rule.\nUse the `Flow` parameter to specify if you want an inbound rule or an \n" "outbound rule.\nAn inbound rule allows the security group to receive \n" "traffic:\n* Either from a specific IP range (`IpRange` parameter) on a specific \n" "port range (`FromPortRange` and `ToPortRange` parameters) and specific protocol \n" "(`IpProtocol` parameter).\n* Or from another specific security group \n" "(`SecurityGroupAccountIdToLink` and `SecurityGroupNameToLink` \n" "parameters).\n\n(Net only) An outbound rule works similarly but allows the \n" "security group to send traffic rather than receive traffic.\n\nAlternatively, \n" "you can use the `Rules` parameter to add several rules at the same \n" "time.\n\n**[NOTE]**\n* The modifications are effective as quickly as possible, \n" "but a small delay may occur.\n* By default, traffic between two security groups \n" "is allowed through both public and private IPs. To restrict traffic to private \n" "IPs only, contact our Support team at support@outscale.com.\n\nFor more \n" "information, see [About Security Group \n" "Rules](https://docs.outscale.com/en/userguide/About-Security-Group-Rules.html).\n" "\nRequired Argument: SecurityGroupId Flow \n" , - "Usage: oapi-cli UnlinkLoadBalancerBackendMachines --LoadBalancerName=loadbalancername [OPTIONS]\n" "Detaches one or more backend virtual machines (VMs) from a load balancer. You \n" "need to specify at least the `BackendIps` or the `BackendVmIds` parameter.\n" "\nRequired Argument: LoadBalancerName \n" + "Usage: oapi-cli CreateServerCertificate --Body=body --PrivateKey=privatekey --Name=name [OPTIONS]\n" "Creates a server certificate and its matching private key.\nThese elements can \n" "be used with other services (for example, to configure SSL termination on load \n" "balancers).\nYou can also specify the chain of intermediate certification \n" "authorities if your certificate is not directly signed by a root one. You can \n" "specify multiple intermediate certification authorities in the \n" "`CertificateChain` parameter. To do so, concatenate all certificates in the \n" "correct order (the first certificate must be the authority of your certificate, \n" "the second must be the authority of the first one, and so on).\nThe private key \n" "must be a RSA key in PKCS1 form. To check this, open the PEM file and ensure \n" "its header reads as follows: BEGIN RSA PRIVATE KEY.\n[IMPORTANT]\nThis private \n" "key must not be protected by a password or a passphrase.\nFor more information, \n" "see [About Server Certificates in \n" "EIM](https://docs.outscale.com/en/userguide/About-Server-Certificates-in-EIM.htm\n" "l).\n" "\nRequired Argument: Body PrivateKey Name \n" , - "Usage: oapi-cli UnlinkInternetService --InternetServiceId=internetserviceid --NetId=netid [OPTIONS]\n" "Detaches an Internet service from a Net.\nThis action disables and detaches an \n" "Internet service from a Net. The Net must not contain virtual machines (VMs) \n" "using public IPs nor internet-facing load balancers.\n" "\nRequired Argument: InternetServiceId, NetId \n" + "Usage: oapi-cli CreateSnapshotExportTask --OsuExport=osuexport --SnapshotId=snapshotid [OPTIONS]\n" "Exports a snapshot to an OUTSCALE Object Storage (OOS) bucket that belongs to \n" "you. This action enables you to create a backup of your snapshot.\nYou can \n" "share this snapshot with others accounts by granting permission to read it via \n" "pre-signed URLs. For more information, see [Creating a Pre-Signed \n" "URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\nFo\n" "r more information, see [About \n" "Snapshots](https://docs.outscale.com/en/userguide/About-Snapshots.html).\n" "\nRequired Argument: OsuExport SnapshotId \n" , - "Usage: oapi-cli UnlinkFlexibleGpu --FlexibleGpuId=flexiblegpuid [OPTIONS]\n" "Detaches a flexible GPU (fGPU) from a virtual machine (VM).\nThe fGPU is in the \n" "`detaching` state until the VM is stopped, after which it becomes `allocated`. \n" "It is then available again for attachment to a VM.\n" "\nRequired Argument: FlexibleGpuId \n" + "Usage: oapi-cli CreateSnapshot [OPTIONS]\n" "Creates a snapshot. Snapshots are point-in-time images of a volume that you can \n" "use to back up your data or to create replicas of this volume.\nYou can use \n" "this method in three different ways:\n* **Creating from a volume**: You create \n" "a snapshot from one of your volumes.\n* **Copying a snapshot**: You copy an \n" "existing snapshot. The source snapshot can be one of your own snapshots, or a \n" "snapshot owned by another account that has granted you permission via the \n" "[UpdateSnapshot](#updatesnapshot) method.\n* **Importing from a bucket**: You \n" "import a snapshot located in an OUTSCALE Object Storage (OOS) bucket. First, \n" "the owner of the source snapshot must export it to a bucket by using the \n" "[CreateSnapshotExportTask](#createsnapshotexporttask) method. Then, they must \n" "grant you permission to read the snapshot via a pre-signed URL. For more \n" "information, see [Creating a Pre-Signed \n" "URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\n\n\n" "**[NOTE]**\nIn case of excessive use of the snapshot creation feature on the \n" "same volume over a short period of time, 3DS OUTSCALE reserves the right to \n" "temporarily block the feature.\n\nFor more information, see [About \n" "Snapshots](https://docs.outscale.com/en/userguide/About-Snapshots.html).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli StopVms --VmIds=vmids [OPTIONS]\n" "Stops one or more running virtual machines (VMs).\nYou can stop only VMs that \n" "are valid and that belong to you. Data stored in the VM RAM is lost.\n" "\nRequired Argument: VmIds \n" + "Usage: oapi-cli CreateSubnet --IpRange=iprange --NetId=netid [OPTIONS]\n" "Creates a Subnet in an existing Net.\nTo create a Subnet in a Net, you have to \n" "provide the ID of the Net and the IP range for the Subnet (its network range). \n" "Once the Subnet is created, you cannot modify its IP range.\nFor more \n" "information, see [About \n" "Nets](https://docs.outscale.com/en/userguide/About-Nets.html).\n" "\nRequired Argument: IpRange NetId \n" , - "Usage: oapi-cli StartVms --VmIds=vmids [OPTIONS]\n" "Start one or more virtual machines (VMs).\nYou can start only VMs that are \n" "valid and that belong to you.\n" "\nRequired Argument: VmIds \n" + "Usage: oapi-cli CreateTags --ResourceIds=resourceids --Tags=tags [OPTIONS]\n" "Adds one or more tags to the specified resources.\nIf a tag with the same key \n" "already exists for the resource, the tag value is replaced.\nYou can tag the \n" "following resources using their IDs:\n\n* Virtual machines (VMs) \n" "(i-xxxxxxxx)\n* OMIs (ami-xxxxxxxx)\n* Volumes (vol-xxxxxxxx)\n* Snapshots \n" "(snap-xxxxxxxx)\n* Public IPs (eipalloc-xxxxxxxx)\n* Security groups \n" "(sg-xxxxxxxx)\n* Route tables (rtb-xxxxxxxx)\n* Network interface cards (NIC) \n" "(eni-xxxxxxxx)\n* Nets (vpc-xxxxxxxx)\n* Subnets (subnet-xxxxxxxx)\n* Net \n" "peerings (vpcx-xxxxxxxx)\n* Net endpoints (vpce-xxxxxxxx)\n* NAT services \n" "(nat-xxxxxxxx)\n* Internet services (igw-xxxxxxxx)\n* Client gateways \n" "(cgw-xxxxxxxx)\n* Virtual gateways (vgw-xxxxxxxx)\n* VPN connections \n" "(vpn-xxxxxxxx)\n* DHCP options (dopt-xxxxxxxx)\n* OMI export tasks \n" "(image-export-xxxxxxxx)\n* Snapshot export tasks (snap-export-xxxxxxxx)\n\nFor \n" "more information, see [About \n" "Tags](https://docs.outscale.com/en/userguide/About-Tags.html).\n" "\nRequired Argument: ResourceIds Tags \n" +, + "Usage: oapi-cli CreateUserGroup --UserGroupName=usergroupname [OPTIONS]\n" "Creates a group to which you can add users.\nYou can also add an inline policy \n" "or link a managed policy to the group, which is applied to all its users.\n" "\nRequired Argument: UserGroupName \n" , - "Usage: oapi-cli SetDefaultPolicyVersion --PolicyOrn=policyorn --VersionId=versionid [OPTIONS]\n" "Sets a specified version of a managed policy as the default (operative) \n" "one.\nYou can modify the default version of a policy at any time.\n" "\nRequired Argument: PolicyOrn, VersionId \n" + "Usage: oapi-cli CreateUser --UserName=username [OPTIONS]\n" "Creates an EIM user for your account.\nFor more information, see [About EIM \n" "Users](https://docs.outscale.com/en/userguide/About-EIM-Users.html).\n" "\nRequired Argument: UserName \n" , - "Usage: oapi-cli ScaleUpVmGroup --VmGroupId=vmgroupid --VmAddition=vmaddition [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nCreates additional virtual machines (VMs) in a VM group.\nThe new \n" "VMs use the current version of the VM template.\n" "\nRequired Argument: VmGroupId, VmAddition \n" + "Usage: oapi-cli CreateVirtualGateway --ConnectionType=connectiontype [OPTIONS]\n" "Creates a virtual gateway.\nA virtual gateway is the access point on the Net \n" "side of a VPN connection.\nFor more information, see [About Virtual \n" "Gateways](https://docs.outscale.com/en/userguide/About-Virtual-Gateways.html).\n" "\nRequired Argument: ConnectionType \n" , - "Usage: oapi-cli ScaleDownVmGroup --VmGroupId=vmgroupid --VmSubtraction=vmsubtraction [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nDeletes virtual machines (VMs) from a VM group.\nThe oldest VMs \n" "are the first to be deleted.\n" "\nRequired Argument: VmGroupId, VmSubtraction \n" + "Usage: oapi-cli CreateVmGroup --SecurityGroupIds=securitygroupids --SubnetId=subnetid --VmGroupName=vmgroupname --VmTemplateId=vmtemplateid --VmCount=vmcount [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nCreates a group of virtual machines (VMs) containing the same \n" "characteristics as a specified VM template, and then launches them.\nYou can \n" "create up to 100 VM groups in your account.\n" "\nRequired Argument: SecurityGroupIds SubnetId VmGroupName VmTemplateId VmCount \n" , - "Usage: oapi-cli RemoveUserFromUserGroup --UserGroupName=usergroupname --UserName=username [OPTIONS]\n" "Removes a specified user from a specified group.\n" "\nRequired Argument: UserGroupName, UserName \n" + "Usage: oapi-cli CreateVmTemplate --CpuCores=cpucores --CpuGeneration=cpugeneration --ImageId=imageid --Ram=ram --VmTemplateName=vmtemplatename [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nCreates a virtual machine (VM) template. You can then use the VM \n" "template to create VM groups.\nYou can create up to 50 VM templates in your \n" "account.\n" "\nRequired Argument: CpuCores CpuGeneration ImageId Ram VmTemplateName \n" , - "Usage: oapi-cli RejectNetPeering --NetPeeringId=netpeeringid [OPTIONS]\n" "Rejects a Net peering request.\nThe Net peering must be in the \n" "`pending-acceptance` state to be rejected. The rejected Net peering is then in \n" "the `rejected` state.\n" "\nRequired Argument: NetPeeringId \n" + "Usage: oapi-cli CreateVms --ImageId=imageid [OPTIONS]\n" "Creates virtual machines (VMs), and then launches them.\nThis action enables \n" "you to create a specified number of VMs using an OUTSCALE machine image (OMI) \n" "that you are allowed to use, and then to automatically launch them.\nThe VMs \n" "remain in the `pending` state until they are created and ready to be used. Once \n" "automatically launched, they are in the `running` state.\nTo check the state of \n" "your VMs, call the [ReadVms](#readvms) method.\nIf not specified, the security \n" "group used by the service is the default one.\nThe metadata server enables you \n" "to get the public key provided when the VM is launched. Official OMIs contain a \n" "script to get this public key and put it inside the VM to provide secure access \n" "without password.\nFor more information, see [About \n" "VMs](https://docs.outscale.com/en/userguide/About-VMs.html).\n" "\nRequired Argument: ImageId \n" +, + "Usage: oapi-cli CreateVolume --SubregionName=subregionname [OPTIONS]\n" "Creates a Block Storage Unit (BSU) volume in a specified Region.\nBSU volumes \n" "can be attached to a virtual machine (VM) in the same Subregion. You can create \n" "an empty volume or restore a volume from an existing snapshot.\nYou can create \n" "the following volume types: Enterprise (`io1`) for provisioned IOPS SSD \n" "volumes, Performance (`gp2`) for general purpose SSD volumes, or Magnetic \n" "(`standard`) volumes.\nFor more information, see [About \n" "Volumes](https://docs.outscale.com/en/userguide/About-Volumes.html).\n" "\nRequired Argument: SubregionName \n" , - "Usage: oapi-cli RegisterVmsInLoadBalancer --BackendVmIds=backendvmids --LoadBalancerName=loadbalancername [OPTIONS]\n" "Registers one or more virtual machines (VMs) with a specified load \n" "balancer.\nThe VMs can be in different Subnets and different Subregions than \n" "the load balancer, as long as the VMs and load balancers are all in the public \n" "Cloud or all in the same Net. It may take a little time for a VM to be \n" "registered with the load balancer. Once the VM is registered with a load \n" "balancer, it receives traffic and requests from this load balancer and is \n" "called a backend VM.\n" "\nRequired Argument: BackendVmIds, LoadBalancerName \n" + "Usage: oapi-cli CreateVpnConnection --ClientGatewayId=clientgatewayid --ConnectionType=connectiontype --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Creates a VPN connection between a specified virtual gateway and a specified \n" "client gateway.\nYou can create only one VPN connection between a virtual \n" "gateway and a client gateway.\n\n**[IMPORTANT]**\nThis action can be done only \n" "if the virtual gateway is in the `available` state.\nFor more information, see \n" "[About VPN \n" "Connections](https://docs.outscale.com/en/userguide/About-VPN-Connections.html).\n" "\nRequired Argument: ClientGatewayId ConnectionType VirtualGatewayId \n" , - "Usage: oapi-cli RebootVms --VmIds=vmids [OPTIONS]\n" "Reboots one or more virtual machines (VMs).\nThis operation sends a reboot \n" "request to one or more specified VMs. This is an asynchronous action that \n" "queues this reboot request. This action only reboots VMs that are valid and \n" "that belong to you.\n" "\nRequired Argument: VmIds \n" + "Usage: oapi-cli CreateVpnConnectionRoute --DestinationIpRange=destinationiprange --VpnConnectionId=vpnconnectionid [OPTIONS]\n" "Creates a static route to a VPN connection.\nThis enables you to select the \n" "network flows sent by the virtual gateway to the target VPN connection.\nFor \n" "more information, see [About Routing Configuration for VPN \n" "Connections](https://docs.outscale.com/en/userguide/About-Routing-Configuration-\n" "for-VPN-Connections.html).\n" "\nRequired Argument: DestinationIpRange VpnConnectionId \n" , - "Usage: oapi-cli ReadVpnConnections [OPTIONS]\n" "Lists one or more VPN connections.\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteAccessKey --AccessKeyId=accesskeyid [OPTIONS]\n" "Deletes the specified access key of either your root account or an EIM \n" "user.\nThe access key of an EIM user must be in the `INACTIVE` state to be \n" "deleted.\n" "\nRequired Argument: AccessKeyId \n" , - "Usage: oapi-cli ReadVolumes [OPTIONS]\n" "Lists one or more specified Block Storage Unit (BSU) volumes.\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteApiAccessRule --ApiAccessRuleId=apiaccessruleid [OPTIONS]\n" "Deletes a specified API access rule.\n\n**[IMPORTANT]** \nYou cannot delete the \n" "last remaining API access rule. However, if you delete all the API access rules \n" "that allow you to access the APIs, you need to contact the Support team to \n" "regain access. For more information, see [Technical \n" "Support](https://docs.outscale.com/en/userguide/Technical-Support.html).\n" "\nRequired Argument: ApiAccessRuleId \n" , - "Usage: oapi-cli ReadVmsState [OPTIONS]\n" "Lists the status of one or more virtual machines (VMs).\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteCa --CaId=caid [OPTIONS]\n" "Deletes a specified Client Certificate Authority (CA).\n" "\nRequired Argument: CaId \n" , - "Usage: oapi-cli ReadVmsHealth --LoadBalancerName=loadbalancername [OPTIONS]\n" "Lists the state of one or more backend virtual machines (VMs) registered with a \n" "specified load balancer.\n" "\nRequired Argument: LoadBalancerName \n" + "Usage: oapi-cli DeleteClientGateway --ClientGatewayId=clientgatewayid [OPTIONS]\n" "Deletes a client gateway.\nYou must delete the VPN connection before deleting \n" "the client gateway.\n" "\nRequired Argument: ClientGatewayId \n" , - "Usage: oapi-cli ReadVms [OPTIONS]\n" "Lists one or more of your virtual machines (VMs).\nIf you provide one or more \n" "VM IDs, this action returns a description for all of these VMs. If you do not \n" "provide any VM ID, this action returns a description for all of the VMs that \n" "belong to you. If you provide an invalid VM ID, an error is returned. If you \n" "provide the ID of a VM that does not belong to you, the description of this VM \n" "is not included in the response. The refresh interval for data returned by this \n" "action is one hour, meaning that a terminated VM may appear in the response.\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteDedicatedGroup --DedicatedGroupId=dedicatedgroupid [OPTIONS]\n" "> [WARNING]\n> This feature is currently in beta.\n\nDeletes a specified \n" "dedicated group of virtual machines (VMs).\n\n**[WARNING]**\nA dedicated group \n" "can be deleted only if no VM or Net is in the dedicated group. Otherwise, you \n" "need to force the deletion.\nIf you force the deletion:\n- all VMs are \n" "terminated.\n- all Nets are deleted, and all resources associated with Nets are \n" "detached.\n" "\nRequired Argument: DedicatedGroupId \n" , - "Usage: oapi-cli ReadVmTypes [OPTIONS]\n" "Lists one or more predefined VM types.\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteDhcpOptions --DhcpOptionsSetId=dhcpoptionssetid [OPTIONS]\n" "Deletes a specified DHCP options set.\nBefore deleting a DHCP options set, you \n" "must disassociate it from the Nets you associated it with. To do so, you need \n" "to associate with each Net a new set of DHCP options, or the `default` one if \n" "you do not want to associate any DHCP options with the \n" "Net.\n\n**[IMPORTANT]**\nYou cannot delete the `default` set.\n" "\nRequired Argument: DhcpOptionsSetId \n" , - "Usage: oapi-cli ReadVmTemplates [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nLists one or more virtual machine (VM) templates.\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteDirectLinkInterface --DirectLinkInterfaceId=directlinkinterfaceid [OPTIONS]\n" "Deletes a specified DirectLink interface.\n" "\nRequired Argument: DirectLinkInterfaceId \n" , - "Usage: oapi-cli ReadVmGroups [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nLists one or more group of virtual machines (VMs).\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteDirectLink --DirectLinkId=directlinkid [OPTIONS]\n" "Deletes a specified DirectLink.\nBefore deleting a DirectLink, ensure that all \n" "your DirectLink interfaces related to this DirectLink are deleted.\n" "\nRequired Argument: DirectLinkId \n" , - "Usage: oapi-cli ReadVirtualGateways [OPTIONS]\n" "Lists one or more virtual gateways.\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteExportTask --ExportTaskId=exporttaskid [OPTIONS]\n" "Deletes an export task.\nIf the export task is not running, the command fails \n" "and an error is returned.\n" "\nRequired Argument: ExportTaskId \n" , - "Usage: oapi-cli ReadUsers [OPTIONS]\n" "Lists all EIM users that have a specified path.\nIf you do not specify a path, \n" "this action returns a list of all users in the account (or an empty list if \n" "there are none).\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteFlexibleGpu --FlexibleGpuId=flexiblegpuid [OPTIONS]\n" "Releases a flexible GPU (fGPU) from your account.\nThe fGPU becomes free to be \n" "used by someone else.\n" "\nRequired Argument: FlexibleGpuId \n" , - "Usage: oapi-cli ReadUserGroupsPerUser --UserName=username [OPTIONS]\n" "Lists the groups a specified user belongs to.\n" "\nRequired Argument: UserName \n" + "Usage: oapi-cli DeleteImage --ImageId=imageid [OPTIONS]\n" "Deletes an OUTSCALE machine image (OMI) so that you cannot use it anymore to \n" "launch virtual machines (VMs). However, you can still use VMs already launched \n" "from this OMI.\n" "\nRequired Argument: ImageId \n" , - "Usage: oapi-cli ReadUserGroups [OPTIONS]\n" "Lists the groups with the specified path prefix.\nIf you do not specify any \n" "path prefix, this action returns all the groups (or an empty list if there are \n" "none).\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteInternetService --InternetServiceId=internetserviceid [OPTIONS]\n" "Deletes an Internet service.\nBefore deleting an Internet service, you must \n" "detach it from any Net it is attached to.\n" "\nRequired Argument: InternetServiceId \n" , - "Usage: oapi-cli ReadUserGroupPolicy --PolicyName=policyname --UserGroupName=usergroupname [OPTIONS]\n" "Returns information about an inline policy included in a specified group.\n" "\nRequired Argument: PolicyName, UserGroupName \n" + "Usage: oapi-cli DeleteKeypair --KeypairName=keypairname [OPTIONS]\n" "Deletes the specified keypair.\nThis action deletes the public key stored by \n" "3DS OUTSCALE, thus deleting the keypair.\n" "\nRequired Argument: KeypairName \n" , - "Usage: oapi-cli ReadUserGroupPolicies --UserGroupName=usergroupname [OPTIONS]\n" "Lists the names of the inline policies embedded in a specific group.\n" "\nRequired Argument: UserGroupName \n" + "Usage: oapi-cli DeleteListenerRule --ListenerRuleName=listenerrulename [OPTIONS]\n" "Deletes a listener rule.\nThe previously active rule is disabled after deletion.\n" "\nRequired Argument: ListenerRuleName \n" , - "Usage: oapi-cli ReadUserGroup --UserGroupName=usergroupname [OPTIONS]\n" "Lists information about a specified user group, including its users.\n" "\nRequired Argument: UserGroupName \n" + "Usage: oapi-cli DeleteLoadBalancerListeners --LoadBalancerName=loadbalancername --LoadBalancerPorts=loadbalancerports [OPTIONS]\n" "Deletes listeners of a specified load balancer.\n" "\nRequired Argument: LoadBalancerName LoadBalancerPorts \n" +, + "Usage: oapi-cli DeleteLoadBalancerPolicy --LoadBalancerName=loadbalancername --PolicyName=policyname [OPTIONS]\n" "Deletes a specified policy from a load balancer.\nIn order to be deleted, the \n" "policy must not be enabled for any listener.\n" "\nRequired Argument: LoadBalancerName PolicyName \n" +, + "Usage: oapi-cli DeleteLoadBalancer --LoadBalancerName=loadbalancername [OPTIONS]\n" "Deletes a specified load balancer.\n" "\nRequired Argument: LoadBalancerName \n" , - "Usage: oapi-cli ReadUnitPrice --Operation=operation --Service=service --Type=type [OPTIONS]\n" "Gets unit price information for the specified parameters.\n" "\nRequired Argument: Operation, Service, Type \n" + "Usage: oapi-cli DeleteLoadBalancerTags --LoadBalancerNames=loadbalancernames --Tags=tags [OPTIONS]\n" "Deletes one or more tags from the specified load balancers.\n" "\nRequired Argument: LoadBalancerNames Tags \n" , - "Usage: oapi-cli ReadTags [OPTIONS]\n" "Lists one or more tags for your resources.\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteNatService --NatServiceId=natserviceid [OPTIONS]\n" "Deletes a specified network address translation (NAT) service.\nThis action \n" "disassociates the public IP from the NAT service, but does not release this \n" "public IP from your account. However, it does not delete any NAT service routes \n" "in your route tables.\n" "\nRequired Argument: NatServiceId \n" , - "Usage: oapi-cli ReadSubregions [OPTIONS]\n" "Lists one or more of the enabled Subregions that you can access in the current \n" "Region.\n\nFor more information, see [About Regions and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-and-Subregions.\n" "html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteNetAccessPoint --NetAccessPointId=netaccesspointid [OPTIONS]\n" "Deletes a specified Net access point.\nThis action also deletes the \n" "corresponding routes added to the route tables you specified for the Net access \n" "point.\n" "\nRequired Argument: NetAccessPointId \n" , - "Usage: oapi-cli ReadSubnets [OPTIONS]\n" "Lists one or more of your Subnets.\nIf you do not specify any Subnet ID, this \n" "action describes all of your Subnets.\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteNetPeering --NetPeeringId=netpeeringid [OPTIONS]\n" "Deletes a Net peering.\nIf the Net peering is in the `active` state, it can be \n" "deleted either by the owner of the requester Net or the owner of the peer \n" "Net.\nIf it is in the `pending-acceptance` state, it can be deleted only by the \n" "owner of the requester Net.\nIf it is in the `rejected`, `failed`, or `expired` \n" "states, it cannot be deleted.\n" "\nRequired Argument: NetPeeringId \n" , - "Usage: oapi-cli ReadSnapshots [OPTIONS]\n" "Lists one or more snapshots that are available to you and the permissions to \n" "create volumes from them.\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteNet --NetId=netid [OPTIONS]\n" "Deletes a specified Net.\nBefore deleting the Net, you need to delete or detach \n" "all the resources associated with the Net:\n\n* Virtual machines (VMs)\n* Net \n" "peerings\n* Custom route tables\n* Public IPs allocated to resources in the \n" "Net\n* Network Interface Cards (NICs) created in the Subnets\n* Virtual \n" "gateways, Internet services and NAT services\n* Load balancers\n* Security \n" "groups\n* Subnets\n" "\nRequired Argument: NetId \n" , - "Usage: oapi-cli ReadSnapshotExportTasks [OPTIONS]\n" "Lists one or more snapshot export tasks.\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteNic --NicId=nicid [OPTIONS]\n" "Deletes the specified network interface card (NIC).\nThe network interface must \n" "not be attached to any virtual machine (VM).\n" "\nRequired Argument: NicId \n" , - "Usage: oapi-cli ReadServerCertificates [OPTIONS]\n" "Lists your server certificates.\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeletePolicy --PolicyOrn=policyorn [OPTIONS]\n" "Deletes a managed policy.\nBefore deleting a managed policy, you must unlink \n" "all users linked to it and delete all the versions of the policy using the \n" "`DeletePolicyVersion` method.\n" "\nRequired Argument: PolicyOrn \n" , - "Usage: oapi-cli ReadSecurityGroups [OPTIONS]\n" "Lists one or more security groups.\nYou can specify either the name of the \n" "security groups or their IDs.\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeletePolicyVersion --PolicyOrn=policyorn --VersionId=versionid [OPTIONS]\n" "Deletes a specified version of a managed policy, if it is not set as the \n" "default one.\n" "\nRequired Argument: PolicyOrn VersionId \n" , - "Usage: oapi-cli ReadSecretAccessKey --AccessKeyId=accesskeyid [OPTIONS]\n" "> [WARNING]\n> Deprecated: This call will be removed after October 1, \n" "2024.\n\nLists information about the specified access key of your root account, \n" "including its secret key.\n" "\nRequired Argument: AccessKeyId \n" + "Usage: oapi-cli DeletePublicIp [OPTIONS]\n" "Releases a public IP.\nYou can release a public IP associated with your \n" "account. This address is released in the public IP pool and can be used by \n" "someone else. Before releasing a public IP, ensure you updated all your \n" "resources communicating with this address.\n" "\nRequired Argument: null \n" +, + "Usage: oapi-cli DeleteRoute --RouteTableId=routetableid --DestinationIpRange=destinationiprange [OPTIONS]\n" "Deletes a route from a specified route table.\n" "\nRequired Argument: RouteTableId DestinationIpRange \n" +, + "Usage: oapi-cli DeleteRouteTable --RouteTableId=routetableid [OPTIONS]\n" "Deletes a specified route table.\nBefore deleting a route table, you must \n" "disassociate it from any Subnet. You cannot delete the main route table.\n" "\nRequired Argument: RouteTableId \n" +, + "Usage: oapi-cli DeleteSecurityGroup [OPTIONS]\n" "Deletes a specified security group.\nYou can specify either the name of the \n" "security group or its ID.\nThis action fails if the specified group is \n" "associated with a virtual machine (VM) or referenced by another security group.\n" "\nRequired Argument: null \n" +, + "Usage: oapi-cli DeleteSecurityGroupRule --SecurityGroupId=securitygroupid --Flow=flow [OPTIONS]\n" "Deletes one or more inbound or outbound rules from a security group. For the \n" "rule to be deleted, the values specified in the deletion request must exactly \n" "match the value of the existing rule.\nIn case of TCP and UDP protocols, you \n" "have to indicate the destination port or range of ports. In case of ICMP \n" "protocol, you have to specify the ICMP type and code numbers.\nRules (IP \n" "permissions) consist of the protocol, IP range or source security group.\nTo \n" "remove outbound access to a destination security group, we recommend to use a \n" "set of IP permissions. We also recommend to specify the protocol in a set of IP \n" "permissions.\n" "\nRequired Argument: SecurityGroupId Flow \n" +, + "Usage: oapi-cli DeleteServerCertificate --Name=name [OPTIONS]\n" "Deletes a specified server certificate.\n" "\nRequired Argument: Name \n" +, + "Usage: oapi-cli DeleteSnapshot --SnapshotId=snapshotid [OPTIONS]\n" "Deletes a specified snapshot.\nYou cannot delete a snapshot that is currently \n" "used by an OUTSCALE machine image (OMI). To do so, you first need to delete the \n" "corresponding OMI. For more information, see the [DeleteImage](#deleteimage) \n" "method.\n" "\nRequired Argument: SnapshotId \n" +, + "Usage: oapi-cli DeleteSubnet --SubnetId=subnetid [OPTIONS]\n" "Deletes a specified Subnet.\nBefore deleting the Subnet, you need to delete all \n" "resources associated with the Subnet:\n\n* Virtual machines (VMs)\n* Network \n" "Interface Cards (NICs)\n* NAT services\n* Load balancers\n" "\nRequired Argument: SubnetId \n" +, + "Usage: oapi-cli DeleteTags --ResourceIds=resourceids --Tags=tags [OPTIONS]\n" "Deletes one or more tags from the specified resources.\n" "\nRequired Argument: ResourceIds Tags \n" +, + "Usage: oapi-cli DeleteUserGroupPolicy --UserGroupName=usergroupname --PolicyName=policyname [OPTIONS]\n" "Deletes a specified inline policy from a specific group.\n" "\nRequired Argument: UserGroupName PolicyName \n" +, + "Usage: oapi-cli DeleteUserGroup --UserGroupName=usergroupname [OPTIONS]\n" "Deletes a specified user group.\n\n**[WARNING]**\nThe user group must be empty \n" "of any user and must not have any linked policy. Otherwise, you need to force \n" "the deletion.\nIf you force the deletion, all inline policies will be deleted \n" "with the user group.\n" "\nRequired Argument: UserGroupName \n" +, + "Usage: oapi-cli DeleteUser --UserName=username [OPTIONS]\n" "Deletes a specified EIM user. The EIM user must not belong to any group, nor \n" "have any key or linked policy.\n" "\nRequired Argument: UserName \n" +, + "Usage: oapi-cli DeleteVirtualGateway --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Deletes a specified virtual gateway.\nBefore deleting a virtual gateway, we \n" "recommend to detach it from the Net and delete the VPN connection.\n" "\nRequired Argument: VirtualGatewayId \n" +, + "Usage: oapi-cli DeleteVmGroup --VmGroupId=vmgroupid [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nDeletes a specified VM group.\n" "\nRequired Argument: VmGroupId \n" , - "Usage: oapi-cli ReadRouteTables [OPTIONS]\n" "Lists one or more of your route tables.\nIn your Net, each Subnet must be \n" "associated with a route table. If a Subnet is not explicitly associated with a \n" "route table, it is implicitly associated with the main route table of the Net.\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteVmTemplate --VmTemplateId=vmtemplateid [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nDeletes a virtual machine (VM) template.\nYou cannot delete a \n" "template currently used by a VM group.\n" "\nRequired Argument: VmTemplateId \n" , - "Usage: oapi-cli ReadRegions [OPTIONS]\n" "Lists one or more Regions of the OUTSCALE Cloud.\nFor more information, see \n" "[About Regions and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-and-Subregions.\n" "html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteVms --VmIds=vmids [OPTIONS]\n" "Terminates one or more virtual machines (VMs).\nThis operation is idempotent, \n" "that means that all calls succeed if you terminate a VM more than once.\n" "\nRequired Argument: VmIds \n" , - "Usage: oapi-cli ReadQuotas [OPTIONS]\n" "Lists one or more of your quotas.\nFor more information, see [About Your \n" "Account](https://docs.outscale.com/en/userguide/About-Your-Account.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteVolume --VolumeId=volumeid [OPTIONS]\n" "Deletes a specified Block Storage Unit (BSU) volume.\nYou can delete available \n" "volumes only, that is, volumes that are not attached to a virtual machine (VM).\n" "\nRequired Argument: VolumeId \n" , - "Usage: oapi-cli ReadPublicIps [OPTIONS]\n" "Lists one or more public IPs allocated to your account.\nBy default, this \n" "action returns information about all your public IPs: available or associated \n" "with a virtual machine (VM), a network interface card (NIC) or a NAT service.\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteVpnConnection --VpnConnectionId=vpnconnectionid [OPTIONS]\n" "Deletes a specified VPN connection.\nIf you want to delete a Net and all its \n" "dependencies, we recommend to detach the virtual gateway from the Net and \n" "delete the Net before deleting the VPN connection. This enables you to delete \n" "the Net without waiting for the VPN connection to be deleted.\n" "\nRequired Argument: VpnConnectionId \n" , - "Usage: oapi-cli ReadPublicIpRanges [OPTIONS]\n" "Gets the public IPv4 addresses in CIDR notation for the Region specified in the \n" "endpoint of the request. For more information, see [About Regions and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-and-Subregions.\n" "html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeleteVpnConnectionRoute --DestinationIpRange=destinationiprange --VpnConnectionId=vpnconnectionid [OPTIONS]\n" "Deletes a static route to a VPN connection previously created using the \n" "CreateVpnConnectionRoute method.\n" "\nRequired Argument: DestinationIpRange VpnConnectionId \n" , - "Usage: oapi-cli ReadPublicCatalog [OPTIONS]\n" "Returns the price list of OUTSCALE products and services for the Region \n" "specified in the endpoint of the request. For more information, see [About \n" "Regions and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-and-Subregions.\n" "html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli DeregisterVmsInLoadBalancer --BackendVmIds=backendvmids --LoadBalancerName=loadbalancername [OPTIONS]\n" "Deregisters a specified virtual machine (VM) from a load balancer.\n" "\nRequired Argument: BackendVmIds LoadBalancerName \n" , - "Usage: oapi-cli ReadProductTypes [OPTIONS]\n" "Lists one or more product types.\n" "\nRequired Argument: \n" + "Usage: oapi-cli LinkFlexibleGpu --FlexibleGpuId=flexiblegpuid --VmId=vmid [OPTIONS]\n" "Attaches one of your allocated flexible GPUs (fGPUs) to one of your virtual \n" "machines (VMs).\nTo complete the linking of the fGPU, you need to do a \n" "stop/start of the VM. A simple restart is not sufficient, as the linking of the \n" "fGPU is done when the VM goes through the `stopped` state. For the difference \n" "between stop/start and restart, see [About VM \n" "Lifecycle](https://docs.outscale.com/en/userguide/About-VM-Lifecycle.html).\n\n*\n" "*[NOTE]**\nYou can attach fGPUs only to VMs with the `highest` (1) performance \n" "flag. For more information see [About Flexible \n" "GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html) and [VM \n" "Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" "\nRequired Argument: FlexibleGpuId VmId \n" , - "Usage: oapi-cli ReadPolicyVersions --PolicyOrn=policyorn [OPTIONS]\n" "Lists information about all the policy versions of a specified managed policy.\n" "\nRequired Argument: PolicyOrn \n" + "Usage: oapi-cli LinkInternetService --InternetServiceId=internetserviceid --NetId=netid [OPTIONS]\n" "Attaches an Internet service to a Net.\nTo enable the connection between the \n" "Internet and a Net, you must attach an Internet service to this Net.\n" "\nRequired Argument: InternetServiceId NetId \n" , - "Usage: oapi-cli ReadPolicyVersion --PolicyOrn=policyorn --VersionId=versionid [OPTIONS]\n" "Lists information about a specified version of a managed policy.\n" "\nRequired Argument: PolicyOrn, VersionId \n" + "Usage: oapi-cli LinkLoadBalancerBackendMachines --LoadBalancerName=loadbalancername [OPTIONS]\n" "Attaches one or more virtual machines (VMs) to a specified load balancer. You \n" "need to specify at least the `BackendIps` or the `BackendVmIds` parameter.\nThe \n" "VMs can be in different Subnets and different Subregions than the load \n" "balancer, as long as the VMs and load balancers are all in the public Cloud or \n" "all in the same Net. It may take a little time for a VM to be registered with \n" "the load balancer. Once the VM is registered with a load balancer, it receives \n" "traffic and requests from this load balancer and is called a backend VM.\n" "\nRequired Argument: LoadBalancerName \n" , - "Usage: oapi-cli ReadPolicy --PolicyOrn=policyorn [OPTIONS]\n" "Lists information about a specified managed policy.\n" "\nRequired Argument: PolicyOrn \n" + "Usage: oapi-cli LinkManagedPolicyToUserGroup --PolicyOrn=policyorn --UserGroupName=usergroupname [OPTIONS]\n" "Links a managed policy to a specific group. This policy applies to all the \n" "users contained in this group.\n" "\nRequired Argument: PolicyOrn UserGroupName \n" , - "Usage: oapi-cli ReadPolicies [OPTIONS]\n" "Lists all the managed policies available for your account.\n" "\nRequired Argument: \n" + "Usage: oapi-cli LinkNic --DeviceNumber=devicenumber --VmId=vmid --NicId=nicid [OPTIONS]\n" "Attaches a network interface card (NIC) to a virtual machine (VM).\nThe \n" "interface and the VM must be in the same Subregion. The VM can be either \n" "`running` or `stopped`. The NIC must be in the `available` state. For more \n" "information, see [Attaching a NIC to a \n" "VM](https://docs.outscale.com/en/userguide/Attaching-a-NIC-to-a-VM.html).\n" "\nRequired Argument: DeviceNumber VmId NicId \n" , - "Usage: oapi-cli ReadNics [OPTIONS]\n" "Lists one or more network interface cards (NICs).\nA NIC is a virtual network \n" "interface that you can attach to a virtual machine (VM) in a Net.\n" "\nRequired Argument: \n" + "Usage: oapi-cli LinkPolicy --PolicyOrn=policyorn --UserName=username [OPTIONS]\n" "Links a managed policy to a specific user.\n" "\nRequired Argument: PolicyOrn UserName \n" , - "Usage: oapi-cli ReadNets [OPTIONS]\n" "Lists one or more Nets.\n" "\nRequired Argument: \n" + "Usage: oapi-cli LinkPrivateIps --NicId=nicid [OPTIONS]\n" "Assigns one or more secondary private IPs to a specified network interface card \n" "(NIC). This action is only available in a Net. The private IPs to be assigned \n" "can be added individually using the `PrivateIps` parameter, or you can specify \n" "the number of private IPs to be automatically chosen within the Subnet range \n" "using the `SecondaryPrivateIpCount` parameter. You can specify only one of \n" "these two parameters. If none of these parameters are specified, a private IP \n" "is chosen within the Subnet range.\n" "\nRequired Argument: NicId \n" , - "Usage: oapi-cli ReadNetPeerings [OPTIONS]\n" "Lists one or more peering connections between two Nets.\n" "\nRequired Argument: \n" + "Usage: oapi-cli LinkPublicIp [OPTIONS]\n" "Associates a public IP with a virtual machine (VM) or a network interface card \n" "(NIC), in the public Cloud or in a Net. You can associate a public IP with only \n" "one VM or network interface at a time.\nTo associate a public IP in a Net, \n" "ensure that the Net has an Internet service attached. For more information, see \n" "the [LinkInternetService](#linkinternetservice) method.\nBy default, the public \n" "IP is disassociated every time you stop and start the VM. For a persistent \n" "association, you can add the `osc.fcu.eip.auto-attach` tag to the VM with the \n" "public IP as value. For more information, see the [CreateTags](#createtags) \n" "method.\n\n**[IMPORTANT]**\nYou can associate a public IP with a network \n" "address translation (NAT) service only when creating the NAT service. To modify \n" "its public IP, you need to delete the NAT service and re-create it with the new \n" "public IP. For more information, see the [CreateNatService](#createnatservice) \n" "method.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadNetAccessPoints [OPTIONS]\n" "Lists one or more Net access points.\n" "\nRequired Argument: \n" + "Usage: oapi-cli LinkRouteTable --RouteTableId=routetableid --SubnetId=subnetid [OPTIONS]\n" "Associates a Subnet with a route table.\nThe Subnet and the route table must be \n" "in the same Net. The traffic is routed according to the route table defined \n" "within this Net. You can associate a route table with several Subnets.\n" "\nRequired Argument: RouteTableId SubnetId \n" , - "Usage: oapi-cli ReadNetAccessPointServices [OPTIONS]\n" "Lists OUTSCALE services available to create Net access points.\nFor more \n" "information, see [CreateNetAccessPoint](#createnetaccesspoint).\n" "\nRequired Argument: \n" + "Usage: oapi-cli LinkVirtualGateway --NetId=netid --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Attaches a virtual gateway to a Net.\n\n**[IMPORTANT]**\nThis action can be \n" "done only if the virtual gateway is in the `available` state.\n" "\nRequired Argument: NetId VirtualGatewayId \n" , - "Usage: oapi-cli ReadNatServices [OPTIONS]\n" "Lists one or more network address translation (NAT) services.\n" "\nRequired Argument: \n" + "Usage: oapi-cli LinkVolume --DeviceName=devicename --VmId=vmid --VolumeId=volumeid [OPTIONS]\n" "Attaches a Block Storage Unit (BSU) volume to a virtual machine (VM).\nThe \n" "volume and the VM must be in the same Subregion. The VM can be running or \n" "stopped. The volume is attached to the specified VM device.\n" "\nRequired Argument: DeviceName VmId VolumeId \n" , - "Usage: oapi-cli ReadManagedPoliciesLinkedToUserGroup --UserGroupName=usergroupname [OPTIONS]\n" "Lists the managed policies linked to a specified group.\n" "\nRequired Argument: UserGroupName \n" + "Usage: oapi-cli PutUserGroupPolicy --PolicyName=policyname --PolicyDocument=policydocument --UserGroupName=usergroupname [OPTIONS]\n" "Creates or updates an inline policy included in a specified group.\nThe policy \n" "is automatically applied to all the users of the group after its creation.\n" "\nRequired Argument: PolicyName PolicyDocument UserGroupName \n" , - "Usage: oapi-cli ReadLocations [OPTIONS]\n" "Lists the locations, corresponding to datacenters, where you can set up a \n" "DirectLink.\nFor more information, see [About \n" "DirectLink](https://docs.outscale.com/en/userguide/About-DirectLink.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadAccessKeys [OPTIONS]\n" "Lists the access key IDs of either your root account or an EIM user.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadLoadBalancers [OPTIONS]\n" "Lists one or more load balancers and their attributes.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadAccounts [OPTIONS]\n" "Gets information about the account that sent the request.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadLoadBalancerTags --LoadBalancerNames=loadbalancernames [OPTIONS]\n" "Lists the tags associated with one or more specified load balancers.\n" "\nRequired Argument: LoadBalancerNames \n" + "Usage: oapi-cli ReadAdminPassword --VmId=vmid [OPTIONS]\n" "Gets the administrator password for a Windows running virtual machine \n" "(VM).\nThe administrator password is encrypted using the keypair you specified \n" "when launching the VM.\n\n**[IMPORTANT]**\n* Only RSA keypairs can decrypt the \n" "password of a Windows VM.\n* The administrator password is generated only on \n" "the first boot of the Windows VM. It is not returned after the first boot.\n" "\nRequired Argument: VmId \n" , - "Usage: oapi-cli ReadListenerRules [OPTIONS]\n" "Lists one or more listener rules. By default, this action returns the full list \n" "of listener rules for the account.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadApiAccessPolicy [OPTIONS]\n" "Gets information about the API access policy of your account.\nFor more \n" "information, see [About Your API Access \n" "Policy](https://docs.outscale.com/en/userguide/About-Your-API-Access-Policy.html\n" ").\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadLinkedPolicies --UserName=username [OPTIONS]\n" "Lists the managed policies linked to a specified user.\n" "\nRequired Argument: UserName \n" + "Usage: oapi-cli ReadApiAccessRules [OPTIONS]\n" "Lists one or more API access rules.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadKeypairs [OPTIONS]\n" "Lists one or more of your keypairs.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadApiLogs [OPTIONS]\n" "Lists the logs of the API calls you have performed with this \n" "account.\n\n**[IMPORTANT]**\nPast logs are accessible for up to 32 days.\nBy \n" "default, the retrieved interval is 48 hours. If neither of the \n" "`QueryDateBefore` nor `QueryDateAfter` parameters are specified, logs from the \n" "past 48 hours are retrieved. If you only specify one of two, logs are retrieved \n" "from a 2-day interval based on the date you provided. To retrieve logs beyond a \n" "2-day interval, specify both parameters.\nFor more information, see [About \n" "OMS](https://docs.outscale.com/en/userguide/About-OMS.html).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadInternetServices [OPTIONS]\n" "Lists one or more of your Internet services.\nAn Internet service enables \n" "virtual machines (VMs) launched in a Net to connect to the Internet. It allows \n" "routing of incoming and outgoing Internet traffic and management of public IP \n" "addresses.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadCas [OPTIONS]\n" "Gets information about one or more of your Client Certificate Authorities (CAs).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadImages [OPTIONS]\n" "Lists one or more OUTSCALE machine images (OMIs) you can use.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadCatalog [OPTIONS]\n" "Returns the price list of OUTSCALE services for the current Region.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadImageExportTasks [OPTIONS]\n" "Lists one or more image export tasks.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadCatalogs [OPTIONS]\n" "Returns the price list of OUTSCALE services for the current Region within a \n" "specific time period.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadFlexibleGpus [OPTIONS]\n" "Lists one or more flexible GPUs (fGPUs) allocated to your account.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadClientGateways [OPTIONS]\n" "Lists one or more of your client gateways.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadFlexibleGpuCatalog [OPTIONS]\n" "Lists all flexible GPUs available in the public catalog.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadConsoleOutput --VmId=vmid [OPTIONS]\n" "Gets the console output for a virtual machine (VM). This console provides the \n" "most recent 64 KiB output.\n\n**[IMPORTANT]**\nOn Windows VMs, the console is \n" "handled only on the first boot. It returns no output after the first boot.\n" "\nRequired Argument: VmId \n" , - "Usage: oapi-cli ReadEntitiesLinkedToPolicy [OPTIONS]\n" "Lists all entities (account, users, or user groups) linked to a specific \n" "managed policy.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadConsumptionAccount --FromDate=fromdate --ToDate=todate [OPTIONS]\n" "Gets information about the consumption of your account for each billable \n" "resource within the specified time period.\n" "\nRequired Argument: FromDate ToDate \n" , - "Usage: oapi-cli ReadDirectLinks [OPTIONS]\n" "Lists all DirectLinks in the Region.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadDedicatedGroups [OPTIONS]\n" "> [WARNING]\n> This feature is currently in beta.\n\nList one or more dedicated \n" "groups of virtual machines (VMs).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadDirectLinkInterfaces [OPTIONS]\n" "Lists one or more of your DirectLink interfaces.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadDhcpOptions [OPTIONS]\n" "Gets information about the content of one or more DHCP options sets.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadDhcpOptions [OPTIONS]\n" "Gets information about the content of one or more DHCP options sets.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadDirectLinkInterfaces [OPTIONS]\n" "Lists one or more of your DirectLink interfaces.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadDedicatedGroups [OPTIONS]\n" "> [WARNING]\n> This feature is currently in beta.\n\nList one or more dedicated \n" "groups of virtual machines (VMs).\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadDirectLinks [OPTIONS]\n" "Lists all DirectLinks in the Region.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadConsumptionAccount --FromDate=fromdate --ToDate=todate [OPTIONS]\n" "Gets information about the consumption of your account for each billable \n" "resource within the specified time period.\n" "\nRequired Argument: FromDate, ToDate \n" + "Usage: oapi-cli ReadEntitiesLinkedToPolicy [OPTIONS]\n" "Lists all entities (account, users, or user groups) linked to a specific \n" "managed policy.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadConsoleOutput --VmId=vmid [OPTIONS]\n" "Gets the console output for a virtual machine (VM). This console provides the \n" "most recent 64 KiB output.\n\n**[IMPORTANT]**\nOn Windows VMs, the console is \n" "handled only on the first boot. It returns no output after the first boot.\n" "\nRequired Argument: VmId \n" + "Usage: oapi-cli ReadFlexibleGpuCatalog [OPTIONS]\n" "Lists all flexible GPUs available in the public catalog.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadClientGateways [OPTIONS]\n" "Lists one or more of your client gateways.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadFlexibleGpus [OPTIONS]\n" "Lists one or more flexible GPUs (fGPUs) allocated to your account.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadCatalogs [OPTIONS]\n" "Returns the price list of OUTSCALE services for the current Region within a \n" "specific time period.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadImageExportTasks [OPTIONS]\n" "Lists one or more image export tasks.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadCatalog [OPTIONS]\n" "Returns the price list of OUTSCALE services for the current Region.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadImages [OPTIONS]\n" "Lists one or more OUTSCALE machine images (OMIs) you can use.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadCas [OPTIONS]\n" "Gets information about one or more of your Client Certificate Authorities (CAs).\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadInternetServices [OPTIONS]\n" "Lists one or more of your Internet services.\nAn Internet service enables \n" "virtual machines (VMs) launched in a Net to connect to the Internet. It allows \n" "routing of incoming and outgoing Internet traffic and management of public IP \n" "addresses.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadApiLogs [OPTIONS]\n" "Lists the logs of the API calls you have performed with this \n" "account.\n\n**[IMPORTANT]**\nPast logs are accessible for up to 32 days.\nBy \n" "default, the retrieved interval is 48 hours. If neither of the \n" "`QueryDateBefore` nor `QueryDateAfter` parameters are specified, logs from the \n" "past 48 hours are retrieved. If you only specify one of two, logs are retrieved \n" "from a 2-day interval based on the date you provided. To retrieve logs beyond a \n" "2-day interval, specify both parameters.\nFor more information, see [About \n" "OMS](https://docs.outscale.com/en/userguide/About-OMS.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadKeypairs [OPTIONS]\n" "Lists one or more of your keypairs.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadApiAccessRules [OPTIONS]\n" "Lists one or more API access rules.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadLinkedPolicies --UserName=username [OPTIONS]\n" "Lists the managed policies linked to a specified user.\n" "\nRequired Argument: UserName \n" , - "Usage: oapi-cli ReadApiAccessPolicy [OPTIONS]\n" "Gets information about the API access policy of your account.\nFor more \n" "information, see [About Your API Access \n" "Policy](https://docs.outscale.com/en/userguide/About-Your-API-Access-Policy.html\n" ").\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadListenerRules [OPTIONS]\n" "Lists one or more listener rules. By default, this action returns the full list \n" "of listener rules for the account.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadAdminPassword --VmId=vmid [OPTIONS]\n" "Gets the administrator password for a Windows running virtual machine \n" "(VM).\nThe administrator password is encrypted using the keypair you specified \n" "when launching the VM.\n\n**[IMPORTANT]**\n* Only RSA keypairs can decrypt the \n" "password of a Windows VM.\n* The administrator password is generated only on \n" "the first boot of the Windows VM. It is not returned after the first boot.\n" "\nRequired Argument: VmId \n" + "Usage: oapi-cli ReadLoadBalancerTags --LoadBalancerNames=loadbalancernames [OPTIONS]\n" "Lists the tags associated with one or more specified load balancers.\n" "\nRequired Argument: LoadBalancerNames \n" , - "Usage: oapi-cli ReadAccounts [OPTIONS]\n" "Gets information about the account that sent the request.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadLoadBalancers [OPTIONS]\n" "Lists one or more load balancers and their attributes.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli ReadAccessKeys [OPTIONS]\n" "Lists the access key IDs of either your root account or an EIM user.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadLocations [OPTIONS]\n" "Lists the locations, corresponding to datacenters, where you can set up a \n" "DirectLink.\nFor more information, see [About \n" "DirectLink](https://docs.outscale.com/en/userguide/About-DirectLink.html).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli PutUserGroupPolicy --PolicyName=policyname --PolicyDocument=policydocument --UserGroupName=usergroupname [OPTIONS]\n" "Creates or updates an inline policy included in a specified group.\nThe policy \n" "is automatically applied to all the users of the group after its creation.\n" "\nRequired Argument: PolicyName, PolicyDocument, UserGroupName \n" + "Usage: oapi-cli ReadManagedPoliciesLinkedToUserGroup --UserGroupName=usergroupname [OPTIONS]\n" "Lists the managed policies linked to a specified group.\n" "\nRequired Argument: UserGroupName \n" , - "Usage: oapi-cli LinkVolume --DeviceName=devicename --VmId=vmid --VolumeId=volumeid [OPTIONS]\n" "Attaches a Block Storage Unit (BSU) volume to a virtual machine (VM).\nThe \n" "volume and the VM must be in the same Subregion. The VM can be running or \n" "stopped. The volume is attached to the specified VM device.\n" "\nRequired Argument: DeviceName, VmId, VolumeId \n" + "Usage: oapi-cli ReadNatServices [OPTIONS]\n" "Lists one or more network address translation (NAT) services.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli LinkVirtualGateway --NetId=netid --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Attaches a virtual gateway to a Net.\n\n**[IMPORTANT]**\nThis action can be \n" "done only if the virtual gateway is in the `available` state.\n" "\nRequired Argument: NetId, VirtualGatewayId \n" + "Usage: oapi-cli ReadNetAccessPointServices [OPTIONS]\n" "Lists OUTSCALE services available to create Net access points.\nFor more \n" "information, see [CreateNetAccessPoint](#createnetaccesspoint).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli LinkRouteTable --RouteTableId=routetableid --SubnetId=subnetid [OPTIONS]\n" "Associates a Subnet with a route table.\nThe Subnet and the route table must be \n" "in the same Net. The traffic is routed according to the route table defined \n" "within this Net. You can associate a route table with several Subnets.\n" "\nRequired Argument: RouteTableId, SubnetId \n" + "Usage: oapi-cli ReadNetAccessPoints [OPTIONS]\n" "Lists one or more Net access points.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli LinkPublicIp [OPTIONS]\n" "Associates a public IP with a virtual machine (VM) or a network interface card \n" "(NIC), in the public Cloud or in a Net. You can associate a public IP with only \n" "one VM or network interface at a time.\nTo associate a public IP in a Net, \n" "ensure that the Net has an Internet service attached. For more information, see \n" "the [LinkInternetService](#linkinternetservice) method.\nBy default, the public \n" "IP is disassociated every time you stop and start the VM. For a persistent \n" "association, you can add the `osc.fcu.eip.auto-attach` tag to the VM with the \n" "public IP as value. For more information, see the [CreateTags](#createtags) \n" "method.\n\n**[IMPORTANT]**\nYou can associate a public IP with a network \n" "address translation (NAT) service only when creating the NAT service. To modify \n" "its public IP, you need to delete the NAT service and re-create it with the new \n" "public IP. For more information, see the [CreateNatService](#createnatservice) \n" "method.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadNetPeerings [OPTIONS]\n" "Lists one or more peering connections between two Nets.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli LinkPrivateIps --NicId=nicid [OPTIONS]\n" "Assigns one or more secondary private IPs to a specified network interface card \n" "(NIC). This action is only available in a Net. The private IPs to be assigned \n" "can be added individually using the `PrivateIps` parameter, or you can specify \n" "the number of private IPs to be automatically chosen within the Subnet range \n" "using the `SecondaryPrivateIpCount` parameter. You can specify only one of \n" "these two parameters. If none of these parameters are specified, a private IP \n" "is chosen within the Subnet range.\n" "\nRequired Argument: NicId \n" + "Usage: oapi-cli ReadNets [OPTIONS]\n" "Lists one or more Nets.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli LinkPolicy --PolicyOrn=policyorn --UserName=username [OPTIONS]\n" "Links a managed policy to a specific user.\n" "\nRequired Argument: PolicyOrn, UserName \n" + "Usage: oapi-cli ReadNics [OPTIONS]\n" "Lists one or more network interface cards (NICs).\nA NIC is a virtual network \n" "interface that you can attach to a virtual machine (VM) in a Net.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli LinkNic --DeviceNumber=devicenumber --VmId=vmid --NicId=nicid [OPTIONS]\n" "Attaches a network interface card (NIC) to a virtual machine (VM).\nThe \n" "interface and the VM must be in the same Subregion. The VM can be either \n" "`running` or `stopped`. The NIC must be in the `available` state. For more \n" "information, see [Attaching a NIC to a \n" "VM](https://docs.outscale.com/en/userguide/Attaching-a-NIC-to-a-VM.html).\n" "\nRequired Argument: DeviceNumber, VmId, NicId \n" + "Usage: oapi-cli ReadPolicies [OPTIONS]\n" "Lists all the managed policies available for your account.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli LinkManagedPolicyToUserGroup --PolicyOrn=policyorn --UserGroupName=usergroupname [OPTIONS]\n" "Links a managed policy to a specific group. This policy applies to all the \n" "users contained in this group.\n" "\nRequired Argument: PolicyOrn, UserGroupName \n" + "Usage: oapi-cli ReadPolicy --PolicyOrn=policyorn [OPTIONS]\n" "Lists information about a specified managed policy.\n" "\nRequired Argument: PolicyOrn \n" , - "Usage: oapi-cli LinkLoadBalancerBackendMachines --LoadBalancerName=loadbalancername [OPTIONS]\n" "Attaches one or more virtual machines (VMs) to a specified load balancer. You \n" "need to specify at least the `BackendIps` or the `BackendVmIds` parameter.\nThe \n" "VMs can be in different Subnets and different Subregions than the load \n" "balancer, as long as the VMs and load balancers are all in the public Cloud or \n" "all in the same Net. It may take a little time for a VM to be registered with \n" "the load balancer. Once the VM is registered with a load balancer, it receives \n" "traffic and requests from this load balancer and is called a backend VM.\n" "\nRequired Argument: LoadBalancerName \n" + "Usage: oapi-cli ReadPolicyVersion --PolicyOrn=policyorn --VersionId=versionid [OPTIONS]\n" "Lists information about a specified version of a managed policy.\n" "\nRequired Argument: PolicyOrn VersionId \n" , - "Usage: oapi-cli LinkInternetService --InternetServiceId=internetserviceid --NetId=netid [OPTIONS]\n" "Attaches an Internet service to a Net.\nTo enable the connection between the \n" "Internet and a Net, you must attach an Internet service to this Net.\n" "\nRequired Argument: InternetServiceId, NetId \n" + "Usage: oapi-cli ReadPolicyVersions --PolicyOrn=policyorn [OPTIONS]\n" "Lists information about all the policy versions of a specified managed policy.\n" "\nRequired Argument: PolicyOrn \n" , - "Usage: oapi-cli LinkFlexibleGpu --FlexibleGpuId=flexiblegpuid --VmId=vmid [OPTIONS]\n" "Attaches one of your allocated flexible GPUs (fGPUs) to one of your virtual \n" "machines (VMs).\nTo complete the linking of the fGPU, you need to do a \n" "stop/start of the VM. A simple restart is not sufficient, as the linking of the \n" "fGPU is done when the VM goes through the `stopped` state. For the difference \n" "between stop/start and restart, see [About VM \n" "Lifecycle](https://docs.outscale.com/en/userguide/About-VM-Lifecycle.html).\n\n*\n" "*[NOTE]**\nYou can attach fGPUs only to VMs with the `highest` (1) performance \n" "flag. For more information see [About Flexible \n" "GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html) and [VM \n" "Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" "\nRequired Argument: FlexibleGpuId, VmId \n" + "Usage: oapi-cli ReadProductTypes [OPTIONS]\n" "Lists one or more product types.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeregisterVmsInLoadBalancer --BackendVmIds=backendvmids --LoadBalancerName=loadbalancername [OPTIONS]\n" "Deregisters a specified virtual machine (VM) from a load balancer.\n" "\nRequired Argument: BackendVmIds, LoadBalancerName \n" + "Usage: oapi-cli ReadPublicCatalog [OPTIONS]\n" "Returns the price list of OUTSCALE products and services for the Region \n" "specified in the endpoint of the request. For more information, see [About \n" "Regions and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-and-Subregions.\n" "html).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteVpnConnectionRoute --DestinationIpRange=destinationiprange --VpnConnectionId=vpnconnectionid [OPTIONS]\n" "Deletes a static route to a VPN connection previously created using the \n" "CreateVpnConnectionRoute method.\n" "\nRequired Argument: DestinationIpRange, VpnConnectionId \n" + "Usage: oapi-cli ReadPublicIpRanges [OPTIONS]\n" "Gets the public IPv4 addresses in CIDR notation for the Region specified in the \n" "endpoint of the request. For more information, see [About Regions and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-and-Subregions.\n" "html).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteVpnConnection --VpnConnectionId=vpnconnectionid [OPTIONS]\n" "Deletes a specified VPN connection.\nIf you want to delete a Net and all its \n" "dependencies, we recommend to detach the virtual gateway from the Net and \n" "delete the Net before deleting the VPN connection. This enables you to delete \n" "the Net without waiting for the VPN connection to be deleted.\n" "\nRequired Argument: VpnConnectionId \n" + "Usage: oapi-cli ReadPublicIps [OPTIONS]\n" "Lists one or more public IPs allocated to your account.\nBy default, this \n" "action returns information about all your public IPs: available or associated \n" "with a virtual machine (VM), a network interface card (NIC) or a NAT service.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteVolume --VolumeId=volumeid [OPTIONS]\n" "Deletes a specified Block Storage Unit (BSU) volume.\nYou can delete available \n" "volumes only, that is, volumes that are not attached to a virtual machine (VM).\n" "\nRequired Argument: VolumeId \n" + "Usage: oapi-cli ReadQuotas [OPTIONS]\n" "Lists one or more of your quotas.\nFor more information, see [About Your \n" "Account](https://docs.outscale.com/en/userguide/About-Your-Account.html).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteVms --VmIds=vmids [OPTIONS]\n" "Terminates one or more virtual machines (VMs).\nThis operation is idempotent, \n" "that means that all calls succeed if you terminate a VM more than once.\n" "\nRequired Argument: VmIds \n" + "Usage: oapi-cli ReadRegions [OPTIONS]\n" "Lists one or more Regions of the OUTSCALE Cloud.\nFor more information, see \n" "[About Regions and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-and-Subregions.\n" "html).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteVmTemplate --VmTemplateId=vmtemplateid [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nDeletes a virtual machine (VM) template.\nYou cannot delete a \n" "template currently used by a VM group.\n" "\nRequired Argument: VmTemplateId \n" + "Usage: oapi-cli ReadRouteTables [OPTIONS]\n" "Lists one or more of your route tables.\nIn your Net, each Subnet must be \n" "associated with a route table. If a Subnet is not explicitly associated with a \n" "route table, it is implicitly associated with the main route table of the Net.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteVmGroup --VmGroupId=vmgroupid [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nDeletes a specified VM group.\n" "\nRequired Argument: VmGroupId \n" + "Usage: oapi-cli ReadSecretAccessKey --AccessKeyId=accesskeyid [OPTIONS]\n" "> [WARNING]\n> Deprecated: This call will be removed after October 1, \n" "2024.\n\nLists information about the specified access key of your root account, \n" "including its secret key.\n" "\nRequired Argument: AccessKeyId \n" , - "Usage: oapi-cli DeleteVirtualGateway --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Deletes a specified virtual gateway.\nBefore deleting a virtual gateway, we \n" "recommend to detach it from the Net and delete the VPN connection.\n" "\nRequired Argument: VirtualGatewayId \n" + "Usage: oapi-cli ReadSecurityGroups [OPTIONS]\n" "Lists one or more security groups.\nYou can specify either the name of the \n" "security groups or their IDs.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteUserGroupPolicy --UserGroupName=usergroupname --PolicyName=policyname [OPTIONS]\n" "Deletes a specified inline policy from a specific group.\n" "\nRequired Argument: UserGroupName, PolicyName \n" + "Usage: oapi-cli ReadServerCertificates [OPTIONS]\n" "Lists your server certificates.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteUserGroup --UserGroupName=usergroupname [OPTIONS]\n" "Deletes a specified user group.\n\n**[WARNING]**\nThe user group must be empty \n" "of any user and must not have any linked policy. Otherwise, you need to force \n" "the deletion.\nIf you force the deletion, all inline policies will be deleted \n" "with the user group.\n" "\nRequired Argument: UserGroupName \n" + "Usage: oapi-cli ReadSnapshotExportTasks [OPTIONS]\n" "Lists one or more snapshot export tasks.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteUser --UserName=username [OPTIONS]\n" "Deletes a specified EIM user. The EIM user must not belong to any group, nor \n" "have any key or linked policy.\n" "\nRequired Argument: UserName \n" + "Usage: oapi-cli ReadSnapshots [OPTIONS]\n" "Lists one or more snapshots that are available to you and the permissions to \n" "create volumes from them.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteTags --ResourceIds=resourceids --Tags=tags [OPTIONS]\n" "Deletes one or more tags from the specified resources.\n" "\nRequired Argument: ResourceIds, Tags \n" + "Usage: oapi-cli ReadSubnets [OPTIONS]\n" "Lists one or more of your Subnets.\nIf you do not specify any Subnet ID, this \n" "action describes all of your Subnets.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteSubnet --SubnetId=subnetid [OPTIONS]\n" "Deletes a specified Subnet.\nBefore deleting the Subnet, you need to delete all \n" "resources associated with the Subnet:\n\n* Virtual machines (VMs)\n* Network \n" "Interface Cards (NICs)\n* NAT services\n* Load balancers\n" "\nRequired Argument: SubnetId \n" + "Usage: oapi-cli ReadSubregions [OPTIONS]\n" "Lists one or more of the enabled Subregions that you can access in the current \n" "Region.\n\nFor more information, see [About Regions and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-and-Subregions.\n" "html).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteSnapshot --SnapshotId=snapshotid [OPTIONS]\n" "Deletes a specified snapshot.\nYou cannot delete a snapshot that is currently \n" "used by an OUTSCALE machine image (OMI). To do so, you first need to delete the \n" "corresponding OMI. For more information, see the [DeleteImage](#deleteimage) \n" "method.\n" "\nRequired Argument: SnapshotId \n" + "Usage: oapi-cli ReadTags [OPTIONS]\n" "Lists one or more tags for your resources.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteServerCertificate --Name=name [OPTIONS]\n" "Deletes a specified server certificate.\n" "\nRequired Argument: Name \n" + "Usage: oapi-cli ReadUnitPrice --Operation=operation --Service=service --Type=type [OPTIONS]\n" "Gets unit price information for the specified parameters.\n" "\nRequired Argument: Operation Service Type \n" , - "Usage: oapi-cli DeleteSecurityGroupRule --SecurityGroupId=securitygroupid --Flow=flow [OPTIONS]\n" "Deletes one or more inbound or outbound rules from a security group. For the \n" "rule to be deleted, the values specified in the deletion request must exactly \n" "match the value of the existing rule.\nIn case of TCP and UDP protocols, you \n" "have to indicate the destination port or range of ports. In case of ICMP \n" "protocol, you have to specify the ICMP type and code numbers.\nRules (IP \n" "permissions) consist of the protocol, IP range or source security group.\nTo \n" "remove outbound access to a destination security group, we recommend to use a \n" "set of IP permissions. We also recommend to specify the protocol in a set of IP \n" "permissions.\n" "\nRequired Argument: SecurityGroupId, Flow \n" + "Usage: oapi-cli ReadUserGroupPolicies --UserGroupName=usergroupname [OPTIONS]\n" "Lists the names of the inline policies embedded in a specific group.\n" "\nRequired Argument: UserGroupName \n" , - "Usage: oapi-cli DeleteSecurityGroup [OPTIONS]\n" "Deletes a specified security group.\nYou can specify either the name of the \n" "security group or its ID.\nThis action fails if the specified group is \n" "associated with a virtual machine (VM) or referenced by another security group.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadUserGroupPolicy --PolicyName=policyname --UserGroupName=usergroupname [OPTIONS]\n" "Returns information about an inline policy included in a specified group.\n" "\nRequired Argument: PolicyName UserGroupName \n" , - "Usage: oapi-cli DeleteRouteTable --RouteTableId=routetableid [OPTIONS]\n" "Deletes a specified route table.\nBefore deleting a route table, you must \n" "disassociate it from any Subnet. You cannot delete the main route table.\n" "\nRequired Argument: RouteTableId \n" + "Usage: oapi-cli ReadUserGroup --UserGroupName=usergroupname [OPTIONS]\n" "Lists information about a specified user group, including its users.\n" "\nRequired Argument: UserGroupName \n" , - "Usage: oapi-cli DeleteRoute --RouteTableId=routetableid --DestinationIpRange=destinationiprange [OPTIONS]\n" "Deletes a route from a specified route table.\n" "\nRequired Argument: RouteTableId, DestinationIpRange \n" + "Usage: oapi-cli ReadUserGroupsPerUser --UserName=username [OPTIONS]\n" "Lists the groups a specified user belongs to.\n" "\nRequired Argument: UserName \n" , - "Usage: oapi-cli DeletePublicIp [OPTIONS]\n" "Releases a public IP.\nYou can release a public IP associated with your \n" "account. This address is released in the public IP pool and can be used by \n" "someone else. Before releasing a public IP, ensure you updated all your \n" "resources communicating with this address.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadUserGroups [OPTIONS]\n" "Lists the groups with the specified path prefix.\nIf you do not specify any \n" "path prefix, this action returns all the groups (or an empty list if there are \n" "none).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeletePolicyVersion --PolicyOrn=policyorn --VersionId=versionid [OPTIONS]\n" "Deletes a specified version of a managed policy, if it is not set as the \n" "default one.\n" "\nRequired Argument: PolicyOrn, VersionId \n" + "Usage: oapi-cli ReadUsers [OPTIONS]\n" "Lists all EIM users that have a specified path.\nIf you do not specify a path, \n" "this action returns a list of all users in the account (or an empty list if \n" "there are none).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeletePolicy --PolicyOrn=policyorn [OPTIONS]\n" "Deletes a managed policy.\nBefore deleting a managed policy, you must unlink \n" "all users linked to it and delete all the versions of the policy using the \n" "`DeletePolicyVersion` method.\n" "\nRequired Argument: PolicyOrn \n" + "Usage: oapi-cli ReadVirtualGateways [OPTIONS]\n" "Lists one or more virtual gateways.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteNic --NicId=nicid [OPTIONS]\n" "Deletes the specified network interface card (NIC).\nThe network interface must \n" "not be attached to any virtual machine (VM).\n" "\nRequired Argument: NicId \n" + "Usage: oapi-cli ReadVmGroups [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nLists one or more group of virtual machines (VMs).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteNetPeering --NetPeeringId=netpeeringid [OPTIONS]\n" "Deletes a Net peering.\nIf the Net peering is in the `active` state, it can be \n" "deleted either by the owner of the requester Net or the owner of the peer \n" "Net.\nIf it is in the `pending-acceptance` state, it can be deleted only by the \n" "owner of the requester Net.\nIf it is in the `rejected`, `failed`, or `expired` \n" "states, it cannot be deleted.\n" "\nRequired Argument: NetPeeringId \n" + "Usage: oapi-cli ReadVmTemplates [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nLists one or more virtual machine (VM) templates.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteNetAccessPoint --NetAccessPointId=netaccesspointid [OPTIONS]\n" "Deletes a specified Net access point.\nThis action also deletes the \n" "corresponding routes added to the route tables you specified for the Net access \n" "point.\n" "\nRequired Argument: NetAccessPointId \n" + "Usage: oapi-cli ReadVmTypes [OPTIONS]\n" "Lists one or more predefined VM types.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteNet --NetId=netid [OPTIONS]\n" "Deletes a specified Net.\nBefore deleting the Net, you need to delete or detach \n" "all the resources associated with the Net:\n\n* Virtual machines (VMs)\n* Net \n" "peerings\n* Custom route tables\n* Public IPs allocated to resources in the \n" "Net\n* Network Interface Cards (NICs) created in the Subnets\n* Virtual \n" "gateways, Internet services and NAT services\n* Load balancers\n* Security \n" "groups\n* Subnets\n" "\nRequired Argument: NetId \n" + "Usage: oapi-cli ReadVmsHealth --LoadBalancerName=loadbalancername [OPTIONS]\n" "Lists the state of one or more backend virtual machines (VMs) registered with a \n" "specified load balancer.\n" "\nRequired Argument: LoadBalancerName \n" , - "Usage: oapi-cli DeleteNatService --NatServiceId=natserviceid [OPTIONS]\n" "Deletes a specified network address translation (NAT) service.\nThis action \n" "disassociates the public IP from the NAT service, but does not release this \n" "public IP from your account. However, it does not delete any NAT service routes \n" "in your route tables.\n" "\nRequired Argument: NatServiceId \n" + "Usage: oapi-cli ReadVms [OPTIONS]\n" "Lists one or more of your virtual machines (VMs).\nIf you provide one or more \n" "VM IDs, this action returns a description for all of these VMs. If you do not \n" "provide any VM ID, this action returns a description for all of the VMs that \n" "belong to you. If you provide an invalid VM ID, an error is returned. If you \n" "provide the ID of a VM that does not belong to you, the description of this VM \n" "is not included in the response. The refresh interval for data returned by this \n" "action is one hour, meaning that a terminated VM may appear in the response.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteLoadBalancerTags --LoadBalancerNames=loadbalancernames --Tags=tags [OPTIONS]\n" "Deletes one or more tags from the specified load balancers.\n" "\nRequired Argument: LoadBalancerNames, Tags \n" + "Usage: oapi-cli ReadVmsState [OPTIONS]\n" "Lists the status of one or more virtual machines (VMs).\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteLoadBalancerPolicy --LoadBalancerName=loadbalancername --PolicyName=policyname [OPTIONS]\n" "Deletes a specified policy from a load balancer.\nIn order to be deleted, the \n" "policy must not be enabled for any listener.\n" "\nRequired Argument: LoadBalancerName, PolicyName \n" + "Usage: oapi-cli ReadVolumes [OPTIONS]\n" "Lists one or more specified Block Storage Unit (BSU) volumes.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteLoadBalancerListeners --LoadBalancerName=loadbalancername --LoadBalancerPorts=loadbalancerports [OPTIONS]\n" "Deletes listeners of a specified load balancer.\n" "\nRequired Argument: LoadBalancerName, LoadBalancerPorts \n" + "Usage: oapi-cli ReadVpnConnections [OPTIONS]\n" "Lists one or more VPN connections.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli DeleteLoadBalancer --LoadBalancerName=loadbalancername [OPTIONS]\n" "Deletes a specified load balancer.\n" "\nRequired Argument: LoadBalancerName \n" + "Usage: oapi-cli RebootVms --VmIds=vmids [OPTIONS]\n" "Reboots one or more virtual machines (VMs).\nThis operation sends a reboot \n" "request to one or more specified VMs. This is an asynchronous action that \n" "queues this reboot request. This action only reboots VMs that are valid and \n" "that belong to you.\n" "\nRequired Argument: VmIds \n" , - "Usage: oapi-cli DeleteListenerRule --ListenerRuleName=listenerrulename [OPTIONS]\n" "Deletes a listener rule.\nThe previously active rule is disabled after deletion.\n" "\nRequired Argument: ListenerRuleName \n" + "Usage: oapi-cli RegisterVmsInLoadBalancer --BackendVmIds=backendvmids --LoadBalancerName=loadbalancername [OPTIONS]\n" "Registers one or more virtual machines (VMs) with a specified load \n" "balancer.\nThe VMs can be in different Subnets and different Subregions than \n" "the load balancer, as long as the VMs and load balancers are all in the public \n" "Cloud or all in the same Net. It may take a little time for a VM to be \n" "registered with the load balancer. Once the VM is registered with a load \n" "balancer, it receives traffic and requests from this load balancer and is \n" "called a backend VM.\n" "\nRequired Argument: BackendVmIds LoadBalancerName \n" , - "Usage: oapi-cli DeleteKeypair --KeypairName=keypairname [OPTIONS]\n" "Deletes the specified keypair.\nThis action deletes the public key stored by \n" "3DS OUTSCALE, thus deleting the keypair.\n" "\nRequired Argument: KeypairName \n" + "Usage: oapi-cli RejectNetPeering --NetPeeringId=netpeeringid [OPTIONS]\n" "Rejects a Net peering request.\nThe Net peering must be in the \n" "`pending-acceptance` state to be rejected. The rejected Net peering is then in \n" "the `rejected` state.\n" "\nRequired Argument: NetPeeringId \n" , - "Usage: oapi-cli DeleteInternetService --InternetServiceId=internetserviceid [OPTIONS]\n" "Deletes an Internet service.\nBefore deleting an Internet service, you must \n" "detach it from any Net it is attached to.\n" "\nRequired Argument: InternetServiceId \n" + "Usage: oapi-cli RemoveUserFromUserGroup --UserGroupName=usergroupname --UserName=username [OPTIONS]\n" "Removes a specified user from a specified group.\n" "\nRequired Argument: UserGroupName UserName \n" , - "Usage: oapi-cli DeleteImage --ImageId=imageid [OPTIONS]\n" "Deletes an OUTSCALE machine image (OMI) so that you cannot use it anymore to \n" "launch virtual machines (VMs). However, you can still use VMs already launched \n" "from this OMI.\n" "\nRequired Argument: ImageId \n" + "Usage: oapi-cli ScaleDownVmGroup --VmGroupId=vmgroupid --VmSubtraction=vmsubtraction [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nDeletes virtual machines (VMs) from a VM group.\nThe oldest VMs \n" "are the first to be deleted.\n" "\nRequired Argument: VmGroupId VmSubtraction \n" , - "Usage: oapi-cli DeleteFlexibleGpu --FlexibleGpuId=flexiblegpuid [OPTIONS]\n" "Releases a flexible GPU (fGPU) from your account.\nThe fGPU becomes free to be \n" "used by someone else.\n" "\nRequired Argument: FlexibleGpuId \n" + "Usage: oapi-cli ScaleUpVmGroup --VmGroupId=vmgroupid --VmAddition=vmaddition [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nCreates additional virtual machines (VMs) in a VM group.\nThe new \n" "VMs use the current version of the VM template.\n" "\nRequired Argument: VmGroupId VmAddition \n" , - "Usage: oapi-cli DeleteExportTask --ExportTaskId=exporttaskid [OPTIONS]\n" "Deletes an export task.\nIf the export task is not running, the command fails \n" "and an error is returned.\n" "\nRequired Argument: ExportTaskId \n" + "Usage: oapi-cli SetDefaultPolicyVersion --PolicyOrn=policyorn --VersionId=versionid [OPTIONS]\n" "Sets a specified version of a managed policy as the default (operative) \n" "one.\nYou can modify the default version of a policy at any time.\n" "\nRequired Argument: PolicyOrn VersionId \n" , - "Usage: oapi-cli DeleteDirectLinkInterface --DirectLinkInterfaceId=directlinkinterfaceid [OPTIONS]\n" "Deletes a specified DirectLink interface.\n" "\nRequired Argument: DirectLinkInterfaceId \n" + "Usage: oapi-cli StartVms --VmIds=vmids [OPTIONS]\n" "Start one or more virtual machines (VMs).\nYou can start only VMs that are \n" "valid and that belong to you.\n" "\nRequired Argument: VmIds \n" , - "Usage: oapi-cli DeleteDirectLink --DirectLinkId=directlinkid [OPTIONS]\n" "Deletes a specified DirectLink.\nBefore deleting a DirectLink, ensure that all \n" "your DirectLink interfaces related to this DirectLink are deleted.\n" "\nRequired Argument: DirectLinkId \n" + "Usage: oapi-cli StopVms --VmIds=vmids [OPTIONS]\n" "Stops one or more running virtual machines (VMs).\nYou can stop only VMs that \n" "are valid and that belong to you. Data stored in the VM RAM is lost.\n" "\nRequired Argument: VmIds \n" , - "Usage: oapi-cli DeleteDhcpOptions --DhcpOptionsSetId=dhcpoptionssetid [OPTIONS]\n" "Deletes a specified DHCP options set.\nBefore deleting a DHCP options set, you \n" "must disassociate it from the Nets you associated it with. To do so, you need \n" "to associate with each Net a new set of DHCP options, or the `default` one if \n" "you do not want to associate any DHCP options with the \n" "Net.\n\n**[IMPORTANT]**\nYou cannot delete the `default` set.\n" "\nRequired Argument: DhcpOptionsSetId \n" + "Usage: oapi-cli UnlinkFlexibleGpu --FlexibleGpuId=flexiblegpuid [OPTIONS]\n" "Detaches a flexible GPU (fGPU) from a virtual machine (VM).\nThe fGPU is in the \n" "`detaching` state until the VM is stopped, after which it becomes `allocated`. \n" "It is then available again for attachment to a VM.\n" "\nRequired Argument: FlexibleGpuId \n" , - "Usage: oapi-cli DeleteDedicatedGroup --DedicatedGroupId=dedicatedgroupid [OPTIONS]\n" "> [WARNING]\n> This feature is currently in beta.\n\nDeletes a specified \n" "dedicated group of virtual machines (VMs).\n\n**[WARNING]**\nA dedicated group \n" "can be deleted only if no VM or Net is in the dedicated group. Otherwise, you \n" "need to force the deletion.\nIf you force the deletion:\n- all VMs are \n" "terminated.\n- all Nets are deleted, and all resources associated with Nets are \n" "detached.\n" "\nRequired Argument: DedicatedGroupId \n" + "Usage: oapi-cli UnlinkInternetService --InternetServiceId=internetserviceid --NetId=netid [OPTIONS]\n" "Detaches an Internet service from a Net.\nThis action disables and detaches an \n" "Internet service from a Net. The Net must not contain virtual machines (VMs) \n" "using public IPs nor internet-facing load balancers.\n" "\nRequired Argument: InternetServiceId NetId \n" , - "Usage: oapi-cli DeleteClientGateway --ClientGatewayId=clientgatewayid [OPTIONS]\n" "Deletes a client gateway.\nYou must delete the VPN connection before deleting \n" "the client gateway.\n" "\nRequired Argument: ClientGatewayId \n" + "Usage: oapi-cli UnlinkLoadBalancerBackendMachines --LoadBalancerName=loadbalancername [OPTIONS]\n" "Detaches one or more backend virtual machines (VMs) from a load balancer. You \n" "need to specify at least the `BackendIps` or the `BackendVmIds` parameter.\n" "\nRequired Argument: LoadBalancerName \n" , - "Usage: oapi-cli DeleteCa --CaId=caid [OPTIONS]\n" "Deletes a specified Client Certificate Authority (CA).\n" "\nRequired Argument: CaId \n" + "Usage: oapi-cli UnlinkManagedPolicyFromUserGroup --PolicyOrn=policyorn --UserGroupName=usergroupname [OPTIONS]\n" "Unlinks a managed policy from a specific group.\n" "\nRequired Argument: PolicyOrn UserGroupName \n" , - "Usage: oapi-cli DeleteApiAccessRule --ApiAccessRuleId=apiaccessruleid [OPTIONS]\n" "Deletes a specified API access rule.\n\n**[IMPORTANT]** \nYou cannot delete the \n" "last remaining API access rule. However, if you delete all the API access rules \n" "that allow you to access the APIs, you need to contact the Support team to \n" "regain access. For more information, see [Technical \n" "Support](https://docs.outscale.com/en/userguide/Technical-Support.html).\n" "\nRequired Argument: ApiAccessRuleId \n" + "Usage: oapi-cli UnlinkNic --LinkNicId=linknicid [OPTIONS]\n" "Detaches a network interface card (NIC) from a virtual machine (VM).\nThe \n" "primary NIC cannot be detached.\n" "\nRequired Argument: LinkNicId \n" , - "Usage: oapi-cli DeleteAccessKey --AccessKeyId=accesskeyid [OPTIONS]\n" "Deletes the specified access key of either your root account or an EIM \n" "user.\nThe access key of an EIM user must be in the `INACTIVE` state to be \n" "deleted.\n" "\nRequired Argument: AccessKeyId \n" + "Usage: oapi-cli UnlinkPolicy --PolicyOrn=policyorn --UserName=username [OPTIONS]\n" "Removes a managed policy from a specific user.\n" "\nRequired Argument: PolicyOrn UserName \n" , - "Usage: oapi-cli CreateVpnConnectionRoute --DestinationIpRange=destinationiprange --VpnConnectionId=vpnconnectionid [OPTIONS]\n" "Creates a static route to a VPN connection.\nThis enables you to select the \n" "network flows sent by the virtual gateway to the target VPN connection.\nFor \n" "more information, see [About Routing Configuration for VPN \n" "Connections](https://docs.outscale.com/en/userguide/About-Routing-Configuration-\n" "for-VPN-Connections.html).\n" "\nRequired Argument: DestinationIpRange, VpnConnectionId \n" + "Usage: oapi-cli UnlinkPrivateIps --NicId=nicid --PrivateIps=privateips [OPTIONS]\n" "Unassigns one or more secondary private IPs from a network interface card (NIC).\n" "\nRequired Argument: NicId PrivateIps \n" , - "Usage: oapi-cli CreateVpnConnection --ClientGatewayId=clientgatewayid --ConnectionType=connectiontype --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Creates a VPN connection between a specified virtual gateway and a specified \n" "client gateway.\nYou can create only one VPN connection between a virtual \n" "gateway and a client gateway.\n\n**[IMPORTANT]**\nThis action can be done only \n" "if the virtual gateway is in the `available` state.\nFor more information, see \n" "[About VPN \n" "Connections](https://docs.outscale.com/en/userguide/About-VPN-Connections.html).\n" "\nRequired Argument: ClientGatewayId, ConnectionType, VirtualGatewayId \n" + "Usage: oapi-cli UnlinkPublicIp [OPTIONS]\n" "Disassociates a public IP from the virtual machine (VM) or network interface \n" "card (NIC) it is associated with.\n\n**[IMPORTANT]**\nTo disassociate the \n" "public IP from a NAT service, you need to delete the NAT service. For more \n" "information, see the [DeleteNatService](#deletenatservice) method.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli CreateVolume --SubregionName=subregionname [OPTIONS]\n" "Creates a Block Storage Unit (BSU) volume in a specified Region.\nBSU volumes \n" "can be attached to a virtual machine (VM) in the same Subregion. You can create \n" "an empty volume or restore a volume from an existing snapshot.\nYou can create \n" "the following volume types: Enterprise (`io1`) for provisioned IOPS SSD \n" "volumes, Performance (`gp2`) for general purpose SSD volumes, or Magnetic \n" "(`standard`) volumes.\nFor more information, see [About \n" "Volumes](https://docs.outscale.com/en/userguide/About-Volumes.html).\n" "\nRequired Argument: SubregionName \n" + "Usage: oapi-cli UnlinkRouteTable --LinkRouteTableId=linkroutetableid [OPTIONS]\n" "Disassociates a Subnet from a route table.\nAfter disassociation, the Subnet \n" "can no longer use the routes in this route table, but uses the routes in the \n" "main route table of the Net instead.\n" "\nRequired Argument: LinkRouteTableId \n" , - "Usage: oapi-cli CreateVms --ImageId=imageid [OPTIONS]\n" "Creates virtual machines (VMs), and then launches them.\nThis action enables \n" "you to create a specified number of VMs using an OUTSCALE machine image (OMI) \n" "that you are allowed to use, and then to automatically launch them.\nThe VMs \n" "remain in the `pending` state until they are created and ready to be used. Once \n" "automatically launched, they are in the `running` state.\nTo check the state of \n" "your VMs, call the [ReadVms](#readvms) method.\nIf not specified, the security \n" "group used by the service is the default one.\nThe metadata server enables you \n" "to get the public key provided when the VM is launched. Official OMIs contain a \n" "script to get this public key and put it inside the VM to provide secure access \n" "without password.\nFor more information, see [About \n" "VMs](https://docs.outscale.com/en/userguide/About-VMs.html).\n" "\nRequired Argument: ImageId \n" + "Usage: oapi-cli UnlinkVirtualGateway --NetId=netid --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Detaches a virtual gateway from a Net.\nYou must wait until the virtual gateway \n" "is in the detached state before you can attach another Net to it or delete the \n" "Net it was previously attached to.\n" "\nRequired Argument: NetId VirtualGatewayId \n" , - "Usage: oapi-cli CreateVmTemplate --CpuCores=cpucores --CpuGeneration=cpugeneration --ImageId=imageid --Ram=ram --VmTemplateName=vmtemplatename [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nCreates a virtual machine (VM) template. You can then use the VM \n" "template to create VM groups.\nYou can create up to 50 VM templates in your \n" "account.\n" "\nRequired Argument: CpuCores, CpuGeneration, ImageId, Ram, VmTemplateName \n" + "Usage: oapi-cli UnlinkVolume --VolumeId=volumeid [OPTIONS]\n" "Detaches a Block Storage Unit (BSU) volume from a virtual machine (VM).\nTo \n" "detach the root device of a VM, this VM must be stopped.\n" "\nRequired Argument: VolumeId \n" , - "Usage: oapi-cli CreateVmGroup --SecurityGroupIds=securitygroupids --SubnetId=subnetid --VmGroupName=vmgroupname --VmTemplateId=vmtemplateid --VmCount=vmcount [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nCreates a group of virtual machines (VMs) containing the same \n" "characteristics as a specified VM template, and then launches them.\nYou can \n" "create up to 100 VM groups in your account.\n" "\nRequired Argument: SecurityGroupIds, SubnetId, VmGroupName, VmTemplateId, VmCount \n" + "Usage: oapi-cli UpdateAccessKey --AccessKeyId=accesskeyid --State=state [OPTIONS]\n" "Modifies the attributes of the specified access key of either your root account \n" "or an EIM user.\n" "\nRequired Argument: AccessKeyId State \n" , - "Usage: oapi-cli CreateVirtualGateway --ConnectionType=connectiontype [OPTIONS]\n" "Creates a virtual gateway.\nA virtual gateway is the access point on the Net \n" "side of a VPN connection.\nFor more information, see [About Virtual \n" "Gateways](https://docs.outscale.com/en/userguide/About-Virtual-Gateways.html).\n" "\nRequired Argument: ConnectionType \n" + "Usage: oapi-cli UpdateAccount [OPTIONS]\n" "Updates the account information for the account that sends the request.\n" "\nRequired Argument: null \n" , - "Usage: oapi-cli CreateUserGroup --UserGroupName=usergroupname [OPTIONS]\n" "Creates a group to which you can add users.\nYou can also add an inline policy \n" "or link a managed policy to the group, which is applied to all its users.\n" "\nRequired Argument: UserGroupName \n" + "Usage: oapi-cli UpdateApiAccessPolicy --MaxAccessKeyExpirationSeconds=maxaccesskeyexpirationseconds --RequireTrustedEnv=requiretrustedenv [OPTIONS]\n" "Updates the API access policy of your account.\n\n**[IMPORTANT]**\nOnly one API \n" "access policy can be associated with your account.\n" "\nRequired Argument: MaxAccessKeyExpirationSeconds RequireTrustedEnv \n" , - "Usage: oapi-cli CreateUser --UserName=username [OPTIONS]\n" "Creates an EIM user for your account.\nFor more information, see [About EIM \n" "Users](https://docs.outscale.com/en/userguide/About-EIM-Users.html).\n" "\nRequired Argument: UserName \n" + "Usage: oapi-cli UpdateApiAccessRule --ApiAccessRuleId=apiaccessruleid [OPTIONS]\n" "Modifies a specified API access rule.\n\n**[WARNING]** \n- The new rule you \n" "specify fully replaces the old rule. Therefore, for a parameter that is not \n" "specified, any previously set value is deleted.\n- If, as result of your \n" "modification, you no longer have access to the APIs, you will need to contact \n" "the Support team to regain access. For more information, see [Technical \n" "Support](https://docs.outscale.com/en/userguide/Technical-Support.html).\n" "\nRequired Argument: ApiAccessRuleId \n" , - "Usage: oapi-cli CreateTags --ResourceIds=resourceids --Tags=tags [OPTIONS]\n" "Adds one or more tags to the specified resources.\nIf a tag with the same key \n" "already exists for the resource, the tag value is replaced.\nYou can tag the \n" "following resources using their IDs:\n\n* Virtual machines (VMs) \n" "(i-xxxxxxxx)\n* OMIs (ami-xxxxxxxx)\n* Volumes (vol-xxxxxxxx)\n* Snapshots \n" "(snap-xxxxxxxx)\n* Public IPs (eipalloc-xxxxxxxx)\n* Security groups \n" "(sg-xxxxxxxx)\n* Route tables (rtb-xxxxxxxx)\n* Network interface cards (NIC) \n" "(eni-xxxxxxxx)\n* Nets (vpc-xxxxxxxx)\n* Subnets (subnet-xxxxxxxx)\n* Net \n" "peerings (vpcx-xxxxxxxx)\n* Net endpoints (vpce-xxxxxxxx)\n* NAT services \n" "(nat-xxxxxxxx)\n* Internet services (igw-xxxxxxxx)\n* Client gateways \n" "(cgw-xxxxxxxx)\n* Virtual gateways (vgw-xxxxxxxx)\n* VPN connections \n" "(vpn-xxxxxxxx)\n* DHCP options (dopt-xxxxxxxx)\n* OMI export tasks \n" "(image-export-xxxxxxxx)\n* Snapshot export tasks (snap-export-xxxxxxxx)\n\nFor \n" "more information, see [About \n" "Tags](https://docs.outscale.com/en/userguide/About-Tags.html).\n" "\nRequired Argument: ResourceIds, Tags \n" + "Usage: oapi-cli UpdateCa --CaId=caid [OPTIONS]\n" "Modifies the specified attribute of a Client Certificate Authority (CA).\n" "\nRequired Argument: CaId \n" , - "Usage: oapi-cli CreateSubnet --IpRange=iprange --NetId=netid [OPTIONS]\n" "Creates a Subnet in an existing Net.\nTo create a Subnet in a Net, you have to \n" "provide the ID of the Net and the IP range for the Subnet (its network range). \n" "Once the Subnet is created, you cannot modify its IP range.\nFor more \n" "information, see [About \n" "Nets](https://docs.outscale.com/en/userguide/About-Nets.html).\n" "\nRequired Argument: IpRange, NetId \n" + "Usage: oapi-cli UpdateDedicatedGroup --DedicatedGroupId=dedicatedgroupid --Name=name [OPTIONS]\n" "> [WARNING]\n> This feature is currently in beta.\n\nModifies the name of a \n" "specified dedicated group.\n" "\nRequired Argument: DedicatedGroupId Name \n" , - "Usage: oapi-cli CreateSnapshotExportTask --OsuExport=osuexport --SnapshotId=snapshotid [OPTIONS]\n" "Exports a snapshot to an OUTSCALE Object Storage (OOS) bucket that belongs to \n" "you. This action enables you to create a backup of your snapshot.\nYou can \n" "share this snapshot with others accounts by granting permission to read it via \n" "pre-signed URLs. For more information, see [Creating a Pre-Signed \n" "URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\nFo\n" "r more information, see [About \n" "Snapshots](https://docs.outscale.com/en/userguide/About-Snapshots.html).\n" "\nRequired Argument: OsuExport, SnapshotId \n" + "Usage: oapi-cli UpdateDirectLinkInterface --DirectLinkInterfaceId=directlinkinterfaceid --Mtu=mtu [OPTIONS]\n" "Modifies the maximum transmission unit (MTU) of a DirectLink interface.\n" "\nRequired Argument: DirectLinkInterfaceId Mtu \n" , - "Usage: oapi-cli CreateSnapshot [OPTIONS]\n" "Creates a snapshot. Snapshots are point-in-time images of a volume that you can \n" "use to back up your data or to create replicas of this volume.\nYou can use \n" "this method in three different ways:\n* **Creating from a volume**: You create \n" "a snapshot from one of your volumes.\n* **Copying a snapshot**: You copy an \n" "existing snapshot. The source snapshot can be one of your own snapshots, or a \n" "snapshot owned by another account that has granted you permission via the \n" "[UpdateSnapshot](#updatesnapshot) method.\n* **Importing from a bucket**: You \n" "import a snapshot located in an OUTSCALE Object Storage (OOS) bucket. First, \n" "the owner of the source snapshot must export it to a bucket by using the \n" "[CreateSnapshotExportTask](#createsnapshotexporttask) method. Then, they must \n" "grant you permission to read the snapshot via a pre-signed URL. For more \n" "information, see [Creating a Pre-Signed \n" "URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\n\n\n" "**[NOTE]**\nIn case of excessive use of the snapshot creation feature on the \n" "same volume over a short period of time, 3DS OUTSCALE reserves the right to \n" "temporarily block the feature.\n\nFor more information, see [About \n" "Snapshots](https://docs.outscale.com/en/userguide/About-Snapshots.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli UpdateFlexibleGpu --FlexibleGpuId=flexiblegpuid [OPTIONS]\n" "Modifies a flexible GPU (fGPU) behavior.\n" "\nRequired Argument: FlexibleGpuId \n" , - "Usage: oapi-cli CreateServerCertificate --Body=body --PrivateKey=privatekey --Name=name [OPTIONS]\n" "Creates a server certificate and its matching private key.\nThese elements can \n" "be used with other services (for example, to configure SSL termination on load \n" "balancers).\nYou can also specify the chain of intermediate certification \n" "authorities if your certificate is not directly signed by a root one. You can \n" "specify multiple intermediate certification authorities in the \n" "`CertificateChain` parameter. To do so, concatenate all certificates in the \n" "correct order (the first certificate must be the authority of your certificate, \n" "the second must be the authority of the first one, and so on).\nThe private key \n" "must be a RSA key in PKCS1 form. To check this, open the PEM file and ensure \n" "its header reads as follows: BEGIN RSA PRIVATE KEY.\n[IMPORTANT]\nThis private \n" "key must not be protected by a password or a passphrase.\nFor more information, \n" "see [About Server Certificates in \n" "EIM](https://docs.outscale.com/en/userguide/About-Server-Certificates-in-EIM.htm\n" "l).\n" "\nRequired Argument: Body, PrivateKey, Name \n" + "Usage: oapi-cli UpdateImage --ImageId=imageid [OPTIONS]\n" "Modifies the access permissions for an OUTSCALE machine image (OMI).\nYou must \n" "specify either the `Additions` or the `Removals` parameter.\nAfter sharing an \n" "OMI with an account, the other account can create a copy of it that they own. \n" "For more information about copying OMIs, see [CreateImage](#createimage).\n" "\nRequired Argument: ImageId \n" , - "Usage: oapi-cli CreateSecurityGroupRule --SecurityGroupId=securitygroupid --Flow=flow [OPTIONS]\n" "Adds one or more rules to a security group.\nUse the `SecurityGroupId` \n" "parameter to specify the security group for which you want to create a \n" "rule.\nUse the `Flow` parameter to specify if you want an inbound rule or an \n" "outbound rule.\nAn inbound rule allows the security group to receive \n" "traffic:\n* Either from a specific IP range (`IpRange` parameter) on a specific \n" "port range (`FromPortRange` and `ToPortRange` parameters) and specific protocol \n" "(`IpProtocol` parameter).\n* Or from another specific security group \n" "(`SecurityGroupAccountIdToLink` and `SecurityGroupNameToLink` \n" "parameters).\n\n(Net only) An outbound rule works similarly but allows the \n" "security group to send traffic rather than receive traffic.\n\nAlternatively, \n" "you can use the `Rules` parameter to add several rules at the same \n" "time.\n\n**[NOTE]**\n* The modifications are effective as quickly as possible, \n" "but a small delay may occur.\n* By default, traffic between two security groups \n" "is allowed through both public and private IPs. To restrict traffic to private \n" "IPs only, contact our Support team at support@outscale.com.\n\nFor more \n" "information, see [About Security Group \n" "Rules](https://docs.outscale.com/en/userguide/About-Security-Group-Rules.html).\n" "\nRequired Argument: SecurityGroupId, Flow \n" + "Usage: oapi-cli UpdateListenerRule --ListenerRuleName=listenerrulename [OPTIONS]\n" "Updates the pattern of the listener rule.\nThis call updates the pattern \n" "matching algorithm for incoming traffic.\n" "\nRequired Argument: ListenerRuleName \n" , - "Usage: oapi-cli CreateSecurityGroup --Description=description --SecurityGroupName=securitygroupname [OPTIONS]\n" "Creates a security group.\nThis action creates a security group either in the \n" "public Cloud or in a specified Net. By default, a default security group for \n" "use in the public Cloud and a default security group for use in a Net are \n" "created.\nWhen launching a virtual machine (VM), if no security group is \n" "explicitly specified, the appropriate default security group is assigned to the \n" "VM. Default security groups include a default rule granting VMs network access \n" "to each other.\nWhen creating a security group, you specify a name. Two \n" "security groups for use in the public Cloud or for use in a Net cannot have the \n" "same name.\nYou can have up to 500 security groups in the public Cloud. You can \n" "create up to 500 security groups per Net.\nTo add or remove rules, use the \n" "[CreateSecurityGroupRule](#createsecuritygrouprule) method.\nFor more \n" "information, see [About Security \n" "Groups](https://docs.outscale.com/en/userguide/About-Security-Groups.html).\n" "\nRequired Argument: Description, SecurityGroupName \n" + "Usage: oapi-cli UpdateLoadBalancer --LoadBalancerName=loadbalancername [OPTIONS]\n" "Modifies the specified attribute of a load balancer. You can specify only one \n" "attribute at a time.\n\nYou can set a new SSL certificate to an SSL or HTTPS \n" "listener of a load balancer.\nThis certificate replaces any certificate used on \n" "the same load balancer and port.\n\nYou can also replace the currently enabled \n" "policy for the load balancer with another one.\nIf the `PolicyNames` parameter \n" "is empty, the currently enabled policy is disabled.\n" "\nRequired Argument: LoadBalancerName \n" , - "Usage: oapi-cli CreateRouteTable --NetId=netid [OPTIONS]\n" "Creates a route table for a specified Net.\nYou can then add routes and \n" "associate this route table with a Subnet.\nFor more information, see [About \n" "Route Tables](https://docs.outscale.com/en/userguide/About-Route-Tables.html).\n" "\nRequired Argument: NetId \n" + "Usage: oapi-cli UpdateNetAccessPoint --NetAccessPointId=netaccesspointid [OPTIONS]\n" "Modifies the attributes of a Net access point.\nThis action enables you to add \n" "or remove route tables associated with the specified Net access point.\n" "\nRequired Argument: NetAccessPointId \n" , - "Usage: oapi-cli CreateRoute --DestinationIpRange=destinationiprange --RouteTableId=routetableid [OPTIONS]\n" "Creates a route in a specified route table within a specified Net.\nYou must \n" "specify one of the following elements as the target:\n\n* Net peering\n* NAT \n" "VM\n* Internet service\n* Virtual gateway\n* NAT service\n* Network interface \n" "card (NIC)\n\nThe routing algorithm is based on the most specific match.\nFor \n" "more information, see [About Route \n" "Tables](https://docs.outscale.com/en/userguide/About-Route-Tables.html).\n" "\nRequired Argument: DestinationIpRange, RouteTableId \n" + "Usage: oapi-cli UpdateNet --DhcpOptionsSetId=dhcpoptionssetid --NetId=netid [OPTIONS]\n" "Associates a DHCP options set with a specified Net.\n" "\nRequired Argument: DhcpOptionsSetId NetId \n" , - "Usage: oapi-cli CreatePublicIp [OPTIONS]\n" "Acquires a public IP for your account.\nA public IP is a static IP designed for \n" "dynamic Cloud computing. It can be associated with a virtual machine (VM) in \n" "the public Cloud or in a Net, a network interface card (NIC), a NAT \n" "service.\nFor more information, see [About Public \n" "IPs](https://docs.outscale.com/en/userguide/About-Public-IPs.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli UpdateNic --NicId=nicid [OPTIONS]\n" "Modifies the specified network interface card (NIC). You can specify only one \n" "attribute at a time.\n" "\nRequired Argument: NicId \n" , - "Usage: oapi-cli CreateProductType --Description=description [OPTIONS]\n" "Creates a product type you can associate with an OMI for consumption monitoring \n" "and billing purposes.\n" "\nRequired Argument: Description \n" + "Usage: oapi-cli UpdateRoutePropagation --Enable=enable --RouteTableId=routetableid --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Configures the propagation of routes to a specified route table of a Net by a \n" "virtual gateway.\n" "\nRequired Argument: Enable RouteTableId VirtualGatewayId \n" , - "Usage: oapi-cli CreatePolicyVersion --Document=document --PolicyOrn=policyorn [OPTIONS]\n" "Creates a version of a specified managed policy.\nA managed policy can have up \n" "to five versions.\n" "\nRequired Argument: Document, PolicyOrn \n" + "Usage: oapi-cli UpdateRoute --RouteTableId=routetableid --DestinationIpRange=destinationiprange [OPTIONS]\n" "Replaces an existing route within a route table in a Net.\nYou must specify one \n" "of the following elements as the target:\n\n* Net peering\n* NAT virtual \n" "machine (VM)\n* Internet service\n* Virtual gateway\n* NAT service\n* Network \n" "interface card (NIC)\n\nThe routing algorithm is based on the most specific \n" "match.\n" "\nRequired Argument: RouteTableId DestinationIpRange \n" , - "Usage: oapi-cli CreatePolicy --Document=document --PolicyName=policyname [OPTIONS]\n" "Creates a managed policy to apply to a user.\nThis action creates a policy \n" "version and sets v1 as the default one.\n" "\nRequired Argument: Document, PolicyName \n" + "Usage: oapi-cli UpdateRouteTableLink --RouteTableId=routetableid --LinkRouteTableId=linkroutetableid [OPTIONS]\n" "Replaces the route table associated with a specific Subnet in a Net with \n" "another one.\nAfter the route table is replaced, the Subnet uses the routes in \n" "the new route table it is associated with.\n" "\nRequired Argument: RouteTableId LinkRouteTableId \n" , - "Usage: oapi-cli CreateNic --SubnetId=subnetid [OPTIONS]\n" "Creates a network interface card (NIC) in the specified Subnet.\nFor more \n" "information, see [About \n" "NICs](https://docs.outscale.com/en/userguide/About-NICs.html).\n" "\nRequired Argument: SubnetId \n" + "Usage: oapi-cli UpdateServerCertificate --Name=name [OPTIONS]\n" "Modifies the name and/or the path of a specified server certificate.\n" "\nRequired Argument: Name \n" , - "Usage: oapi-cli CreateNetPeering --AccepterNetId=accepternetid --SourceNetId=sourcenetid [OPTIONS]\n" "Requests a Net peering between a Net you own and a peer Net that belongs to you \n" "or another account.\nThis action creates a Net peering that remains in the \n" "`pending-acceptance` state until it is accepted by the owner of the peer Net. \n" "If the owner of the peer Net does not accept the request within 7 days, the \n" "state of the Net peering becomes `expired`. For more information, see \n" "[AcceptNetPeering](#acceptnetpeering).\n\n**[IMPORTANT]**\n* Peered Nets must \n" "contain at least one virtual machine (VM) each before the creation of the Net \n" "peering.\n* The two Nets must not have overlapping IP ranges. Otherwise, the \n" "Net peering is in the `failed` state.\n* A peering connection between two Nets \n" "works both ways. If an A-to-B connection is already created and accepted, \n" "creating a B-to-A connection is not necessary and would be automatically \n" "rejected.\n\nFor more information, see [About Net \n" "Peerings](https://docs.outscale.com/en/userguide/About-Net-Peerings.html).\n" "\nRequired Argument: AccepterNetId, SourceNetId \n" + "Usage: oapi-cli UpdateSnapshot --SnapshotId=snapshotid --PermissionsToCreateVolume=permissionstocreatevolume [OPTIONS]\n" "Modifies the permissions for a specified snapshot.\nYou must specify either the \n" "`Additions` or the `Removals` parameter.\nAfter sharing a snapshot with an \n" "account, the other account can create a copy of it that they own. For more \n" "information about copying snapshots, see [CreateSnapshot](#createsnapshot).\n" "\nRequired Argument: SnapshotId PermissionsToCreateVolume \n" , - "Usage: oapi-cli CreateNetAccessPoint --ServiceName=servicename --NetId=netid [OPTIONS]\n" "Creates a Net access point to access an OUTSCALE service from this Net without \n" "using the Internet and public IPs.\nYou specify the service using its name. For \n" "more information about the available services, see \n" "[ReadNetAccessPointServices](#readnetaccesspointservices). \nTo control the \n" "routing of traffic between the Net and the specified service, you can specify \n" "one or more route tables. Virtual machines placed in Subnets associated with \n" "the specified route table thus use the Net access point to access the service. \n" "When you specify a route table, a route is automatically added to it with the \n" "destination set to the prefix list ID of the service, and the target set to the \n" "ID of the access point.\nWhen a Net access point is created, a public IP is \n" "automatically allocated to your account and used for the Net access point. This \n" "public IP is not connected to the Internet. It is counted in your quota, but it \n" "is not billed. \nFor more information, see [About Net Access \n" "Points](https://docs.outscale.com/en/userguide/About-Net-Access-Points.html).\n" "\nRequired Argument: ServiceName, NetId \n" + "Usage: oapi-cli UpdateSubnet --SubnetId=subnetid --MapPublicIpOnLaunch=mappubliciponlaunch [OPTIONS]\n" "Modifies the specified attribute of a Subnet.\n" "\nRequired Argument: SubnetId MapPublicIpOnLaunch \n" , - "Usage: oapi-cli CreateNet --IpRange=iprange [OPTIONS]\n" "Creates a Net with a specified IP range.\nThe IP range (network range) of your \n" "Net must be between a /28 netmask (16 IPs) and a /16 netmask (65536 IPs).\nFor \n" "more information, see [About \n" "Nets](https://docs.outscale.com/en/userguide/About-Nets.html).\n" "\nRequired Argument: IpRange \n" + "Usage: oapi-cli UpdateUserGroup --UserGroupName=usergroupname [OPTIONS]\n" "Modifies the name and/or the path of a specified group.\n" "\nRequired Argument: UserGroupName \n" , - "Usage: oapi-cli CreateNatService --PublicIpId=publicipid --SubnetId=subnetid [OPTIONS]\n" "Creates a network address translation (NAT) service in the specified public \n" "Subnet of a Net.\nA NAT service enables virtual machines (VMs) placed in the \n" "private Subnet of this Net to connect to the Internet, without being accessible \n" "from the Internet.\nWhen creating a NAT service, you specify the allocation ID \n" "of the public IP you want to use as public IP for the NAT service. Once the NAT \n" "service is created, you need to create a route in the route table of the \n" "private Subnet, with 0.0.0.0/0 as destination and the ID of the NAT service as \n" "target. For more information, see [LinkPublicIP](#linkpublicip) and \n" "[CreateRoute](#createroute).\nThis action also enables you to create multiple \n" "NAT services in the same Net (one per public Subnet).\n\n**[IMPORTANT]**\nYou \n" "cannot modify the public IP associated with a NAT service after its creation. \n" "To do so, you need to delete the NAT service and create a new one with another \n" "public IP.\nFor more information, see [About NAT \n" "Services](https://docs.outscale.com/en/userguide/About-NAT-Services.html).\n" "\nRequired Argument: PublicIpId, SubnetId \n" + "Usage: oapi-cli UpdateUser --UserName=username [OPTIONS]\n" "Modifies the name and/or the path of a specified EIM user.\n" "\nRequired Argument: UserName \n" , - "Usage: oapi-cli CreateLoadBalancerTags --LoadBalancerNames=loadbalancernames --Tags=tags [OPTIONS]\n" "Adds one or more tags to the specified load balancers.\nIf a tag with the same \n" "key already exists for the load balancer, the tag value is replaced.\nFor more \n" "information, see [About \n" "Tags](https://docs.outscale.com/en/userguide/About-Tags.html).\n" "\nRequired Argument: LoadBalancerNames, Tags \n" + "Usage: oapi-cli UpdateVmGroup --VmGroupId=vmgroupid [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nModifies the specified attributes of a group of virtual machines \n" "(VMs).\n" "\nRequired Argument: VmGroupId \n" , - "Usage: oapi-cli CreateLoadBalancerPolicy --PolicyType=policytype --LoadBalancerName=loadbalancername --PolicyName=policyname [OPTIONS]\n" "Creates a stickiness policy with sticky session lifetimes defined by the \n" "browser lifetime.\nThe created policy can be used with HTTP or HTTPS listeners \n" "only.\nIf this policy is implemented by a load balancer, this load balancer \n" "uses this cookie in all incoming requests to direct them to the specified \n" "backend server virtual machine (VM). If this cookie is not present, the load \n" "balancer sends the request to any other server according to its load-balancing \n" "algorithm.\n\nYou can also create a stickiness policy with sticky session \n" "lifetimes following the lifetime of an application-generated cookie.\nUnlike \n" "the other type of stickiness policy, the lifetime of the special Load Balancer \n" "Unit (LBU) cookie follows the lifetime of the application-generated cookie \n" "specified in the policy configuration. The load balancer inserts a new \n" "stickiness cookie only when the application response includes a new application \n" "cookie.\nThe session stops being sticky if the application cookie is removed or \n" "expires, until a new application cookie is issued.\nFor more information, see \n" "[About Load \n" "Balancers](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).\n" "\nRequired Argument: PolicyType, LoadBalancerName, PolicyName \n" + "Usage: oapi-cli UpdateVm --VmId=vmid [OPTIONS]\n" "Modifies the specified attributes of a virtual machine (VM).\nYou must stop the \n" "VM before modifying the following attributes:\n* `NestedVirtualization`\n* \n" "`Performance`\n* `UserData`\n* `VmType`\n" "\nRequired Argument: VmId \n" , - "Usage: oapi-cli CreateLoadBalancerListeners --Listeners=listeners --LoadBalancerName=loadbalancername [OPTIONS]\n" "Creates one or more listeners for a specified load balancer.\nFor more \n" "information, see [About Load \n" "Balancers](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).\n" "\nRequired Argument: Listeners, LoadBalancerName \n" + "Usage: oapi-cli UpdateVmTemplate --VmTemplateId=vmtemplateid [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nModifies the specified attributes of a template of virtual \n" "machines (VMs).\n" "\nRequired Argument: VmTemplateId \n" , - "Usage: oapi-cli CreateLoadBalancer --Listeners=listeners --LoadBalancerName=loadbalancername [OPTIONS]\n" "Creates a load balancer.\nThe load balancer is created with a unique Domain \n" "Name Service (DNS) name. It receives the incoming traffic and routes it to its \n" "registered virtual machines (VMs).\nBy default, this action creates an \n" "Internet-facing load balancer, resolving to public IPs. To create an internal \n" "load balancer in a Net, resolving to private IPs, use the `LoadBalancerType` \n" "parameter.\nYou must specify either the `Subnets` or the `SubregionNames` \n" "parameters.\nFor more information, see [About Load \n" "Balancers](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).\n" "\nRequired Argument: Listeners, LoadBalancerName \n" + "Usage: oapi-cli UpdateVolume --VolumeId=volumeid [OPTIONS]\n" "Modifies the specified attributes of a volume.\nCold volumes are volumes that \n" "are attached to stopped or stopping VMs, or that are detached. Hot volumes are \n" "volumes that are attached to running VMs.\n\n**[NOTE]**\nWhen the modification \n" "is not instantaneous, the response displays the previous value. You can use the \n" "[ReadVolumes](#readvolumes) method to see the new value.\n" "\nRequired Argument: VolumeId \n" , - "Usage: oapi-cli CreateListenerRule --VmIds=vmids --Listener=listener --ListenerRule=listenerrule [OPTIONS]\n" "Creates a rule for traffic redirection for the specified listener. Each rule \n" "must have either the `HostNamePattern` or `PathPattern` parameter specified. \n" "Rules are treated in priority order, from the highest value to the lowest \n" "value.\nOnce the rule is created, you need to register backend VMs with it. For \n" "more information, see the \n" "[RegisterVmsInLoadBalancer](#registervmsinloadbalancer) method.\nFor more \n" "information, see [About Load \n" "Balancers](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).\n" "\nRequired Argument: VmIds, Listener, ListenerRule \n" + "Usage: oapi-cli UpdateVpnConnection --VpnConnectionId=vpnconnectionid [OPTIONS]\n" "Modifies the specified attributes of a VPN connection.\n" "\nRequired Argument: VpnConnectionId \n" , - "Usage: oapi-cli CreateKeypair --KeypairName=keypairname [OPTIONS]\n" "Creates a keypair to use with your virtual machines (VMs).\nYou can use this \n" "method in two different ways:\n* **Creating a keypair**: In that case, 3DS \n" "OUTSCALE creates a 2048-bit RSA keypair, stores its public key in your account, \n" "and returns its private key in the response of the call so that you can save it \n" "in a file.\nWhen you save the returned private key, make sure you replace the \n" "`\\n` escape sequences with real line breaks.\n* **Importing a keypair created \n" "locally**: If you already have a keypair that you have created locally with a \n" "third-party tool, you can import its public key in your account. The following \n" "types of key can be imported: RSA (2048 bits or preferably 4096 bits), Ed25519, \n" "and ECDSA (256 bits, 384 bits, or 521 bits). The following formats can be used: \n" "PEM, PKCS8, RFC4716, and OpenSSH.\n\nFor more information, see [About \n" "Keypairs](https://docs.outscale.com/en/userguide/About-Keypairs.html).\n" "\nRequired Argument: KeypairName \n" + NULL +}; + +static const char *calls_args_descriptions[] = { + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--NetPeeringId: string\n" + " The ID of the Net peering you want to accept.\n" , - "Usage: oapi-cli CreateInternetService [OPTIONS]\n" "Creates an Internet service you can use with a Net.\nAn Internet service \n" "enables virtual machines (VMs) launched in a Net to connect to the Internet. It \n" "allows routing of incoming and outgoing Internet traffic and management of \n" "public IP addresses.\nFor more information, see [About Internet \n" "Services](https://docs.outscale.com/en/userguide/About-Internet-Services.html).\n" "\nRequired Argument: \n" + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--UserGroupName: string\n" + " The name of the group you want to add a user to.\n" +"--UserGroupPath: string\n" + " The path to the group. If not specified, it is set to a slash (`/`).\n" +"--UserName: string\n" + " The name of the user you want to add to the group.\n" +"--UserPath: string\n" + " The path to the user. If not specified, it is set to a slash (`/`).\n" , - "Usage: oapi-cli CreateImageExportTask --OsuExport=osuexport --ImageId=imageid [OPTIONS]\n" "Exports an OUTSCALE machine image (OMI) to an OUTSCALE Object Storage (OOS) \n" "bucket.\nThis enables you to copy an OMI between accounts in different \n" "Regions.\nThis action creates the necessary snapshots and manifest file in the \n" "bucket. The OMI can then be imported to another account using a pre-signed URL \n" "of its manifest file. For more information, see [Creating a Pre-Signed \n" "URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\nTo\n" " copy an OMI in the same Region, you can also use the \n" "[CreateImage](#createimage) method.\n\n**[IMPORTANT]**\nYou cannot export a \n" "shared or public OMI, as they do not belong to you. To do so, you must first \n" "copy it to your account. The copy then belongs to you and you can export \n" "it.\nFor more information, see [About \n" "OMIs](https://docs.outscale.com/en/userguide/About-OMIs.html).\n" "\nRequired Argument: OsuExport, ImageId \n" + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Login: string\n" + " The email address of the account.\n" +"--Password: string\n" + " The password of the account.\n" , - "Usage: oapi-cli CreateImage [OPTIONS]\n" "Creates an OUTSCALE machine image (OMI).\nYou can use this method in different \n" "ways:\n* **Creating from a VM**: You create an OMI from one of your virtual \n" "machines (VMs).
\n* **Copying an OMI**: You copy an existing OMI. The source \n" "OMI can be one of your own OMIs, or an OMI owned by another account that has \n" "granted you permission via the [UpdateImage](#updateimage) method.
\n* \n" "**Registering from a snapshot**: You register an OMI from an existing snapshot. \n" "The source snapshot can be one of your own snapshots, or a snapshot owned by \n" "another account that has granted you permission via the \n" "[UpdateSnapshot](#updatesnapshot) method.
\n* **Registering from a bucket by \n" "using a manifest file**: You register an OMI from the manifest file of an OMI \n" "that was exported to an OUTSCALE Object Storage (OOS) bucket. First, the owner \n" "of the source OMI must export it to the bucket by using the \n" "[CreateImageExportTask](#createimageexporttask) method. Then, they must grant \n" "you permission to read the manifest file via a pre-signed URL. For more \n" "information, see [Creating a Pre-Signed \n" "URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\n\n\n" "**[TIP]**\nRegistering from a bucket enables you to copy an OMI across \n" "Regions.\n\nFor more information, see [About \n" "OMIs](https://docs.outscale.com/en/userguide/About-OMIs.html).\n" "\nRequired Argument: \n" + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--ExpirationDate: string\n" + " The date and time, or the date, at which you want the access key to expire, in ISO 8601 \n" + " format (for example, `2020-06-14T00:00:00.000Z`, or `2020-06-14`). To remove an existing \n" + " expiration date, use the method without specifying this parameter.\n" +"--UserName: string\n" + " The name of the EIM user that owns the key to be created. If you do not specify a user \n" + " name, this action creates an access key for the user who sends the request (which can be \n" + " the root account).\n" , - "Usage: oapi-cli CreateFlexibleGpu --ModelName=modelname --SubregionName=subregionname [OPTIONS]\n" "Allocates a flexible GPU (fGPU) to your account.\nYou can then attach this fGPU \n" "to a virtual machine (VM).\nFor more information, see [About Flexible \n" "GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html).\n" "\nRequired Argument: ModelName, SubregionName \n" + "--AdditionalEmails: array string\n" + " One or more additional email addresses for the account. These addresses are used for \n" + " notifications only. If you already have a list of additional emails registered, you cannot \n" + " add to it, only replace it. To remove all registered additional emails, specify an empty \n" + " list.\n" +"--City: string\n" + " The city of the account owner.\n" +"--CompanyName: string\n" + " The name of the company for the account.\n" +"--Country: string\n" + " The country of the account owner.\n" +"--CustomerId: string\n" + " The ID of the customer. It must be 8 digits.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Email: string\n" + " The main email address for the account. This address is used for your credentials and \n" + " notifications.\n" +"--FirstName: string\n" + " The first name of the account owner.\n" +"--JobTitle: string\n" + " The job title of the account owner.\n" +"--LastName: string\n" + " The last name of the account owner.\n" +"--MobileNumber: string\n" + " The mobile phone number of the account owner.\n" +"--PhoneNumber: string\n" + " The landline phone number of the account owner.\n" +"--StateProvince: string\n" + " The state/province of the account.\n" +"--VatNumber: string\n" + " The value added tax (VAT) number for the account.\n" +"--ZipCode: string\n" + " The ZIP code of the city.\n" , - "Usage: oapi-cli CreateDirectLinkInterface --DirectLinkId=directlinkid --DirectLinkInterface=directlinkinterface [OPTIONS]\n" "Creates a DirectLink interface.\nDirectLink interfaces enable you to reach one \n" "of your Nets through a virtual gateway.\nFor more information, see [About \n" "DirectLink](https://docs.outscale.com/en/userguide/About-DirectLink.html).\n" "\nRequired Argument: DirectLinkId, DirectLinkInterface \n" + "--CaIds: array string\n" + " One or more IDs of Client Certificate Authorities (CAs).\n" +"--Cns: array string\n" + " One or more Client Certificate Common Names (CNs). If this parameter is specified, you must \n" + " also specify the `CaIds` parameter.\n" +"--Description: string\n" + " A description for the API access rule.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--IpRanges: array string\n" + " One or more IPs or CIDR blocks (for example, `192.0.2.0/16`).\n" , - "Usage: oapi-cli CreateDirectLink --Bandwidth=bandwidth --DirectLinkName=directlinkname --Location=location [OPTIONS]\n" "Creates a DirectLink between a customer network and a specified DirectLink \n" "location.\nFor more information, see [About \n" "DirectLink](https://docs.outscale.com/en/userguide/About-DirectLink.html).\n" "\nRequired Argument: Bandwidth, DirectLinkName, Location \n" + "--CaPem: string\n" + " The CA in PEM format.With OSC CLI, use the following syntax to make sure your CA file is \n" + " correctly parsed: `--CaPem=\"$(cat FILENAME)\"`.\n" +"--Description: string\n" + " The description of the CA.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" , - "Usage: oapi-cli CreateDhcpOptions [OPTIONS]\n" "Creates a set of DHCP options, that you can then associate with a Net using the \n" "[UpdateNet](#updatenet) method.\nFor more information, see [About DHCP \n" "Options](https://docs.outscale.com/en/userguide/About-DHCP-Options.html).\n" "\nRequired Argument: \n" + "--BgpAsn: long long int\n" + " The Autonomous System Number (ASN) used by the Border Gateway Protocol (BGP) to find the \n" + " path to your client gateway through the Internet.
\nThis number must be between `1` \n" + " and `4294967295`. If you do not have an ASN, you can choose one between 64512 and 65534, or \n" + " between 4200000000 and 4294967294.\n" +"--ConnectionType: string\n" + " The communication protocol used to establish tunnel with your client gateway (always \n" + " `ipsec.1`).\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--PublicIp: string\n" + " The public fixed IPv4 address of your client gateway.\n" , - "Usage: oapi-cli CreateDedicatedGroup --CpuGeneration=cpugeneration --Name=name --SubregionName=subregionname [OPTIONS]\n" "> [WARNING]\n> This feature is currently in beta.\n\nCreates a dedicated group \n" "for virtual machines (VMs).\nFor more information, see [About Dedicated \n" "Groups](https://docs.outscale.com/en/userguide/About-Dedicated-Groups.html).\n" "\nRequired Argument: CpuGeneration, Name, SubregionName \n" + "--CpuGeneration: long long int\n" + " The processor generation for the VMs in the dedicated group (for example, `4`).\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Name: string\n" + " A name for the dedicated group.\n" +"--SubregionName: string\n" + " The Subregion in which you want to create the dedicated group.\n" , - "Usage: oapi-cli CreateClientGateway --BgpAsn=bgpasn --PublicIp=publicip --ConnectionType=connectiontype [OPTIONS]\n" "Provides information about your client gateway.\nThis action registers \n" "information to identify the client gateway that you deployed in your \n" "network.\nTo open a tunnel to the client gateway, you must provide the \n" "communication protocol type, the fixed public IP of the gateway, and an \n" "Autonomous System Number (ASN).\nFor more information, see [About Client \n" "Gateways](https://docs.outscale.com/en/userguide/About-Client-Gateways.html).\n" "\nRequired Argument: BgpAsn, PublicIp, ConnectionType \n" + "--DomainName: string\n" + " Specify a domain name (for example, `MyCompany.com`). You can specify only one domain name. \n" + " You must specify at least one of the following parameters: `DomainName`, \n" + " `DomainNameServers`, `LogServers`, or `NtpServers`.\n" +"--DomainNameServers: array string\n" + " The IPs of domain name servers. If no IPs are specified, the `OutscaleProvidedDNS` value is \n" + " set by default. You must specify at least one of the following parameters: `DomainName`, \n" + " `DomainNameServers`, `LogServers`, or `NtpServers`.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--LogServers: array string\n" + " The IPs of the log servers. You must specify at least one of the following parameters: \n" + " `DomainName`, `DomainNameServers`, `LogServers`, or `NtpServers`.\n" +"--NtpServers: array string\n" + " The IPs of the Network Time Protocol (NTP) servers. You must specify at least one of the \n" + " following parameters: `DomainName`, `DomainNameServers`, `LogServers`, or `NtpServers`.\n" , - "Usage: oapi-cli CreateCa --CaPem=capem [OPTIONS]\n" "Creates a Client Certificate Authority (CA).\nFor more information, see [About \n" "API Access \n" "Rules](https://docs.outscale.com/en/userguide/About-API-Access-Rules.html).\n" "\nRequired Argument: CaPem \n" + "--DirectLinkId: string\n" + " The ID of the existing DirectLink for which you want to create the DirectLink interface.\n" +"--DirectLinkInterface: ref DirectLinkInterface\n" + " Information about the DirectLink interface.\n" + " --DirectLinkInterface.BgpAsn: long long int\n" + " The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the \n" + " customer's side of the DirectLink interface. This number must be between \n" + " `64512` and `65534`.\n" + " --DirectLinkInterface.BgpKey: string\n" + " The BGP authentication key.\n" + " --DirectLinkInterface.ClientPrivateIp: string\n" + " The IP on the customer's side of the DirectLink interface.\n" + " --DirectLinkInterface.DirectLinkInterfaceName: string\n" + " The name of the DirectLink interface.\n" + " --DirectLinkInterface.OutscalePrivateIp: string\n" + " The IP on the OUTSCALE side of the DirectLink interface.\n" + " --DirectLinkInterface.VirtualGatewayId: string\n" + " The ID of the target virtual gateway.\n" + " --DirectLinkInterface.Vlan: long long int\n" + " The VLAN number associated with the DirectLink interface. This number \n" + " must be unique and be between `2` and `4094`.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" , - "Usage: oapi-cli CreateApiAccessRule [OPTIONS]\n" "Creates a rule to allow access to the API from your account.\nYou need to \n" "specify at least the `CaIds` or the `IpRanges` parameter.\n\n**[NOTE]**\nBy \n" "default, your account has a set of rules allowing global access, that you can \n" "delete.\nFor more information, see [About API Access \n" "Rules](https://docs.outscale.com/en/userguide/About-API-Access-Rules.html).\n" "\nRequired Argument: \n" + "--Bandwidth: string\n" + " The bandwidth of the DirectLink (`1Gbps` \\| `10Gbps`).\n" +"--DirectLinkName: string\n" + " The name of the DirectLink.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Location: string\n" + " The code of the requested location for the DirectLink, returned by the \n" + " [ReadLocations](#readlocations) method.\n" , - "Usage: oapi-cli CreateAccount --City=city --CompanyName=companyname --Country=country --CustomerId=customerid --Email=email --FirstName=firstname --LastName=lastname --ZipCode=zipcode [OPTIONS]\n" "Creates an OUTSCALE account.\n\n**[IMPORTANT]**\n* You need OUTSCALE \n" "credentials and the appropriate quotas to create an account via API. To get \n" "quotas, you can send an email to sales@outscale.com.\n* If you want to pass a \n" "numeral value as a string instead of an integer, you must wrap your string in \n" "additional quotes (for example, `'"92000"'`).\n\nFor more \n" "information, see [About Your \n" "Account](https://docs.outscale.com/en/userguide/About-Your-Account.html).\n" "\nRequired Argument: City, CompanyName, Country, CustomerId, Email, FirstName, LastName, ZipCode \n" + "--DeleteOnVmDeletion: bool\n" + " If true, the fGPU is deleted when the VM is terminated.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Generation: string\n" + " The processor generation that the fGPU must be compatible with. If not specified, the \n" + " oldest possible processor generation is selected (as provided by \n" + " [ReadFlexibleGpuCatalog](#readflexiblegpucatalog) for the specified model of fGPU).\n" +"--ModelName: string\n" + " The model of fGPU you want to allocate. For more information, see [About Flexible \n" + " GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html).\n" +"--SubregionName: string\n" + " The Subregion in which you want to create the fGPU.\n" , - "Usage: oapi-cli CreateAccessKey [OPTIONS]\n" "Creates an access key for either your root account or an EIM user. The new key \n" "is automatically set to `ACTIVE`.\nFor more information, see [About Access \n" "Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html).\n" "\nRequired Argument: \n" + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--ImageId: string\n" + " The ID of the OMI to export.\n" +"--OsuExport: ref OsuExportToCreate\n" + " Information about the OOS export task to create.\n" + " --OsuExport.DiskImageFormat: string\n" + " The format of the export disk (`qcow2` \\| `raw`).\n" + " --OsuExport.OsuApiKey: ref OsuApiKey\n" + " Information about the OOS API key.\n" + " --OsuExport.OsuApiKey.ApiKeyId: string\n" + " The API key of the OOS account that enables you to access the bucket.\n" + " --OsuExport.OsuApiKey.SecretKey: string\n" + " The secret key of the OOS account that enables you to access the bucket.\n" + " --OsuExport.OsuBucket: string\n" + " The name of the OOS bucket where you want to export the object.\n" + " --OsuExport.OsuManifestUrl: string\n" + " The URL of the manifest file.\n" + " --OsuExport.OsuPrefix: string\n" + " The prefix for the key of the OOS object.\n" , - "Usage: oapi-cli CheckAuthentication --Login=login --Password=password [OPTIONS]\n" "Validates the authenticity of the account.\n" "\nRequired Argument: Login, Password \n" + "--Architecture: string\n" + " **(when registering from a snapshot)** The architecture of the OMI (`i386` or `x86_64`).\n" +"--BlockDeviceMappings: array ref BlockDeviceMappingImage\n" + " **(when registering from a snapshot)** One or more block device mappings.\n" + " One or more parameters used to automatically set up volumes when the VM \n" + " is created.\n" + " --BlockDeviceMappings.INDEX.Bsu: ref BsuToCreate\n" + " Information about the BSU volume to create.\n" + " --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool\n" + " By default or if set to true, the volume is deleted when terminating the \n" + " VM. If false, the volume is not deleted when terminating the VM.\n" + " --BlockDeviceMappings.INDEX.Bsu.Iops: long long int\n" + " The number of I/O operations per second (IOPS). This parameter must be \n" + " specified only if you create an `io1` volume. The maximum number of IOPS \n" + " allowed for `io1` volumes is `13000` with a maximum performance ratio of \n" + " 300 IOPS per gibibyte.\n" + " --BlockDeviceMappings.INDEX.Bsu.SnapshotId: string\n" + " The ID of the snapshot used to create the volume.\n" + " --BlockDeviceMappings.INDEX.Bsu.VolumeSize: long long int\n" + " The size of the volume, in gibibytes (GiB).\nIf you specify a \n" + " snapshot ID, the volume size must be at least equal to the snapshot \n" + " size.\nIf you specify a snapshot ID but no volume size, the volume \n" + " is created with a size similar to the snapshot one.\n" + " --BlockDeviceMappings.INDEX.Bsu.VolumeType: string\n" + " The type of the volume (`standard` \\| `io1` \\| `gp2`). If not \n" + " specified in the request, a `standard` volume is created.\nFor more \n" + " information about volume types, see [About Volumes > Volume Types and \n" + " IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volume_ty\n" + " pes_and_iops).\n" + " --BlockDeviceMappings.INDEX.DeviceName: string\n" + " The device name for the volume. For a root device, you must use \n" + " `/dev/sda1`. For other volumes, you must use `/dev/sdX`, `/dev/sdXX`, \n" + " `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter between `b` \n" + " and `z`, and the second `X` is a letter between `a` and `z`).\n" + " --BlockDeviceMappings.INDEX.VirtualDeviceName: string\n" + " The name of the virtual device (`ephemeralN`).\n" +"--Description: string\n" + " A description for the new OMI.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--FileLocation: string\n" + " **(when registering from a bucket by using a manifest file)** The pre-signed URL of the \n" + " manifest file for the OMI you want to register. For more information, see [Creating a \n" + " Pre-signed URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\n" +"--ImageName: string\n" + " A unique name for the new OMI.\nConstraints: 3-128 alphanumeric characters, underscores \n" + " (`_`), spaces (` `), parentheses (`()`), slashes (`/`), periods (`.`), or dashes (`-`).\n" +"--NoReboot: bool\n" + " **(when creating from a VM)** If false, the VM shuts down before creating the OMI and then \n" + " reboots. If true, the VM does not.\n" +"--ProductCodes: array string\n" + " The product codes associated with the OMI.\n" +"--RootDeviceName: string\n" + " **(when registering from a snapshot)** The name of the root device for the new OMI.\n" +"--SourceImageId: string\n" + " **(when copying an OMI)** The ID of the OMI you want to copy.\n" +"--SourceRegionName: string\n" + " **(when copying an OMI)** The name of the source Region (always the same as the Region of \n" + " your account).\n" +"--VmId: string\n" + " **(when creating from a VM)** The ID of the VM from which you want to create the OMI.\n" , - "Usage: oapi-cli AddUserToUserGroup --UserGroupName=usergroupname --UserName=username [OPTIONS]\n" "Adds a user to a specified group.\n" "\nRequired Argument: UserGroupName, UserName \n" + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" , - "Usage: oapi-cli AcceptNetPeering --NetPeeringId=netpeeringid [OPTIONS]\n" "Accepts a Net peering request.\nTo accept this request, you must be the owner \n" "of the peer Net. If you do not accept the request within 7 days, the state of \n" "the Net peering becomes `expired`.\n\n**[NOTE]**\nA peering connection between \n" "two Nets works both ways. Therefore, when an A-to-B peering connection is \n" "accepted, any pending B-to-A peering connection is automatically rejected as \n" "redundant.\n" "\nRequired Argument: NetPeeringId \n" + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--KeypairName: string\n" + " A unique name for the keypair, with a maximum length of 255 [ASCII printable \n" + " characters](https://en.wikipedia.org/wiki/ASCII#Printable_characters).\n" +"--PublicKey: string\n" + " The public key to import in your account, if you are importing an existing keypair. This \n" + " value must be Base64-encoded.\n" , - NULL -}; - -static const char *calls_args_descriptions[] = { - "--ClientGatewayId: string\n" - " The ID of the client gateway.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--VirtualGatewayId: string\n" - " The ID of the virtual gateway.\n" -"--VpnConnectionId: string\n" - " The ID of the VPN connection you want to modify.\n" -"--VpnOptions: ref VpnOptions\n" - " Information about the VPN options.\n" - " --VpnOptions.Phase1Options: ref Phase1Options\n" - " Information about Phase 1 of the Internet Key Exchange (IKE) \n" - " negotiation. When Phase 1 finishes successfully, peers proceed to Phase 2 \n" - " negotiations.\n" - " --VpnOptions.Phase1Options.DpdTimeoutAction: string\n" - " The action to carry out after a Dead Peer Detection (DPD) timeout \n" - " occurs.\n" - " --VpnOptions.Phase1Options.DpdTimeoutSeconds: long long int\n" - " The maximum waiting time for a Dead Peer Detection (DPD) response before \n" - " considering the peer as dead, in seconds.\n" - " --VpnOptions.Phase1Options.IkeVersions: array string\n" - " The Internet Key Exchange (IKE) versions allowed for the VPN tunnel.\n" - " --VpnOptions.Phase1Options.Phase1DhGroupNumbers: array integer\n" - " The Diffie-Hellman (DH) group numbers allowed for the VPN tunnel for \n" - " phase 1.\n" - " --VpnOptions.Phase1Options.Phase1EncryptionAlgorithms: array string\n" - " The encryption algorithms allowed for the VPN tunnel for phase 1.\n" - " --VpnOptions.Phase1Options.Phase1IntegrityAlgorithms: array string\n" - " The integrity algorithms allowed for the VPN tunnel for phase 1.\n" - " --VpnOptions.Phase1Options.Phase1LifetimeSeconds: long long int\n" - " The lifetime for phase 1 of the IKE negotiation process, in seconds.\n" - " --VpnOptions.Phase1Options.ReplayWindowSize: long long int\n" - " The number of packets in an IKE replay window.\n" - " --VpnOptions.Phase1Options.StartupAction: string\n" - " The action to carry out when establishing tunnels for a VPN connection.\n" - " --VpnOptions.Phase2Options: ref Phase2Options\n" - " Information about Phase 2 of the Internet Key Exchange (IKE) \n" - " negotiation.\n" - " --VpnOptions.Phase2Options.Phase2DhGroupNumbers: array integer\n" - " The Diffie-Hellman (DH) group numbers allowed for the VPN tunnel for \n" - " phase 2.\n" - " --VpnOptions.Phase2Options.Phase2EncryptionAlgorithms: array string\n" - " The encryption algorithms allowed for the VPN tunnel for phase 2.\n" - " --VpnOptions.Phase2Options.Phase2IntegrityAlgorithms: array string\n" - " The integrity algorithms allowed for the VPN tunnel for phase 2.\n" - " --VpnOptions.Phase2Options.Phase2LifetimeSeconds: long long int\n" - " The lifetime for phase 2 of the Internet Key Exchange (IKE) negociation \n" - " process, in seconds.\n" - " --VpnOptions.Phase2Options.PreSharedKey: string\n" - " The pre-shared key to establish the initial authentication between the \n" - " client gateway and the virtual gateway. This key can contain any \n" - " character except line breaks and double quotes (\").\n" - " --VpnOptions.TunnelInsideIpRange: string\n" - " The range of inside IPs for the tunnel. This must be a /30 CIDR block \n" - " from the 169.254.254.0/24 range.\n" +"--Listener: ref LoadBalancerLight\n" + " Information about the load balancer.\n" + " --Listener.LoadBalancerName: string\n" + " The name of the load balancer to which the listener is attached.\n" + " --Listener.LoadBalancerPort: long long int\n" + " The port of load balancer on which the load balancer is listening \n" + " (between `1` and `65535` both included).\n" +"--ListenerRule: ref ListenerRuleForCreation\n" + " Information about the listener rule.\n" + " --ListenerRule.Action: string\n" + " The type of action for the rule (always `forward`).\n" + " --ListenerRule.HostNamePattern: string\n" + " A host-name pattern for the rule, with a maximum length of 128 \n" + " characters. This host-name pattern supports maximum three wildcards, and \n" + " must not contain any special characters except `-.?`.\n" + " --ListenerRule.ListenerRuleName: string\n" + " A human-readable name for the listener rule.\n" + " --ListenerRule.PathPattern: string\n" + " A path pattern for the rule, with a maximum length of 128 characters. \n" + " This path pattern supports maximum three wildcards, and must not contain \n" + " any special characters except `_-.$/~\"'@:+?`.\n" + " --ListenerRule.Priority: long long int\n" + " The priority level of the listener rule, between `1` and `19999` both \n" + " included. Each rule must have a unique priority level. Otherwise, an \n" + " error is returned.\n" +"--VmIds: array string\n" + " The IDs of the backend VMs.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Iops: long long int\n" - " **Cold volume**: the new number of I/O operations per second (IOPS). This parameter can be \n" - " specified only if you update an `io1` volume or if you change the type of the volume for an \n" - " `io1`. This modification is instantaneous. \n**Hot volume**: the new number of I/O \n" - " operations per second (IOPS). This parameter can be specified only if you update an `io1` \n" - " volume. This modification is not instantaneous. \nThe maximum number of IOPS allowed for \n" - " `io1` volumes is `13000` with a maximum performance ratio of 300 IOPS per gibibyte.\n" -"--Size: long long int\n" - " **Cold volume**: the new size of the volume, in gibibytes (GiB). This value must be equal \n" - " to or greater than the current size of the volume. This modification is not instantaneous. \n" - " \n**Hot volume**: you cannot change the size of a hot volume.\n" -"--VolumeId: string\n" - " The ID of the volume you want to update.\n" -"--VolumeType: string\n" - " **Cold volume**: the new type of the volume (`standard` \\| `io1` \\| `gp2`). This \n" - " modification is instantaneous. If you update to an `io1` volume, you must also specify the \n" - " `Iops` parameter.\n**Hot volume**: you cannot change the type of a hot volume.\n" +"--Listeners: array ref ListenerForCreation\n" + " One or more listeners for the load balancer.\n" + " Information about the listener to create.\n" + " --Listeners.INDEX.BackendPort: long long int\n" + " The port on which the backend VM is listening (between `1` and `65535`, \n" + " both included).\n" + " --Listeners.INDEX.BackendProtocol: string\n" + " The protocol for routing traffic to backend VMs (`HTTP` \\| `HTTPS` \\| \n" + " `TCP` \\| `SSL`).\n" + " --Listeners.INDEX.LoadBalancerPort: long long int\n" + " The port on which the load balancer is listening (between `1` and \n" + " `65535`, both included).\n" + " --Listeners.INDEX.LoadBalancerProtocol: string\n" + " The routing protocol (`HTTP` \\| `HTTPS` \\| `TCP` \\| `SSL`).\n" + " --Listeners.INDEX.ServerCertificateId: string\n" + " The OUTSCALE Resource Name (ORN) of the server certificate. For more \n" + " information, see [Resource Identifiers > OUTSCALE Resource Names \n" + " (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.html#_\n" + " outscale_resource_names_orns).\n" +"--LoadBalancerName: string\n" + " The name of the load balancer for which you want to create listeners.\n" , - "--Description: string\n" - " A new description for the VM template.\n" + "--CookieExpirationPeriod: long long int\n" + " The lifetime of the cookie, in seconds. If not specified, the default value of this \n" + " parameter is `1`, which means that the sticky session lasts for the duration of the browser \n" + " session.\n" +"--CookieName: string\n" + " The name of the application cookie used for stickiness. This parameter is required if you \n" + " create a stickiness policy based on an application-generated cookie.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" +"--LoadBalancerName: string\n" + " The name of the load balancer for which you want to create a policy.\n" +"--PolicyName: string\n" + " The unique name of the policy, with a maximum length of 32 alphanumeric characters and \n" + " dashes (`-`).\n" +"--PolicyType: string\n" + " The type of stickiness policy you want to create: `app` or `load_balancer`.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Listeners: array ref ListenerForCreation\n" + " One or more listeners to create.\n" + " Information about the listener to create.\n" + " --Listeners.INDEX.BackendPort: long long int\n" + " The port on which the backend VM is listening (between `1` and `65535`, \n" + " both included).\n" + " --Listeners.INDEX.BackendProtocol: string\n" + " The protocol for routing traffic to backend VMs (`HTTP` \\| `HTTPS` \\| \n" + " `TCP` \\| `SSL`).\n" + " --Listeners.INDEX.LoadBalancerPort: long long int\n" + " The port on which the load balancer is listening (between `1` and \n" + " `65535`, both included).\n" + " --Listeners.INDEX.LoadBalancerProtocol: string\n" + " The routing protocol (`HTTP` \\| `HTTPS` \\| `TCP` \\| `SSL`).\n" + " --Listeners.INDEX.ServerCertificateId: string\n" + " The OUTSCALE Resource Name (ORN) of the server certificate. For more \n" + " information, see [Resource Identifiers > OUTSCALE Resource Names \n" + " (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.html#_\n" + " outscale_resource_names_orns).\n" +"--LoadBalancerName: string\n" + " The unique name of the load balancer, with a maximum length of 32 alphanumeric characters \n" + " and dashes (`-`). This name must not start or end with a dash.\n" +"--LoadBalancerType: string\n" + " The type of load balancer: `internet-facing` or `internal`. Use this parameter only for \n" + " load balancers in a Net.\n" +"--PublicIp: string\n" + " (internet-facing only) The public IP you want to associate with the load balancer. If not \n" + " specified, a public IP owned by 3DS OUTSCALE is associated.\n" +"--SecurityGroups: array string\n" + " (Net only) One or more IDs of security groups you want to assign to the load balancer. If \n" + " not specified, the default security group of the Net is assigned to the load balancer.\n" +"--Subnets: array string\n" + " (Net only) The ID of the Subnet in which you want to create the load balancer. Regardless \n" + " of this Subnet, the load balancer can distribute traffic to all Subnets. This parameter is \n" + " required in a Net.\n" +"--SubregionNames: array string\n" + " (public Cloud only) The Subregion in which you want to create the load balancer. Regardless \n" + " of this Subregion, the load balancer can distribute traffic to all Subregions. This \n" + " parameter is required in the public Cloud.\n" "--Tags: array ref ResourceTag\n" - " New tags for your VM template.\n" + " One or more tags assigned to the load balancer.\n" " Information about the tag.\n" " --Tags.INDEX.Key: string\n" " The key of the tag, with a minimum of 1 character.\n" " --Tags.INDEX.Value: string\n" " The value of the tag, between 0 and 255 characters.\n" -"--VmTemplateId: string\n" - " The ID of the VM template you want to update.\n" -"--VmTemplateName: string\n" - " A new name for your VM template.\n" , - "--Description: string\n" - " A new description for the VM group.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" +"--LoadBalancerNames: array string\n" + " One or more load balancer names.\n" "--Tags: array ref ResourceTag\n" - " New tags for your VM group.\n" + " One or more tags to add to the specified load balancers.\n" " Information about the tag.\n" " --Tags.INDEX.Key: string\n" " The key of the tag, with a minimum of 1 character.\n" " --Tags.INDEX.Value: string\n" " The value of the tag, between 0 and 255 characters.\n" -"--VmGroupId: string\n" - " The ID of the VM group you want to update.\n" -"--VmGroupName: string\n" - " A new name for your VM group.\n" -"--VmTemplateId: string\n" - " A new VM template ID for your VM group.\n" , - "--BlockDeviceMappings: array ref BlockDeviceMappingVmUpdate\n" - " One or more block device mappings of the VM.\n" - " Information about the block device mapping.\n" - " --BlockDeviceMappings.INDEX.Bsu: ref BsuToUpdateVm\n" - " Information about the BSU volume.\n" - " --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool\n" - " If set to true, the volume is deleted when terminating the VM. If set to \n" - " false, the volume is not deleted when terminating the VM.\n" - " --BlockDeviceMappings.INDEX.Bsu.VolumeId: string\n" - " The ID of the volume.\n" - " --BlockDeviceMappings.INDEX.DeviceName: string\n" - " The device name for the volume. For a root device, you must use \n" - " `/dev/sda1`. For other volumes, you must use `/dev/sdX`, `/dev/sdXX`, \n" - " `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter between `b` \n" - " and `z`, and the second `X` is a letter between `a` and `z`).\n" - " --BlockDeviceMappings.INDEX.NoDevice: string\n" - " Removes the device which is included in the block device mapping of the \n" - " OMI.\n" - " --BlockDeviceMappings.INDEX.VirtualDeviceName: string\n" - " The name of the virtual device (`ephemeralN`).\n" -"--BsuOptimized: bool\n" - " This parameter is not available. It is present in our API for the sake of historical \n" - " compatibility with AWS.\n" -"--DeletionProtection: bool\n" - " If true, you cannot delete the VM unless you change this parameter back to false.\n" + "--ClientToken: string\n" + " A unique identifier which enables you to manage the idempotency.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--IsSourceDestChecked: bool\n" - " (Net only) If true, the source/destination check is enabled. If false, it is disabled.\n" -"--KeypairName: string\n" - " The name of a keypair you want to associate with the VM.\nWhen you replace the keypair of a \n" - " VM with another one, the metadata of the VM is modified to reflect the new public key, but \n" - " the replacement is still not effective in the operating system of the VM. To complete the \n" - " replacement and effectively apply the new keypair, you need to perform other actions inside \n" - " the VM. For more information, see [Modifying the Keypair of a \n" - " VM](https://docs.outscale.com/en/userguide/Modifying-the-Keypair-of-a-VM.html).\n" -"--NestedVirtualization: bool\n" - " (dedicated tenancy only) If true, nested virtualization is enabled. If false, it is \n" - " disabled.\n" -"--Performance: string\n" - " The performance of the VM (`medium` \\| `high` \\| `highest`).\n" -"--SecurityGroupIds: array string\n" - " One or more IDs of security groups for the VM.\n" -"--UserData: string\n" - " The Base64-encoded MIME user data, limited to 500 kibibytes (KiB).\n" -"--VmId: string\n" - " The ID of the VM.\n" -"--VmInitiatedShutdownBehavior: string\n" - " The VM behavior when you stop it. If set to `stop`, the VM stops. If set to `restart`, the \n" - " VM stops then automatically restarts. If set to `terminate`, the VM stops and is terminated.\n" -"--VmType: string\n" - " The type of VM. For more information, see [VM \n" - " Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" +"--PublicIpId: string\n" + " The allocation ID of the public IP to associate with the NAT service.\nIf the public IP is \n" + " already associated with another resource, you must first disassociate it.\n" +"--SubnetId: string\n" + " The ID of the Subnet in which you want to create the NAT service.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--NewPath: string\n" - " A new path for the group. If not specified, it is set to a slash (`/`).\n" -"--NewUserGroupName: string\n" - " A new name for the user group.\n" -"--Path: string\n" - " The path to the group. If not specified, it is set to a slash (`/`).\n" -"--UserGroupName: string\n" - " The name of the group you want to update.\n" +"--NetId: string\n" + " The ID of the Net.\n" +"--RouteTableIds: array string\n" + " One or more IDs of route tables to use for the connection.\n" +"--ServiceName: string\n" + " The name of the service (in the format `com.outscale.region.service`).\n" , - "--DryRun: bool\n" + "--AccepterNetId: string\n" + " The ID of the Net you want to connect with.\n" +"--AccepterOwnerId: string\n" + " The account ID of the owner of the Net you want to connect with. By default, the account ID \n" + " of the owner of the Net from which the peering request is sent.\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--NewPath: string\n" - " A new path for the EIM user.\n" -"--NewUserEmail: string\n" - " A new email address for the EIM user.\n" -"--NewUserName: string\n" - " A new name for the EIM user.\n" -"--UserName: string\n" - " The name of the EIM user you want to modify.\n" +"--SourceNetId: string\n" + " The ID of the Net you send the peering request from.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--MapPublicIpOnLaunch: bool\n" - " If true, a public IP is assigned to the network interface cards (NICs) created in the \n" - " specified Subnet.\n" -"--SubnetId: string\n" - " The ID of the Subnet.\n" +"--IpRange: string\n" + " The IP range for the Net, in CIDR notation (for example, `10.0.0.0/16`).\n" +"--Tenancy: string\n" + " The tenancy options for the VMs:\n- `default` if a VM created in a Net can be launched with \n" + " any tenancy.\n- `dedicated` if it can be launched with dedicated tenancy VMs running on \n" + " single-tenant hardware.\n- `dedicated group ID`: if it can be launched in a dedicated group \n" + " on single-tenant hardware.\n" , - "--DryRun: bool\n" + "--Description: string\n" + " A description for the NIC.\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--PermissionsToCreateVolume: ref PermissionsOnResourceCreation\n" - " Information about the permissions for the resource.\nSpecify \n" - " either the `Additions` or the `Removals` parameter.\n" - " --PermissionsToCreateVolume.Additions: ref PermissionsOnResource\n" - " Permissions for the resource.\n" - " --PermissionsToCreateVolume.Additions.AccountIds: array string\n" - " One or more account IDs that the permission is associated with.\n" - " --PermissionsToCreateVolume.Additions.GlobalPermission: bool\n" - " A global permission for all accounts.\n(Request) Set this \n" - " parameter to true to make the resource public (if the parent parameter is \n" - " `Additions`) or to make the resource private (if the parent parameter is \n" - " `Removals`).\n(Response) If true, the resource is public. If false, \n" - " the resource is private.\n" - " --PermissionsToCreateVolume.Removals: ref PermissionsOnResource\n" - " Permissions for the resource.\n" - " --PermissionsToCreateVolume.Removals.AccountIds: array string\n" - " One or more account IDs that the permission is associated with.\n" - " --PermissionsToCreateVolume.Removals.GlobalPermission: bool\n" - " A global permission for all accounts.\n(Request) Set this \n" - " parameter to true to make the resource public (if the parent parameter is \n" - " `Additions`) or to make the resource private (if the parent parameter is \n" - " `Removals`).\n(Response) If true, the resource is public. If false, \n" - " the resource is private.\n" -"--SnapshotId: string\n" - " The ID of the snapshot.\n" +"--PrivateIps: array ref PrivateIpLight\n" + " The primary private IP for the NIC.\nThis IP must be within the IP range of the Subnet that \n" + " you specify with the `SubnetId` attribute.\nIf you do not specify this attribute, a random \n" + " private IP is selected within the IP range of the Subnet.\n" + " Information about the private IP.\n" + " --PrivateIps.INDEX.IsPrimary: bool\n" + " If true, the IP is the primary private IP of the NIC.\n" + " --PrivateIps.INDEX.PrivateIp: string\n" + " The private IP of the NIC.\n" +"--SecurityGroupIds: array string\n" + " One or more IDs of security groups for the NIC.\n" +"--SubnetId: string\n" + " The ID of the Subnet in which you want to create the NIC.\n" , - "--DryRun: bool\n" + "--Description: string\n" + " A description for the policy.\n" +"--Document: string\n" + " The policy document, corresponding to a JSON string that contains the policy. For more \n" + " information, see [EIM Reference \n" + " Information](https://docs.outscale.com/en/userguide/EIM-Reference-Information.html) and \n" + " [EIM Policy Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator.html).\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Name: string\n" - " The name of the server certificate you want to modify.\n" -"--NewName: string\n" - " A new name for the server certificate.\n" -"--NewPath: string\n" - " A new path for the server certificate.\n" +"--Path: string\n" + " The path of the policy.\n" +"--PolicyName: string\n" + " The name of the policy.\n" , - "--DryRun: bool\n" + "--Document: string\n" + " The policy document, corresponding to a JSON string that contains the policy. For more \n" + " information, see [EIM Reference \n" + " Information](https://docs.outscale.com/en/userguide/EIM-Reference-Information.html) and \n" + " [EIM Policy Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator.html).\n" +"--PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" +"--SetAsDefault: bool\n" + " If set to true, the new policy version is set as the default version and becomes the \n" + " operative one.\n" +, + "--Description: string\n" + " The description of the product type.\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--LinkRouteTableId: string\n" - " The ID of the current route table link.\n" -"--RouteTableId: string\n" - " The ID of the new route table to associate with the Subnet.\n" +"--Vendor: string\n" + " The vendor of the product type.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Enable: bool\n" - " If true, a virtual gateway can propagate routes to a specified route table of a Net. If \n" - " false, the propagation is disabled.\n" -"--RouteTableId: string\n" - " The ID of the route table.\n" -"--VirtualGatewayId: string\n" - " The ID of the virtual gateway.\n" , "--DestinationIpRange: string\n" " The IP range used for the destination match, in CIDR notation (for example, `10.0.0.0/24`).\n" @@ -1011,1326 +1259,1052 @@ static const char *calls_args_descriptions[] = { "--GatewayId: string\n" " The ID of an Internet service or virtual gateway attached to your Net.\n" "--NatServiceId: string\n" - " The ID of a NAT service.\n" -"--NetPeeringId: string\n" - " The ID of a Net peering.\n" -"--NicId: string\n" - " The ID of a network interface card (NIC).\n" -"--RouteTableId: string\n" - " The ID of the route table.\n" -"--VmId: string\n" - " The ID of a NAT VM in your Net.\n" -, - "--Description: string\n" - " A new description for the NIC.\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--LinkNic: ref LinkNicToUpdate\n" - " Information about the NIC attachment. If you are modifying the \n" - " `DeleteOnVmDeletion` attribute, you must specify the ID of the NIC \n" - " attachment.\n" - " --LinkNic.DeleteOnVmDeletion: bool\n" - " If true, the NIC is deleted when the VM is terminated. If false, the NIC \n" - " is detached from the VM.\n" - " --LinkNic.LinkNicId: string\n" - " The ID of the NIC attachment.\n" + " The ID of a NAT service.\n" +"--NetPeeringId: string\n" + " The ID of a Net peering.\n" "--NicId: string\n" - " The ID of the NIC you want to modify.\n" -"--SecurityGroupIds: array string\n" - " One or more IDs of security groups for the NIC.\nYou must specify at least one group, even \n" - " if you use the default security group in the Net.\n" + " The ID of a NIC.\n" +"--RouteTableId: string\n" + " The ID of the route table for which you want to create a route.\n" +"--VmId: string\n" + " The ID of a NAT VM in your Net (attached to exactly one NIC).\n" , - "--AddRouteTableIds: array string\n" - " One or more IDs of route tables to associate with the specified Net access point.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--NetAccessPointId: string\n" - " The ID of the Net access point.\n" -"--RemoveRouteTableIds: array string\n" - " One or more IDs of route tables to disassociate from the specified Net access point.\n" +"--NetId: string\n" + " The ID of the Net for which you want to create a route table.\n" , - "--DhcpOptionsSetId: string\n" - " The ID of the DHCP options set (or `default` if you want to associate the default one).\n" + "--Description: string\n" + " A description for the security group.\nThis description can contain between 1 and 255 \n" + " characters. Allowed characters are `a-z`, `A-Z`, `0-9`, accented letters, spaces, and \n" + " `_.-:/()#,@[]+=&;{}!$*`.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--NetId: string\n" - " The ID of the Net.\n" + " The ID of the Net for the security group.\n" +"--SecurityGroupName: string\n" + " The name of the security group.\nThis name must not start with `sg-`.\nThis name must be \n" + " unique and contain between 1 and 255 characters. Allowed characters are `a-z`, `A-Z`, \n" + " `0-9`, spaces, and `_.-:/()#,@[]+=&;{}!$*`.\n" , - "--AccessLog: ref AccessLog\n" - " Information about access logs.\n" - " --AccessLog.IsEnabled: bool\n" - " If true, access logs are enabled for your load balancer. If false, they \n" - " are not. If you set this to true in your request, the `OsuBucketName` \n" - " parameter is required.\n" - " --AccessLog.OsuBucketName: string\n" - " The name of the OOS bucket for the access logs.\n" - " --AccessLog.OsuBucketPrefix: string\n" - " The path to the folder of the access logs in your OOS bucket (by \n" - " default, the `root` level of your bucket).\n" - " --AccessLog.PublicationInterval: long long int\n" - " The time interval for the publication of access logs in the OOS bucket, \n" - " in minutes. This value can be either `5` or `60` (by default, `60`).\n" + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Flow: string\n" + " The direction of the flow: `Inbound` or `Outbound`. You can specify `Outbound` for Nets \n" + " only.\n" +"--FromPortRange: long long int\n" + " The beginning of the port range for the TCP and UDP protocols, or an ICMP type number. If \n" + " you specify this parameter, you cannot specify the `Rules` parameter and its subparameters.\n" +"--IpProtocol: string\n" + " The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all protocols). By default, `-1`. \n" + " In a Net, this can also be an IP protocol number. For more information, see the [IANA.org \n" + " website](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). If you \n" + " specify this parameter, you cannot specify the `Rules` parameter and its subparameters.\n" +"--IpRange: string\n" + " The IP range for the security group rule, in CIDR notation (for example, 10.0.0.0/16). If \n" + " you specify this parameter, you cannot specify the `Rules` parameter and its subparameters.\n" +"--Rules: array ref SecurityGroupRule\n" + " Information about the security group rule to create. If you specify this parent parameter \n" + " and its subparameters, you cannot specify the following parent parameters: `FromPortRange`, \n" + " `IpProtocol`, `IpRange`, and `ToPortRange`.\n" + " Information about the security group rule.\n" + " --Rules.INDEX.FromPortRange: long long int\n" + " The beginning of the port range for the TCP and UDP protocols, or an \n" + " ICMP type number.\n" + " --Rules.INDEX.IpProtocol: string\n" + " The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all protocols). \n" + " By default, `-1`. In a Net, this can also be an IP protocol number. For \n" + " more information, see the [IANA.org \n" + " website](https://www.iana.org/assignments/protocol-numbers/protocol-number\n" + " s.xhtml).\n" + " --Rules.INDEX.IpRanges: array string\n" + " One or more IP ranges for the security group rules, in CIDR notation \n" + " (for example, `10.0.0.0/16`).\n" + " --Rules.INDEX.SecurityGroupsMembers: array ref SecurityGroupsMember\n" + " Information about one or more source or destination security groups.\n" + " Information about a source or destination security group.\n" + " --Rules.INDEX.SecurityGroupsMembers.INDEX.AccountId: string\n" + " The account ID that owns the source or destination security group.\n" + " --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupId: string\n" + " The ID of a source or destination security group that you want to link \n" + " to the security group of the rule.\n" + " --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupName: string\n" + " (Public Cloud only) The name of a source or destination security group \n" + " that you want to link to the security group of the rule.\n" + " --Rules.INDEX.ServiceIds: array string\n" + " One or more service IDs to allow traffic from a Net to access the \n" + " corresponding OUTSCALE services. For more information, see \n" + " [ReadNetAccessPointServices](#readnetaccesspointservices).\n" + " --Rules.INDEX.ToPortRange: long long int\n" + " The end of the port range for the TCP and UDP protocols, or an ICMP code \n" + " number.\n" +"--SecurityGroupAccountIdToLink: string\n" + " The account ID that owns the source or destination security group specified in the \n" + " `SecurityGroupNameToLink` parameter.\n" +"--SecurityGroupId: string\n" + " The ID of the security group for which you want to create a rule.\n" +"--SecurityGroupNameToLink: string\n" + " The ID of a source or destination security group that you want to link to the security \n" + " group of the rule.\n" +"--ToPortRange: long long int\n" + " The end of the port range for the TCP and UDP protocols, or an ICMP code number. If you \n" + " specify this parameter, you cannot specify the `Rules` parameter and its subparameters.\n" +, + "--Body: string\n" + " The PEM-encoded X509 certificate.With OSC CLI, use the following syntax to make sure your \n" + " certificate file is correctly parsed: `--Body=\"$(cat FILENAME)\"`.\n" +"--Chain: string\n" + " The PEM-encoded intermediate certification authorities.With OSC CLI, use the following \n" + " syntax to make sure your certificate chain file is correctly parsed: `--Chain=\"$(cat \n" + " FILENAME)\"`.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--HealthCheck: ref HealthCheck\n" - " Information about the health check configuration.\n" - " --HealthCheck.CheckInterval: long long int\n" - " The number of seconds between two requests (between `5` and `600` both \n" - " included).\n" - " --HealthCheck.HealthyThreshold: long long int\n" - " The number of consecutive successful requests before considering the VM \n" - " as healthy (between `2` and `10` both included).\n" - " --HealthCheck.Path: string\n" - " If you use the HTTP or HTTPS protocols, the request URL path.\n" - " --HealthCheck.Port: long long int\n" - " The port number (between `1` and `65535`, both included).\n" - " --HealthCheck.Protocol: string\n" - " The protocol for the URL of the VM (`HTTP` \\| `HTTPS` \\| `TCP` \\| \n" - " `SSL`).\n" - " --HealthCheck.Timeout: long long int\n" - " The maximum waiting time for a response before considering the VM as \n" - " unhealthy, in seconds (between `2` and `60` both included).\n" - " --HealthCheck.UnhealthyThreshold: long long int\n" - " The number of consecutive failed requests before considering the VM as \n" - " unhealthy (between `2` and `10` both included).\n" -"--LoadBalancerName: string\n" - " The name of the load balancer.\n" -"--LoadBalancerPort: long long int\n" - " The port on which the load balancer is listening (between `1` and `65535`, both included). \n" - " This parameter is required if you want to update the server certificate.\n" -"--PolicyNames: array string\n" - " The name of the policy you want to enable for the listener.\n" -"--PublicIp: string\n" - " (internet-facing only) The public IP you want to associate with the load balancer. The \n" - " former public IP of the load balancer is then disassociated. If you specify an empty string \n" - " and the former public IP belonged to you, it is disassociated and replaced by a public IP \n" - " owned by 3DS OUTSCALE.\n" -"--SecuredCookies: bool\n" - " If true, secure cookies are enabled for the load balancer.\n" -"--SecurityGroups: array string\n" - " (Net only) One or more IDs of security groups you want to assign to the load balancer. You \n" - " need to specify the already assigned security groups that you want to keep along with the \n" - " new ones you are assigning. If the list is empty, the default security group of the Net is \n" - " assigned to the load balancer.\n" -"--ServerCertificateId: string\n" - " The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see \n" - " [Resource Identifiers > OUTSCALE Resource Names \n" - " (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.html#_outscale_resource_\n" - " names_orns). If this parameter is specified, you must also specify the `LoadBalancerPort` \n" - " parameter.\n" +"--Name: string\n" + " A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses \n" + " (`+`), equals (`=`), commas (`,`), periods (`.`), at signs (`@`), minuses (`-`), or \n" + " underscores (`_`).\n" +"--Path: string\n" + " The path to the server certificate, set to a slash (`/`) if not specified.\n" +"--PrivateKey: string\n" + " The PEM-encoded private key matching the certificate.With OSC CLI, use the following syntax \n" + " to make sure your key file is correctly parsed: `--PrivateKey=\"$(cat FILENAME)\"`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--HostPattern: string\n" - " A host-name pattern for the rule, with a maximum length of 128 characters. This host-name \n" - " pattern supports maximum three wildcards, and must not contain any special characters \n" - " except `-.?`.\n" -"--ListenerRuleName: string\n" - " The name of the listener rule.\n" -"--PathPattern: string\n" - " A path pattern for the rule, with a maximum length of 128 characters. This path pattern \n" - " supports maximum three wildcards, and must not contain any special characters except \n" - " `_-.$/~\"'@:+?`.\n" +"--OsuExport: ref OsuExportToCreate\n" + " Information about the OOS export task to create.\n" + " --OsuExport.DiskImageFormat: string\n" + " The format of the export disk (`qcow2` \\| `raw`).\n" + " --OsuExport.OsuApiKey: ref OsuApiKey\n" + " Information about the OOS API key.\n" + " --OsuExport.OsuApiKey.ApiKeyId: string\n" + " The API key of the OOS account that enables you to access the bucket.\n" + " --OsuExport.OsuApiKey.SecretKey: string\n" + " The secret key of the OOS account that enables you to access the bucket.\n" + " --OsuExport.OsuBucket: string\n" + " The name of the OOS bucket where you want to export the object.\n" + " --OsuExport.OsuManifestUrl: string\n" + " The URL of the manifest file.\n" + " --OsuExport.OsuPrefix: string\n" + " The prefix for the key of the OOS object.\n" +"--SnapshotId: string\n" + " The ID of the snapshot to export.\n" , "--Description: string\n" - " A new description for the image.\n" + " A description for the snapshot.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--ImageId: string\n" - " The ID of the OMI you want to modify.\n" -"--PermissionsToLaunch: ref PermissionsOnResourceCreation\n" - " Information about the permissions for the resource.\nSpecify \n" - " either the `Additions` or the `Removals` parameter.\n" - " --PermissionsToLaunch.Additions: ref PermissionsOnResource\n" - " Permissions for the resource.\n" - " --PermissionsToLaunch.Additions.AccountIds: array string\n" - " One or more account IDs that the permission is associated with.\n" - " --PermissionsToLaunch.Additions.GlobalPermission: bool\n" - " A global permission for all accounts.\n(Request) Set this \n" - " parameter to true to make the resource public (if the parent parameter is \n" - " `Additions`) or to make the resource private (if the parent parameter is \n" - " `Removals`).\n(Response) If true, the resource is public. If false, \n" - " the resource is private.\n" - " --PermissionsToLaunch.Removals: ref PermissionsOnResource\n" - " Permissions for the resource.\n" - " --PermissionsToLaunch.Removals.AccountIds: array string\n" - " One or more account IDs that the permission is associated with.\n" - " --PermissionsToLaunch.Removals.GlobalPermission: bool\n" - " A global permission for all accounts.\n(Request) Set this \n" - " parameter to true to make the resource public (if the parent parameter is \n" - " `Additions`) or to make the resource private (if the parent parameter is \n" - " `Removals`).\n(Response) If true, the resource is public. If false, \n" - " the resource is private.\n" +"--FileLocation: string\n" + " **(when importing from a bucket)** The pre-signed URL of the snapshot you want to import. \n" + " For more information, see [Creating a Pre-signed \n" + " URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\n" +"--SnapshotSize: long long int\n" + " **(when importing from a bucket)** The size of the snapshot you want to create in your \n" + " account, in bytes. This size must be greater than or equal to the size of the original, \n" + " uncompressed snapshot.\n" +"--SourceRegionName: string\n" + " **(when copying a snapshot)** The name of the source Region, which must be the same as the \n" + " Region of your account.\n" +"--SourceSnapshotId: string\n" + " **(when copying a snapshot)** The ID of the snapshot you want to copy.\n" +"--VolumeId: string\n" + " **(when creating from a volume)** The ID of the volume you want to create a snapshot of.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--IpRange: string\n" + " The IP range in the Subnet, in CIDR notation (for example, `10.0.0.0/16`).\nThe IP range of \n" + " the Subnet can be either the same as the Net one if you create only a single Subnet in this \n" + " Net, or a subset of the Net one. In case of several Subnets in a Net, their IP ranges must \n" + " not overlap. The smallest Subnet you can create uses a /29 netmask (eight IPs). For more \n" + " information, see [About Nets](https://docs.outscale.com/en/userguide/About-Nets.html).\n" +"--NetId: string\n" + " The ID of the Net for which you want to create a Subnet.\n" +"--SubregionName: string\n" + " The name of the Subregion in which you want to create the Subnet.\n" , - "--DeleteOnVmDeletion: bool\n" - " If true, the fGPU is deleted when the VM is terminated.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--FlexibleGpuId: string\n" - " The ID of the fGPU you want to modify.\n" +"--ResourceIds: array string\n" + " One or more resource IDs.\n" +"--Tags: array ref ResourceTag\n" + " One or more tags to add to the specified resources.\n" + " Information about the tag.\n" + " --Tags.INDEX.Key: string\n" + " The key of the tag, with a minimum of 1 character.\n" + " --Tags.INDEX.Value: string\n" + " The value of the tag, between 0 and 255 characters.\n" , - "--DirectLinkInterfaceId: string\n" - " The ID of the DirectLink interface you want to update.\n" + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Path: string\n" + " The path to the group. If not specified, it is set to a slash (`/`).\n" +"--UserGroupName: string\n" + " The name of the group.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Path: string\n" + " The path to the EIM user you want to create (by default, `/`). This path name must begin \n" + " and end with a slash (`/`), and contain between 1 and 512 alphanumeric characters and/or \n" + " slashes (`/`), or underscores (`_`).\n" +"--UserEmail: string\n" + " The email address of the EIM user.\n" +"--UserName: string\n" + " The name of the EIM user. This user name must contain between 1 and 64 alphanumeric \n" + " characters and/or pluses (`+`), equals (`=`), commas (`,`), periods (`.`), at signs (`@`), \n" + " dashes (`-`), or underscores (`_`).\n" +, + "--ConnectionType: string\n" + " The type of VPN connection supported by the virtual gateway (always `ipsec.1`).\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Mtu: long long int\n" - " The maximum transmission unit (MTU) of the DirectLink interface, in bytes (always `1500`).\n" , - "--DedicatedGroupId: string\n" - " The ID of the dedicated group you want to update.\n" + "--Description: string\n" + " A description for the VM group.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Name: string\n" - " The new name of the dedicated group.\n" +"--PositioningStrategy: string\n" + " The positioning strategy of VMs on hypervisors. By default, or if set to `no-strategy` our \n" + " orchestrator determines the most adequate position for your VMs. If set to `attract`, your \n" + " VMs are deployed on the same hypervisor, which improves network performance. If set to \n" + " `repulse`, your VMs are deployed on a different hypervisor, which improves fault tolerance.\n" +"--SecurityGroupIds: array string\n" + " One or more IDs of security groups for the VM group.\n" +"--SubnetId: string\n" + " The ID of the Subnet in which you want to create the VM group.\n" +"--Tags: array ref ResourceTag\n" + " One or more tags to add to the VM group.\n" + " Information about the tag.\n" + " --Tags.INDEX.Key: string\n" + " The key of the tag, with a minimum of 1 character.\n" + " --Tags.INDEX.Value: string\n" + " The value of the tag, between 0 and 255 characters.\n" +"--VmCount: long long int\n" + " The number of VMs deployed in the VM group.\n" +"--VmGroupName: string\n" + " The name of the VM group.\n" +"--VmTemplateId: string\n" + " The ID of the VM template used to launch VMs in the VM group.\n" , - "--CaId: string\n" - " The ID of the CA.\n" + "--CpuCores: long long int\n" + " The number of vCores to use for each VM.\n" +"--CpuGeneration: string\n" + " The processor generation to use for each VM (for example, `v4`).\n" +"--CpuPerformance: string\n" + " The performance of the VMs (`medium` \\| `high` \\| `highest`).\n" "--Description: string\n" - " The description of the CA.\n" + " A description for the VM template.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" +"--ImageId: string\n" + " The ID of the OMI to use for each VM. You can find a list of OMIs by calling the \n" + " [ReadImages](#readimages) method.\n" +"--KeypairName: string\n" + " The name of the keypair to use for each VM.\n" +"--Ram: long long int\n" + " The amount of RAM to use for each VM.\n" +"--Tags: array ref ResourceTag\n" + " One or more tags to add to the VM template.\n" + " Information about the tag.\n" + " --Tags.INDEX.Key: string\n" + " The key of the tag, with a minimum of 1 character.\n" + " --Tags.INDEX.Value: string\n" + " The value of the tag, between 0 and 255 characters.\n" +"--VmTemplateName: string\n" + " The name of the VM template.\n" , - "--ApiAccessRuleId: string\n" - " The ID of the API access rule you want to update.\n" -"--CaIds: array string\n" - " One or more IDs of Client Certificate Authorities (CAs).\n" -"--Cns: array string\n" - " One or more Client Certificate Common Names (CNs).\n" -"--Description: string\n" - " A new description for the API access rule.\n" + "--BlockDeviceMappings: array ref BlockDeviceMappingVmCreation\n" + " One or more block device mappings.\n" + " Information about the block device mapping.\n" + " --BlockDeviceMappings.INDEX.Bsu: ref BsuToCreate\n" + " Information about the BSU volume to create.\n" + " --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool\n" + " By default or if set to true, the volume is deleted when terminating the \n" + " VM. If false, the volume is not deleted when terminating the VM.\n" + " --BlockDeviceMappings.INDEX.Bsu.Iops: long long int\n" + " The number of I/O operations per second (IOPS). This parameter must be \n" + " specified only if you create an `io1` volume. The maximum number of IOPS \n" + " allowed for `io1` volumes is `13000` with a maximum performance ratio of \n" + " 300 IOPS per gibibyte.\n" + " --BlockDeviceMappings.INDEX.Bsu.SnapshotId: string\n" + " The ID of the snapshot used to create the volume.\n" + " --BlockDeviceMappings.INDEX.Bsu.VolumeSize: long long int\n" + " The size of the volume, in gibibytes (GiB).\nIf you specify a \n" + " snapshot ID, the volume size must be at least equal to the snapshot \n" + " size.\nIf you specify a snapshot ID but no volume size, the volume \n" + " is created with a size similar to the snapshot one.\n" + " --BlockDeviceMappings.INDEX.Bsu.VolumeType: string\n" + " The type of the volume (`standard` \\| `io1` \\| `gp2`). If not \n" + " specified in the request, a `standard` volume is created.\nFor more \n" + " information about volume types, see [About Volumes > Volume Types and \n" + " IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volume_ty\n" + " pes_and_iops).\n" + " --BlockDeviceMappings.INDEX.DeviceName: string\n" + " The device name for the volume. For a root device, you must use \n" + " `/dev/sda1`. For other volumes, you must use `/dev/sdX`, `/dev/sdXX`, \n" + " `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter between `b` \n" + " and `z`, and the second `X` is a letter between `a` and `z`).\n" + " --BlockDeviceMappings.INDEX.NoDevice: string\n" + " Removes the device which is included in the block device mapping of the \n" + " OMI.\n" + " --BlockDeviceMappings.INDEX.VirtualDeviceName: string\n" + " The name of the virtual device (`ephemeralN`).\n" +"--BootOnCreation: bool\n" + " By default or if true, the VM is started on creation. If false, the VM is stopped on \n" + " creation.\n" +"--BsuOptimized: bool\n" + " This parameter is not available. It is present in our API for the sake of historical \n" + " compatibility with AWS.\n" +"--ClientToken: string\n" + " A unique identifier which enables you to manage the idempotency.\n" +"--DeletionProtection: bool\n" + " If true, you cannot delete the VM unless you change this parameter back to false.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--IpRanges: array string\n" - " One or more IPs or CIDR blocks (for example, `192.0.2.0/16`).\n" +"--ImageId: string\n" + " The ID of the OMI used to create the VM. You can find the list of OMIs by calling the \n" + " [ReadImages](#readimages) method.\n" +"--KeypairName: string\n" + " The name of the keypair.\n" +"--MaxVmsCount: long long int\n" + " The maximum number of VMs you want to create. If all the VMs cannot be created, the largest \n" + " possible number of VMs above MinVmsCount is created.\n" +"--MinVmsCount: long long int\n" + " The minimum number of VMs you want to create. If this number of VMs cannot be created, no \n" + " VMs are created.\n" +"--NestedVirtualization: bool\n" + " (dedicated tenancy only) If true, nested virtualization is enabled. If false, it is \n" + " disabled.\n" +"--Nics: array ref NicForVmCreation\n" + " One or more NICs. If you specify this parameter, you must not specify the `SubnetId` and \n" + " `SubregionName` parameters. You also must define one NIC as the primary network interface \n" + " of the VM with `0` as its device number.\n" + " Information about the network interface card (NIC) when creating a \n" + " virtual machine (VM).\n" + " --Nics.INDEX.DeleteOnVmDeletion: bool\n" + " If true, the NIC is deleted when the VM is terminated. You can specify \n" + " this parameter only for a new NIC. To modify this value for an existing \n" + " NIC, see [UpdateNic](#updatenic).\n" + " --Nics.INDEX.Description: string\n" + " The description of the NIC, if you are creating a NIC when creating the \n" + " VM.\n" + " --Nics.INDEX.DeviceNumber: long long int\n" + " The index of the VM device for the NIC attachment (between `0` and `7`, \n" + " both included). This parameter is required if you create a NIC when \n" + " creating the VM.\n" + " --Nics.INDEX.NicId: string\n" + " The ID of the NIC, if you are attaching an existing NIC when creating a \n" + " VM.\n" + " --Nics.INDEX.PrivateIps: array ref PrivateIpLight\n" + " One or more private IPs to assign to the NIC, if you create a NIC when \n" + " creating a VM. Only one private IP can be the primary private IP.\n" + " Information about the private IP.\n" + " --Nics.INDEX.PrivateIps.INDEX.IsPrimary: bool\n" + " If true, the IP is the primary private IP of the NIC.\n" + " --Nics.INDEX.PrivateIps.INDEX.PrivateIp: string\n" + " The private IP of the NIC.\n" + " --Nics.INDEX.SecondaryPrivateIpCount: long long int\n" + " The number of secondary private IPs, if you create a NIC when creating a \n" + " VM. This parameter cannot be specified if you specified more than one \n" + " private IP in the `PrivateIps` parameter.\n" + " --Nics.INDEX.SecurityGroupIds: array string\n" + " One or more IDs of security groups for the NIC, if you create a NIC when \n" + " creating a VM.\n" + " --Nics.INDEX.SubnetId: string\n" + " The ID of the Subnet for the NIC, if you create a NIC when creating a \n" + " VM. This parameter is required if you create a NIC when creating the VM.\n" +"--Performance: string\n" + " The performance of the VM (`medium` \\| `high` \\| `highest`). By default, `high`. This \n" + " parameter is ignored if you specify a performance flag directly in the `VmType` parameter.\n" +"--Placement: ref Placement\n" + " Information about the placement of the VM.\n" + " --Placement.SubregionName: string\n" + " The name of the Subregion. If you specify this parameter, you must not \n" + " specify the `Nics` parameter.\n" + " --Placement.Tenancy: string\n" + " The tenancy of the VM (`default`, `dedicated`, or a dedicated group ID).\n" +"--PrivateIps: array string\n" + " One or more private IPs of the VM.\n" +"--SecurityGroupIds: array string\n" + " One or more IDs of security group for the VMs.\n" +"--SecurityGroups: array string\n" + " One or more names of security groups for the VMs.\n" +"--SubnetId: string\n" + " The ID of the Subnet in which you want to create the VM. If you specify this parameter, you \n" + " must not specify the `Nics` parameter.\n" +"--UserData: string\n" + " Data or script used to add a specific configuration to the VM. It must be Base64-encoded \n" + " and is limited to 500 kibibytes (KiB). For more information about user data, see \n" + " [Configuring a VM with User Data and OUTSCALE \n" + " Tags](https://docs.outscale.com/en/userguide/Configuring-a-VM-with-User-Data-and-OUTSCALE-Ta\n" + " gs.html).\n" +"--VmInitiatedShutdownBehavior: string\n" + " The VM behavior when you stop it. By default or if set to `stop`, the VM stops. If set to \n" + " `restart`, the VM stops then automatically restarts. If set to `terminate`, the VM stops \n" + " and is terminated.\n" +"--VmType: string\n" + " The type of VM. You can specify a TINA type (in the `tinavW.cXrYpZ` or `tinavW.cXrY` \n" + " format), or an AWS type (for example, `t2.small`, which is the default value).\nIf you \n" + " specify an AWS type, it is converted in the background to its corresponding TINA type, but \n" + " the AWS type is still returned. If the specified or converted TINA type includes a \n" + " performance flag, this performance flag is applied regardless of the value you may have \n" + " provided in the `Performance` parameter. For more information, see [VM \n" + " Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Iops: long long int\n" + " The number of I/O operations per second (IOPS). This parameter must be specified only if \n" + " you create an `io1` volume. The maximum number of IOPS allowed for `io1` volumes is `13000` \n" + " with a maximum performance ratio of 300 IOPS per gibibyte.\n" +"--Size: long long int\n" + " The size of the volume, in gibibytes (GiB). The maximum allowed size for a volume is 14901 \n" + " GiB. This parameter is required if the volume is not created from a snapshot (`SnapshotId` \n" + " unspecified).\n" +"--SnapshotId: string\n" + " The ID of the snapshot from which you want to create the volume.\n" +"--SubregionName: string\n" + " The Subregion in which you want to create the volume.\n" +"--VolumeType: string\n" + " The type of volume you want to create (`io1` \\| `gp2` \\| `standard`). If not specified, a \n" + " `standard` volume is created.\nFor more information about volume types, see [About Volumes \n" + " > Volume Types and \n" + " IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volume_types_and_iops).\n" , - "--DryRun: bool\n" + "--ClientGatewayId: string\n" + " The ID of the client gateway.\n" +"--ConnectionType: string\n" + " The type of VPN connection (always `ipsec.1`).\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--MaxAccessKeyExpirationSeconds: long long int\n" - " The maximum possible lifetime for your access keys, in seconds (between `0` and \n" - " `3153600000`, both included). If set to `O`, your access keys can have unlimited lifetimes, \n" - " but a trusted session cannot be activated. Otherwise, all your access keys must have an \n" - " expiration date. This value must be greater than the remaining lifetime of each access key \n" - " of your account.\n" -"--RequireTrustedEnv: bool\n" - " If true, a trusted session is activated, provided that you specify the \n" - " `MaxAccessKeyExpirationSeconds` parameter with a value greater than `0`.\nEnabling this \n" - " will require you and all your users to log in to Cockpit v2 using the WebAuthn method for \n" - " multi-factor authentication. For more information, see [About Authentication > Multi-Factor \n" - " Authentication](https://docs.outscale.com/en/userguide/About-Authentication.html#_multi_fact\n" - " or_authentication).\n" +"--StaticRoutesOnly: bool\n" + " By default or if false, the VPN connection uses dynamic routing with Border Gateway \n" + " Protocol (BGP). If true, routing is controlled using static routes. For more information \n" + " about how to create and delete static routes, see \n" + " [CreateVpnConnectionRoute](#createvpnconnectionroute) and \n" + " [DeleteVpnConnectionRoute](#deletevpnconnectionroute).\n" +"--VirtualGatewayId: string\n" + " The ID of the virtual gateway.\n" , - "--AdditionalEmails: array string\n" - " One or more additional email addresses for the account. These addresses are used for \n" - " notifications only. If you already have a list of additional emails registered, you cannot \n" - " add to it, only replace it. To remove all registered additional emails, specify an empty \n" - " list.\n" -"--City: string\n" - " The new city of the account owner.\n" -"--CompanyName: string\n" - " The new name of the company for the account.\n" -"--Country: string\n" - " The new country of the account owner.\n" + "--DestinationIpRange: string\n" + " The network prefix of the route, in CIDR notation (for example, `10.12.0.0/16`).\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Email: string\n" - " The main email address for the account. This address is used for your credentials and \n" - " notifications.\n" -"--FirstName: string\n" - " The new first name of the account owner.\n" -"--JobTitle: string\n" - " The new job title of the account owner.\n" -"--LastName: string\n" - " The new last name of the account owner.\n" -"--MobileNumber: string\n" - " The new mobile phone number of the account owner.\n" -"--PhoneNumber: string\n" - " The new landline phone number of the account owner.\n" -"--StateProvince: string\n" - " The new state/province of the account owner.\n" -"--VatNumber: string\n" - " The new value added tax (VAT) number for the account.\n" -"--ZipCode: string\n" - " The new ZIP code of the city.\n" +"--VpnConnectionId: string\n" + " The ID of the target VPN connection of the static route.\n" , "--AccessKeyId: string\n" - " The ID of the access key.\n" + " The ID of the access key you want to delete.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--ExpirationDate: string\n" - " The date and time, or the date, at which you want the access key to expire, in ISO 8601 \n" - " format (for example, `2020-06-14T00:00:00.000Z` or `2020-06-14`). If not specified, the \n" - " access key is set to not expire.\n" -"--State: string\n" - " The new state for the access key (`ACTIVE` \\| `INACTIVE`). When set to `ACTIVE`, the \n" - " access key is enabled and can be used to send requests. When set to `INACTIVE`, the access \n" - " key is disabled.\n" "--UserName: string\n" - " The name of the EIM user that the access key you want to modify is associated with. If you \n" - " do not specify a user name, this action modifies the access key of the user who sends the \n" - " request (which can be the root account).\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--ForceUnlink: bool\n" - " Forces the detachment of the volume in case of previous failure. Important: This action may \n" - " damage your data or file systems.\n" -"--VolumeId: string\n" - " The ID of the volume you want to detach.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--NetId: string\n" - " The ID of the Net from which you want to detach the virtual gateway.\n" -"--VirtualGatewayId: string\n" - " The ID of the virtual gateway.\n" + " The name of the EIM user the access key you want to delete is associated with. By default, \n" + " the user who sends the request (which can be the root account).\n" , - "--DryRun: bool\n" + "--ApiAccessRuleId: string\n" + " The ID of the API access rule you want to delete.\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--LinkRouteTableId: string\n" - " The ID of the association between the route table and the Subnet.\n" , - "--DryRun: bool\n" + "--CaId: string\n" + " The ID of the CA you want to delete.\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--LinkPublicIpId: string\n" - " The ID representing the association of the public IP with the VM or the NIC. This parameter \n" - " is required unless you use the `PublicIp` parameter.\n" -"--PublicIp: string\n" - " The public IP. This parameter is required unless you use the `LinkPublicIpId` parameter.\n" , - "--DryRun: bool\n" + "--ClientGatewayId: string\n" + " The ID of the client gateway you want to delete.\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--NicId: string\n" - " The ID of the NIC.\n" -"--PrivateIps: array string\n" - " One or more secondary private IPs you want to unassign from the NIC.\n" , - "--DryRun: bool\n" + "--DedicatedGroupId: string\n" + " The ID of the dedicated group you want to delete.\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--PolicyOrn: string\n" - " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" - " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" -"--UserName: string\n" - " The name of the user you want to detach the policy from.\n" +"--Force: bool\n" + " If true, forces the deletion of the dedicated group and all its dependencies.\n" , - "--DryRun: bool\n" + "--DhcpOptionsSetId: string\n" + " The ID of the DHCP options set you want to delete.\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--LinkNicId: string\n" - " The ID of the attachment operation.\n" , - "--DryRun: bool\n" + "--DirectLinkInterfaceId: string\n" + " The ID of the DirectLink interface you want to delete.\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--PolicyOrn: string\n" - " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" - " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" -"--UserGroupName: string\n" - " The name of the group you want to unlink the policy from.\n" , - "--BackendIps: array string\n" - " One or more public IPs of backend VMs.\n" -"--BackendVmIds: array string\n" - " One or more IDs of backend VMs.\n" + "--DirectLinkId: string\n" + " The ID of the DirectLink you want to delete.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--LoadBalancerName: string\n" - " The name of the load balancer.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--InternetServiceId: string\n" - " The ID of the Internet service you want to detach.\n" -"--NetId: string\n" - " The ID of the Net from which you want to detach the Internet service.\n" +"--ExportTaskId: string\n" + " The ID of the export task to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--FlexibleGpuId: string\n" - " The ID of the fGPU you want to detach from your VM.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--ForceStop: bool\n" - " Forces the VM to stop.\n" -"--VmIds: array string\n" - " One or more IDs of VMs.\n" + " The ID of the fGPU you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--VmIds: array string\n" - " One or more IDs of VMs.\n" -, - "--PolicyOrn: string\n" - " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" - " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" -"--VersionId: string\n" - " The ID of the version.\n" +"--ImageId: string\n" + " The ID of the OMI you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--VmAddition: long long int\n" - " The number of VMs you want to add to the VM group.\n" -"--VmGroupId: string\n" - " The ID of the VM group you want to scale up.\n" +"--InternetServiceId: string\n" + " The ID of the Internet service you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--VmGroupId: string\n" - " The ID of the VM group you want to scale down.\n" -"--VmSubtraction: long long int\n" - " The number of VMs you want to delete from the VM group.\n" +"--KeypairName: string\n" + " The name of the keypair you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--UserGroupName: string\n" - " The name of the group you want to remove the user from.\n" -"--UserGroupPath: string\n" - " The path to the group. If not specified, it is set to a slash (`/`).\n" -"--UserName: string\n" - " The name of the user you want to remove from the group.\n" -"--UserPath: string\n" - " The path to the user (by default, `/`).\n" +"--ListenerRuleName: string\n" + " The name of the rule you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--NetPeeringId: string\n" - " The ID of the Net peering you want to reject.\n" -, - "--BackendVmIds: array string\n" - " One or more IDs of backend VMs.\nSpecifying the same ID several times has no effect as each \n" - " backend VM has equal weight.\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" "--LoadBalancerName: string\n" - " The name of the load balancer.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--VmIds: array string\n" - " One or more IDs of the VMs you want to reboot.\n" + " The name of the load balancer for which you want to delete listeners.\n" +"--LoadBalancerPorts: array integer\n" + " One or more port numbers of the listeners you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersVpnConnection\n" - " One or more filters.\n" - " --Filters.BgpAsns: array integer\n" - " The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of \n" - " the connections.\n" - " --Filters.ClientGatewayIds: array string\n" - " The IDs of the client gateways.\n" - " --Filters.ConnectionTypes: array string\n" - " The types of the VPN connections (always `ipsec.1`).\n" - " --Filters.RouteDestinationIpRanges: array string\n" - " The destination IP ranges.\n" - " --Filters.States: array string\n" - " The states of the VPN connections (`pending` \\| `available` \\| \n" - " `deleting` \\| `deleted`).\n" - " --Filters.StaticRoutesOnly: bool\n" - " If false, the VPN connection uses dynamic routing with Border Gateway \n" - " Protocol (BGP). If true, routing is controlled using static routes. For \n" - " more information about how to create and delete static routes, see \n" - " [CreateVpnConnectionRoute](#createvpnconnectionroute) and \n" - " [DeleteVpnConnectionRoute](#deletevpnconnectionroute).\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the VPN connections.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the VPN connections.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the VPN \n" - " connections, in the following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" - " --Filters.VirtualGatewayIds: array string\n" - " The IDs of the virtual gateways.\n" - " --Filters.VpnConnectionIds: array string\n" - " The IDs of the VPN connections.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--LoadBalancerName: string\n" + " The name of the load balancer for which you want to delete a policy.\n" +"--PolicyName: string\n" + " The name of the policy you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersVolume\n" - " One or more filters.\n" - " --Filters.CreationDates: array string\n" - " The dates and times at which the volumes were created, in ISO 8601 \n" - " date-time format (for example, `2020-06-30T00:00:00.000Z`).\n" - " --Filters.LinkVolumeDeleteOnVmDeletion: bool\n" - " Whether the volumes are deleted or not when terminating the VMs.\n" - " --Filters.LinkVolumeDeviceNames: array string\n" - " The VM device names.\n" - " --Filters.LinkVolumeLinkDates: array string\n" - " The dates and times at which the volumes were attached, in ISO 8601 \n" - " date-time format (for example, `2020-06-30T00:00:00.000Z`).\n" - " --Filters.LinkVolumeLinkStates: array string\n" - " The attachment states of the volumes (`attaching` \\| `detaching` \\| \n" - " `attached` \\| `detached`).\n" - " --Filters.LinkVolumeVmIds: array string\n" - " One or more IDs of VMs.\n" - " --Filters.SnapshotIds: array string\n" - " The snapshots from which the volumes were created.\n" - " --Filters.SubregionNames: array string\n" - " The names of the Subregions in which the volumes were created.\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the volumes.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the volumes.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the volumes, in \n" - " the following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" - " --Filters.VolumeIds: array string\n" - " The IDs of the volumes.\n" - " --Filters.VolumeSizes: array integer\n" - " The sizes of the volumes, in gibibytes (GiB).\n" - " --Filters.VolumeStates: array string\n" - " The states of the volumes (`creating` \\| `available` \\| `in-use` \\| \n" - " `updating` \\| `deleting` \\| `error`).\n" - " --Filters.VolumeTypes: array string\n" - " The types of the volumes (`standard` \\| `gp2` \\| `io1`).\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--LoadBalancerName: string\n" + " The name of the load balancer you want to delete.\n" , - "--AllVms: bool\n" - " If true, includes the status of all VMs. By default or if set to false, only includes the \n" - " status of running VMs.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersVmsState\n" - " One or more filters.\n" - " --Filters.MaintenanceEventCodes: array string\n" - " The code for the scheduled event (`system-reboot` \\| \n" - " `system-maintenance`).\n" - " --Filters.MaintenanceEventDescriptions: array string\n" - " The description of the scheduled event.\n" - " --Filters.MaintenanceEventsNotAfter: array string\n" - " The latest date and time (UTC) the event can end.\n" - " --Filters.MaintenanceEventsNotBefore: array string\n" - " The earliest date and time (UTC) the event can start.\n" - " --Filters.SubregionNames: array string\n" - " The names of the Subregions of the VMs.\n" - " --Filters.VmIds: array string\n" - " One or more IDs of VMs.\n" - " --Filters.VmStates: array string\n" - " The states of the VMs (`pending` \\| `running` \\| `stopping` \\| \n" - " `stopped` \\| `shutting-down` \\| `terminated` \\| `quarantine`).\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--LoadBalancerNames: array string\n" + " One or more load balancer names.\n" +"--Tags: array ref ResourceLoadBalancerTag\n" + " One or more tags to delete from the load balancers.\n" + " Information about the tag.\n" + " --Tags.INDEX.Key: string\n" + " The key of the tag, with a minimum of 1 character.\n" , - "--BackendVmIds: array string\n" - " One or more IDs of backend VMs.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--LoadBalancerName: string\n" - " The name of the load balancer.\n" +"--NatServiceId: string\n" + " The ID of the NAT service you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersVm\n" - " One or more filters.\n" - " --Filters.Architectures: array string\n" - " The architectures of the VMs (`i386` \\| `x86_64`).\n" - " --Filters.BlockDeviceMappingDeleteOnVmDeletion: bool\n" - " Whether the BSU volumes are deleted when terminating the VMs.\n" - " --Filters.BlockDeviceMappingDeviceNames: array string\n" - " The device names for the BSU volumes (in the format `/dev/sdX`, \n" - " `/dev/sdXX`, `/dev/xvdX`, or `/dev/xvdXX`).\n" - " --Filters.BlockDeviceMappingLinkDates: array string\n" - " The link dates for the BSU volumes mapped to the VMs (for example, \n" - " `2016-01-23T18:45:30.000Z`).\n" - " --Filters.BlockDeviceMappingStates: array string\n" - " The states for the BSU volumes (`attaching` \\| `attached` \\| \n" - " `detaching` \\| `detached`).\n" - " --Filters.BlockDeviceMappingVolumeIds: array string\n" - " The volume IDs of the BSU volumes.\n" - " --Filters.ClientTokens: array string\n" - " The idempotency tokens provided when launching the VMs.\n" - " --Filters.CreationDates: array string\n" - " The dates when the VMs were launched.\n" - " --Filters.ImageIds: array string\n" - " The IDs of the OMIs used to launch the VMs.\n" - " --Filters.IsSourceDestChecked: bool\n" - " Whether the source/destination checking is enabled (true) or disabled \n" - " (false).\n" - " --Filters.KeypairNames: array string\n" - " The names of the keypairs used when launching the VMs.\n" - " --Filters.LaunchNumbers: array integer\n" - " The numbers for the VMs when launching a group of several VMs (for \n" - " example, `0`, `1`, `2`, and so on).\n" - " --Filters.Lifecycles: array string\n" - " Whether the VMs are Spot Instances (spot).\n" - " --Filters.NetIds: array string\n" - " The IDs of the Nets in which the VMs are running.\n" - " --Filters.NicAccountIds: array string\n" - " The IDs of the NICs.\n" - " --Filters.NicDescriptions: array string\n" - " The descriptions of the NICs.\n" - " --Filters.NicIsSourceDestChecked: bool\n" - " Whether the source/destination checking is enabled (true) or disabled \n" - " (false).\n" - " --Filters.NicLinkNicDeleteOnVmDeletion: bool\n" - " Whether the NICs are deleted when the VMs they are attached to are \n" - " deleted.\n" - " --Filters.NicLinkNicDeviceNumbers: array integer\n" - " The device numbers the NICs are attached to.\n" - " --Filters.NicLinkNicLinkNicDates: array string\n" - " The dates and times (UTC) when the NICs were attached to the VMs.\n" - " --Filters.NicLinkNicLinkNicIds: array string\n" - " The IDs of the NIC attachments.\n" - " --Filters.NicLinkNicStates: array string\n" - " The states of the attachments.\n" - " --Filters.NicLinkNicVmAccountIds: array string\n" - " The account IDs of the owners of the VMs the NICs are attached to.\n" - " --Filters.NicLinkNicVmIds: array string\n" - " The IDs of the VMs the NICs are attached to.\n" - " --Filters.NicLinkPublicIpAccountIds: array string\n" - " The account IDs of the owners of the public IPs associated with the \n" - " NICs.\n" - " --Filters.NicLinkPublicIpLinkPublicIpIds: array string\n" - " The association IDs returned when the public IPs were associated with \n" - " the NICs.\n" - " --Filters.NicLinkPublicIpPublicIpIds: array string\n" - " The allocation IDs returned when the public IPs were allocated to their \n" - " accounts.\n" - " --Filters.NicLinkPublicIpPublicIps: array string\n" - " The public IPs associated with the NICs.\n" - " --Filters.NicMacAddresses: array string\n" - " The Media Access Control (MAC) addresses of the NICs.\n" - " --Filters.NicNetIds: array string\n" - " The IDs of the Nets where the NICs are located.\n" - " --Filters.NicNicIds: array string\n" - " The IDs of the NICs.\n" - " --Filters.NicPrivateIpsLinkPublicIpAccountIds: array string\n" - " The account IDs of the owner of the public IPs associated with the \n" - " private IPs.\n" - " --Filters.NicPrivateIpsLinkPublicIpIds: array string\n" - " The public IPs associated with the private IPs.\n" - " --Filters.NicPrivateIpsPrimaryIp: bool\n" - " Whether the private IPs are the primary IPs associated with the NICs.\n" - " --Filters.NicPrivateIpsPrivateIps: array string\n" - " The private IPs of the NICs.\n" - " --Filters.NicSecurityGroupIds: array string\n" - " The IDs of the security groups associated with the NICs.\n" - " --Filters.NicSecurityGroupNames: array string\n" - " The names of the security groups associated with the NICs.\n" - " --Filters.NicStates: array string\n" - " The states of the NICs (`available` \\| `in-use`).\n" - " --Filters.NicSubnetIds: array string\n" - " The IDs of the Subnets for the NICs.\n" - " --Filters.NicSubregionNames: array string\n" - " The Subregions where the NICs are located.\n" - " --Filters.Platforms: array string\n" - " The platforms. Use windows if you have Windows VMs. Otherwise, leave \n" - " this filter blank.\n" - " --Filters.PrivateIps: array string\n" - " The private IPs of the VMs.\n" - " --Filters.ProductCodes: array string\n" - " The product codes associated with the OMI used to create the VMs.\n" - " --Filters.PublicIps: array string\n" - " The public IPs of the VMs.\n" - " --Filters.ReservationIds: array string\n" - " The IDs of the reservation of the VMs, created every time you launch \n" - " VMs. These reservation IDs can be associated with several VMs when you \n" - " lauch a group of VMs using the same launch request.\n" - " --Filters.RootDeviceNames: array string\n" - " The names of the root devices for the VMs (for example, `/dev/sda1`)\n" - " --Filters.RootDeviceTypes: array string\n" - " The root devices types used by the VMs (always `ebs`)\n" - " --Filters.SecurityGroupIds: array string\n" - " The IDs of the security groups for the VMs (only in the public Cloud).\n" - " --Filters.SecurityGroupNames: array string\n" - " The names of the security groups for the VMs (only in the public Cloud).\n" - " --Filters.StateReasonCodes: array integer\n" - " The reason codes for the state changes.\n" - " --Filters.StateReasonMessages: array string\n" - " The messages describing the state changes.\n" - " --Filters.StateReasons: array string\n" - " The reasons explaining the current states of the VMs. This filter is \n" - " like the `StateReasonCodes` one.\n" - " --Filters.SubnetIds: array string\n" - " The IDs of the Subnets for the VMs.\n" - " --Filters.SubregionNames: array string\n" - " The names of the Subregions of the VMs.\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the VMs.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the VMs.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the VMs, in the \n" - " following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" - " --Filters.Tenancies: array string\n" - " The tenancies of the VMs (`dedicated` \\| `default` \\| `host`).\n" - " --Filters.VmIds: array string\n" - " One or more IDs of VMs.\n" - " --Filters.VmSecurityGroupIds: array string\n" - " The IDs of the security groups for the VMs.\n" - " --Filters.VmSecurityGroupNames: array string\n" - " The names of the security group for the VMs.\n" - " --Filters.VmStateCodes: array integer\n" - " The state codes of the VMs: `-1` (quarantine), `0` (pending), `16` \n" - " (running), `32` (shutting-down), `48` (terminated), `64` (stopping), and \n" - " `80` (stopped).\n" - " --Filters.VmStateNames: array string\n" - " The state names of the VMs (`pending` \\| `running` \\| `stopping` \\| \n" - " `stopped` \\| `shutting-down` \\| `terminated` \\| `quarantine`).\n" - " --Filters.VmTypes: array string\n" - " The VM types (for example, t2.micro). For more information, see [VM \n" - " Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--NetAccessPointId: string\n" + " The ID of the Net access point.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--NetPeeringId: string\n" + " The ID of the Net peering you want to delete.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--NetId: string\n" + " The ID of the Net you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersVmType\n" - " One or more filters.\n" - " --Filters.BsuOptimized: bool\n" - " This parameter is not available. It is present in our API for the sake \n" - " of historical compatibility with AWS.\n" - " --Filters.EphemeralsTypes: array string\n" - " The types of ephemeral storage disk.\n" - " --Filters.Eths: array integer\n" - " The number of Ethernet interfaces available.\n" - " --Filters.Gpus: array integer\n" - " The number of GPUs available.\n" - " --Filters.MemorySizes: array double\n" - " The amounts of memory, in gibibytes (GiB).\n" - " --Filters.VcoreCounts: array integer\n" - " The numbers of vCores.\n" - " --Filters.VmTypeNames: array string\n" - " The names of the VM types. For more information, see [VM \n" - " Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" - " --Filters.VolumeCounts: array integer\n" - " The maximum number of ephemeral storage disks.\n" - " --Filters.VolumeSizes: array integer\n" - " The size of one ephemeral storage disk, in gibibytes (GiB).\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--NicId: string\n" + " The ID of the NIC you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersVmTemplate\n" - " One or more filters.\n" - " --Filters.CpuCores: array integer\n" - " The number of vCores.\n" - " --Filters.CpuGenerations: array string\n" - " The processor generations (for example, `v4`).\n" - " --Filters.CpuPerformances: array string\n" - " The performances of the VMs.\n" - " --Filters.Descriptions: array string\n" - " The descriptions of the VM templates.\n" - " --Filters.ImageIds: array string\n" - " The IDs of the OMIs.\n" - " --Filters.KeypairNames: array string\n" - " The names of the keypairs.\n" - " --Filters.Rams: array integer\n" - " The amount of RAM.\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the VM templates.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the VM templates.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the VM templates, \n" - " in the following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" - " --Filters.VmTemplateIds: array string\n" - " The IDs of the VM templates.\n" - " --Filters.VmTemplateNames: array string\n" - " The names of the VM templates.\n" +"--PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy you want to delete. For more information, \n" + " see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" +, + "--PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" +"--VersionId: string\n" + " The ID of the version of the policy you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersVmGroup\n" - " One or more filters.\n" - " --Filters.Descriptions: array string\n" - " The descriptions of the VM groups.\n" - " --Filters.SecurityGroupIds: array string\n" - " The IDs of the security groups.\n" - " --Filters.SubnetIds: array string\n" - " The IDs of the Subnets.\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the VM groups.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the VM groups.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the VMs, in the \n" - " following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" - " --Filters.VmCounts: array integer\n" - " The number of VMs in the VM group.\n" - " --Filters.VmGroupIds: array string\n" - " The IDs of the VM groups.\n" - " --Filters.VmGroupNames: array string\n" - " The names of the VM groups.\n" - " --Filters.VmTemplateIds: array string\n" - " The IDs of the VM templates.\n" +"--PublicIp: string\n" + " The public IP. In the public Cloud, this parameter is required.\n" +"--PublicIpId: string\n" + " The ID representing the association of the public IP with the VM or the NIC. In a Net, this \n" + " parameter is required.\n" +, + "--DestinationIpRange: string\n" + " The exact IP range for the route.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--RouteTableId: string\n" + " The ID of the route table from which you want to delete a route.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersVirtualGateway\n" - " One or more filters.\n" - " --Filters.ConnectionTypes: array string\n" - " The types of the virtual gateways (always `ipsec.1`).\n" - " --Filters.LinkNetIds: array string\n" - " The IDs of the Nets the virtual gateways are attached to.\n" - " --Filters.LinkStates: array string\n" - " The current states of the attachments between the virtual gateways and \n" - " the Nets (`attaching` \\| `attached` \\| `detaching` \\| `detached`).\n" - " --Filters.States: array string\n" - " The states of the virtual gateways (`pending` \\| `available` \\| \n" - " `deleting` \\| `deleted`).\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the virtual gateways.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the virtual gateways.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the virtual \n" - " gateways, in the following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" - " --Filters.VirtualGatewayIds: array string\n" - " The IDs of the virtual gateways.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--RouteTableId: string\n" + " The ID of the route table you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersUsers\n" - " One or more filters.\n" - " --Filters.UserIds: array string\n" - " The IDs of the users.\n" -"--FirstItem: long long int\n" - " The item starting the list of users requested.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of items that can be returned in a single response (by default, `100`).\n" +"--SecurityGroupId: string\n" + " The ID of the security group you want to delete.\n" +"--SecurityGroupName: string\n" + " The name of the security group.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Flow: string\n" + " The direction of the flow: `Inbound` or `Outbound`. You can specify `Outbound` for Nets \n" + " only.\n" +"--FromPortRange: long long int\n" + " The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.\n" +"--IpProtocol: string\n" + " The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all protocols). By default, `-1`. \n" + " In a Net, this can also be an IP protocol number. For more information, see the [IANA.org \n" + " website](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml).\n" +"--IpRange: string\n" + " The IP range for the security group rule, in CIDR notation (for example, `10.0.0.0/16`).\n" +"--Rules: array ref SecurityGroupRule\n" + " One or more rules you want to delete from the security group.\n" + " Information about the security group rule.\n" + " --Rules.INDEX.FromPortRange: long long int\n" + " The beginning of the port range for the TCP and UDP protocols, or an \n" + " ICMP type number.\n" + " --Rules.INDEX.IpProtocol: string\n" + " The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all protocols). \n" + " By default, `-1`. In a Net, this can also be an IP protocol number. For \n" + " more information, see the [IANA.org \n" + " website](https://www.iana.org/assignments/protocol-numbers/protocol-number\n" + " s.xhtml).\n" + " --Rules.INDEX.IpRanges: array string\n" + " One or more IP ranges for the security group rules, in CIDR notation \n" + " (for example, `10.0.0.0/16`).\n" + " --Rules.INDEX.SecurityGroupsMembers: array ref SecurityGroupsMember\n" + " Information about one or more source or destination security groups.\n" + " Information about a source or destination security group.\n" + " --Rules.INDEX.SecurityGroupsMembers.INDEX.AccountId: string\n" + " The account ID that owns the source or destination security group.\n" + " --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupId: string\n" + " The ID of a source or destination security group that you want to link \n" + " to the security group of the rule.\n" + " --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupName: string\n" + " (Public Cloud only) The name of a source or destination security group \n" + " that you want to link to the security group of the rule.\n" + " --Rules.INDEX.ServiceIds: array string\n" + " One or more service IDs to allow traffic from a Net to access the \n" + " corresponding OUTSCALE services. For more information, see \n" + " [ReadNetAccessPointServices](#readnetaccesspointservices).\n" + " --Rules.INDEX.ToPortRange: long long int\n" + " The end of the port range for the TCP and UDP protocols, or an ICMP code \n" + " number.\n" +"--SecurityGroupAccountIdToUnlink: string\n" + " The account ID of the owner of the security group you want to delete a rule from.\n" +"--SecurityGroupId: string\n" + " The ID of the security group you want to delete a rule from.\n" +"--SecurityGroupNameToUnlink: string\n" + " The ID of the source security group. If you are in the Public Cloud, you can also specify \n" + " the name of the source security group.\n" +"--ToPortRange: long long int\n" + " The end of the port range for the TCP and UDP protocols, or an ICMP code number.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Name: string\n" + " The name of the server certificate you want to delete.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--SnapshotId: string\n" + " The ID of the snapshot you want to delete.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--SubnetId: string\n" + " The ID of the Subnet you want to delete.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--ResourceIds: array string\n" + " One or more resource IDs.\n" +"--Tags: array ref ResourceTag\n" + " One or more tags to delete (if you set a tag value, only the tags matching exactly this \n" + " value are deleted).\n" + " Information about the tag.\n" + " --Tags.INDEX.Key: string\n" + " The key of the tag, with a minimum of 1 character.\n" + " --Tags.INDEX.Value: string\n" + " The value of the tag, between 0 and 255 characters.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--PolicyName: string\n" + " The name of the policy document you want to delete.\n" +"--UserGroupName: string\n" + " The name of the group.\n" +"--UserGroupPath: string\n" + " The path to the group. If not specified, it is set to a slash (`/`).\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Force: bool\n" + " If true, forces the deletion of the user group even if it is not empty.\n" +"--Path: string\n" + " The path to the group. If not specified, it is set to a slash (`/`).\n" +"--UserGroupName: string\n" + " The name of the group you want to delete.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--UserName: string\n" + " The name of the EIM user you want to delete.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--VirtualGatewayId: string\n" + " The ID of the virtual gateway you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--UserName: string\n" - " The name of the user.\n" -"--UserPath: string\n" - " The path to the user (by default, `/`).\n" +"--VmGroupId: string\n" + " The ID of the VM group you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersUserGroup\n" - " One or more filters.\n" - " --Filters.PathPrefix: string\n" - " The path prefix of the groups. If not specified, it is set to a slash \n" - " (`/`).\n" - " --Filters.UserGroupIds: array string\n" - " The IDs of the user groups.\n" -"--FirstItem: long long int\n" - " The item starting the list of groups requested.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of items that can be returned in a single response (by default, `100`).\n" +"--VmTemplateId: string\n" + " The ID of the VM template you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--PolicyName: string\n" - " The name of the policy.\n" -"--UserGroupName: string\n" - " The name of the group.\n" -"--UserGroupPath: string\n" - " The path to the group. If not specified, it is set to a slash (`/`).\n" +"--VmIds: array string\n" + " One or more IDs of VMs.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--FirstItem: long long int\n" - " The item starting the list of policies requested.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of items that can be returned in a single response (by default, `100`).\n" -"--UserGroupName: string\n" - " The name of the group.\n" -"--UserGroupPath: string\n" - " The path to the group. If not specified, it is set to a slash (`/`).\n" +"--VolumeId: string\n" + " The ID of the volume you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Path: string\n" - " The path to the group. If not specified, it is set to a slash (`/`).\n" -"--UserGroupName: string\n" - " The name of the group.\n" +"--VpnConnectionId: string\n" + " The ID of the VPN connection you want to delete.\n" , - "--Operation: string\n" - " The operation associated with the catalog entry (for example, `RunInstances-OD` or \n" - " `CreateVolume`).\n" -"--Service: string\n" - " The service associated with the catalog entry (for example, `TinaOS-FCU` or `TinaOS-OOS`).\n" -"--Type: string\n" - " The type associated with the catalog entry (for example, `BSU:VolumeIOPS:io1` or \n" - " `BoxUsage:tinav6.c6r16p3`).\n" + "--DestinationIpRange: string\n" + " The network prefix of the route to delete, in CIDR notation (for example, `10.12.0.0/16`).\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--VpnConnectionId: string\n" + " The ID of the target VPN connection of the static route to delete.\n" +, + "--BackendVmIds: array string\n" + " One or more IDs of backend VMs.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--LoadBalancerName: string\n" + " The name of the load balancer.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersTag\n" - " One or more filters.\n" - " --Filters.Keys: array string\n" - " The keys of the tags that are assigned to the resources. You can use \n" - " this filter alongside the `Values` filter. In that case, you filter the \n" - " resources corresponding to each tag, regardless of the other filter.\n" - " --Filters.ResourceIds: array string\n" - " The IDs of the resources with which the tags are associated.\n" - " --Filters.ResourceTypes: array string\n" - " The resource type (`vm` \\| `image` \\| `volume` \\| `snapshot` \\| \n" - " `public-ip` \\| `security-group` \\| `route-table` \\| `nic` \\| `net` \n" - " \\| `subnet` \\| `net-peering` \\| `net-access-point` \\| `nat-service` \n" - " \\| `internet-service` \\| `client-gateway` \\| `virtual-gateway` \\| \n" - " `vpn-connection` \\| `dhcp-options` \\| `task`).\n" - " --Filters.Values: array string\n" - " The values of the tags that are assigned to the resources. You can use \n" - " this filter alongside the `TagKeys` filter. In that case, you filter the \n" - " resources corresponding to each tag, regardless of the other filter.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--FlexibleGpuId: string\n" + " The ID of the fGPU you want to attach.\n" +"--VmId: string\n" + " The ID of the VM you want to attach the fGPU to.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersSubregion\n" - " One or more filters.\n" - " --Filters.RegionNames: array string\n" - " The names of the Regions containing the Subregions.\n" - " --Filters.States: array string\n" - " The states of the Subregions.\n" - " --Filters.SubregionNames: array string\n" - " The names of the Subregions.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--InternetServiceId: string\n" + " The ID of the Internet service you want to attach.\n" +"--NetId: string\n" + " The ID of the Net to which you want to attach the Internet service.\n" +, + "--BackendIps: array string\n" + " One or more public IPs of backend VMs.\n" +"--BackendVmIds: array string\n" + " One or more IDs of backend VMs.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--LoadBalancerName: string\n" + " The name of the load balancer.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersSubnet\n" - " One or more filters.\n" - " --Filters.AvailableIpsCounts: array integer\n" - " The number of available IPs.\n" - " --Filters.IpRanges: array string\n" - " The IP ranges in the Subnets, in CIDR notation (for example, \n" - " `10.0.0.0/16`).\n" - " --Filters.NetIds: array string\n" - " The IDs of the Nets in which the Subnets are.\n" - " --Filters.States: array string\n" - " The states of the Subnets (`pending` \\| `available` \\| `deleted`).\n" - " --Filters.SubnetIds: array string\n" - " The IDs of the Subnets.\n" - " --Filters.SubregionNames: array string\n" - " The names of the Subregions in which the Subnets are located.\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the Subnets.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the Subnets.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the Subnets, in \n" - " the following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" +"--UserGroupName: string\n" + " The name of the group you want to link the policy to.\n" +, + "--DeviceNumber: long long int\n" + " The index of the VM device for the NIC attachment (between `1` and `7`, both included).\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--NicId: string\n" + " The ID of the NIC you want to attach.\n" +"--VmId: string\n" + " The ID of the VM to which you want to attach the NIC.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersSnapshot\n" - " One or more filters.\n" - " --Filters.AccountAliases: array string\n" - " The account aliases of the owners of the snapshots.\n" - " --Filters.AccountIds: array string\n" - " The account IDs of the owners of the snapshots.\n" - " --Filters.Descriptions: array string\n" - " The descriptions of the snapshots.\n" - " --Filters.FromCreationDate: string\n" - " The beginning of the time period, in ISO 8601 date-time format (for \n" - " example, `2020-06-14T00:00:00.000Z`).\n" - " --Filters.PermissionsToCreateVolumeAccountIds: array string\n" - " The account IDs which have permissions to create volumes.\n" - " --Filters.PermissionsToCreateVolumeGlobalPermission: bool\n" - " If true, lists all public volumes. If false, lists all private volumes.\n" - " --Filters.Progresses: array integer\n" - " The progresses of the snapshots, as a percentage.\n" - " --Filters.SnapshotIds: array string\n" - " The IDs of the snapshots.\n" - " --Filters.States: array string\n" - " The states of the snapshots (`in-queue` \\| `pending` \\| `completed` \n" - " \\| `error` \\| `deleting`).\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the snapshots.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the snapshots.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the snapshots, in \n" - " the following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" - " --Filters.ToCreationDate: string\n" - " The end of the time period, in ISO 8601 date-time format (for example, \n" - " `2020-06-30T00:00:00.000Z`).\n" - " --Filters.VolumeIds: array string\n" - " The IDs of the volumes used to create the snapshots.\n" - " --Filters.VolumeSizes: array integer\n" - " The sizes of the volumes used to create the snapshots, in gibibytes \n" - " (GiB).\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" +"--UserName: string\n" + " The name of the user you want to link the policy to (between 1 and 64 characters).\n" +, + "--AllowRelink: bool\n" + " If true, allows an IP that is already assigned to another NIC in the same Subnet to be \n" + " assigned to the NIC you specified.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--NicId: string\n" + " The ID of the NIC.\n" +"--PrivateIps: array string\n" + " The secondary private IP or IPs you want to assign to the NIC within the IP range of the \n" + " Subnet.\n" +"--SecondaryPrivateIpCount: long long int\n" + " The number of secondary private IPs to assign to the NIC.\n" +, + "--AllowRelink: bool\n" + " If true, allows the public IP to be associated with the VM or NIC that you specify even if \n" + " it is already associated with another VM or NIC. If false, prevents the public IP from \n" + " being associated with the VM or NIC that you specify if it is already associated with \n" + " another VM or NIC. (By default, true in the public Cloud, false in a Net.)\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--NicId: string\n" + " (Net only) The ID of the NIC. This parameter is required if the VM has more than one NIC \n" + " attached. Otherwise, you need to specify the `VmId` parameter instead. You cannot specify \n" + " both parameters at the same time.\n" +"--PrivateIp: string\n" + " (Net only) The primary or secondary private IP of the specified NIC. By default, the \n" + " primary private IP.\n" +"--PublicIp: string\n" + " The public IP. This parameter is required unless you use the `PublicIpId` parameter.\n" +"--PublicIpId: string\n" + " The allocation ID of the public IP. This parameter is required unless you use the \n" + " `PublicIp` parameter.\n" +"--VmId: string\n" + " The ID of the VM.\n- In the public Cloud, this parameter is required.\n- In a Net, this \n" + " parameter is required if the VM has only one NIC. Otherwise, you need to specify the \n" + " `NicId` parameter instead. You cannot specify both parameters at the same time.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersExportTask\n" - " One or more filters.\n" - " --Filters.TaskIds: array string\n" - " The IDs of the export tasks.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--RouteTableId: string\n" + " The ID of the route table.\n" +"--SubnetId: string\n" + " The ID of the Subnet.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersServerCertificate\n" - " One or more filters.\n" - " --Filters.Paths: array string\n" - " The paths to the server certificates.\n" +"--NetId: string\n" + " The ID of the Net to which you want to attach the virtual gateway.\n" +"--VirtualGatewayId: string\n" + " The ID of the virtual gateway.\n" , - "--DryRun: bool\n" + "--DeviceName: string\n" + " The name of the device. For a root device, you must use `/dev/sda1`. For other volumes, you \n" + " must use `/dev/sdX`, `/dev/sdXX`, `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a \n" + " letter between `b` and `z`, and the second `X` is a letter between `a` and `z`).\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersSecurityGroup\n" - " One or more filters.\n" - " --Filters.Descriptions: array string\n" - " The descriptions of the security groups.\n" - " --Filters.InboundRuleAccountIds: array string\n" - " The account IDs that have been granted permissions.\n" - " --Filters.InboundRuleFromPortRanges: array integer\n" - " The beginnings of the port ranges for the TCP and UDP protocols, or the \n" - " ICMP type numbers.\n" - " --Filters.InboundRuleIpRanges: array string\n" - " The IP ranges that have been granted permissions, in CIDR notation (for \n" - " example, `10.0.0.0/24`).\n" - " --Filters.InboundRuleProtocols: array string\n" - " The IP protocols for the permissions (`tcp` \\| `udp` \\| `icmp`, or a \n" - " protocol number, or `-1` for all protocols).\n" - " --Filters.InboundRuleSecurityGroupIds: array string\n" - " The IDs of the security groups that have been granted permissions.\n" - " --Filters.InboundRuleSecurityGroupNames: array string\n" - " The names of the security groups that have been granted permissions.\n" - " --Filters.InboundRuleToPortRanges: array integer\n" - " The ends of the port ranges for the TCP and UDP protocols, or the ICMP \n" - " code numbers.\n" - " --Filters.NetIds: array string\n" - " The IDs of the Nets specified when the security groups were created.\n" - " --Filters.OutboundRuleAccountIds: array string\n" - " The account IDs that have been granted permissions.\n" - " --Filters.OutboundRuleFromPortRanges: array integer\n" - " The beginnings of the port ranges for the TCP and UDP protocols, or the \n" - " ICMP type numbers.\n" - " --Filters.OutboundRuleIpRanges: array string\n" - " The IP ranges that have been granted permissions, in CIDR notation (for \n" - " example, `10.0.0.0/24`).\n" - " --Filters.OutboundRuleProtocols: array string\n" - " The IP protocols for the permissions (`tcp` \\| `udp` \\| `icmp`, or a \n" - " protocol number, or `-1` for all protocols).\n" - " --Filters.OutboundRuleSecurityGroupIds: array string\n" - " The IDs of the security groups that have been granted permissions.\n" - " --Filters.OutboundRuleSecurityGroupNames: array string\n" - " The names of the security groups that have been granted permissions.\n" - " --Filters.OutboundRuleToPortRanges: array integer\n" - " The ends of the port ranges for the TCP and UDP protocols, or the ICMP \n" - " code numbers.\n" - " --Filters.SecurityGroupIds: array string\n" - " The IDs of the security groups.\n" - " --Filters.SecurityGroupNames: array string\n" - " The names of the security groups.\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the security groups.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the security groups.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the security \n" - " groups, in the following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--VmId: string\n" + " The ID of the VM you want to attach the volume to.\n" +"--VolumeId: string\n" + " The ID of the volume you want to attach.\n" , - "--AccessKeyId: string\n" - " The ID of the access key.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" +"--PolicyDocument: string\n" + " The policy document, corresponding to a JSON string that contains the policy. For more \n" + " information, see [EIM Reference \n" + " Information](https://docs.outscale.com/en/userguide/EIM-Reference-Information.html) and \n" + " [EIM Policy Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator.html).\n" +"--PolicyName: string\n" + " The name of the policy.\n" +"--UserGroupName: string\n" + " The name of the group.\n" +"--UserGroupPath: string\n" + " The path to the group. If not specified, it is set to a slash (`/`).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersRouteTable\n" +"--Filters: ref FiltersAccessKeys\n" " One or more filters.\n" - " --Filters.LinkRouteTableIds: array string\n" - " The IDs of the route tables involved in the associations.\n" - " --Filters.LinkRouteTableLinkRouteTableIds: array string\n" - " The IDs of the associations between the route tables and the Subnets.\n" - " --Filters.LinkRouteTableMain: bool\n" - " If true, the route tables are the main ones for their Nets.\n" - " --Filters.LinkSubnetIds: array string\n" - " The IDs of the Subnets involved in the associations.\n" - " --Filters.NetIds: array string\n" - " The IDs of the Nets for the route tables.\n" - " --Filters.RouteCreationMethods: array string\n" - " The methods used to create a route.\n" - " --Filters.RouteDestinationIpRanges: array string\n" - " The IP ranges specified in routes in the tables.\n" - " --Filters.RouteDestinationServiceIds: array string\n" - " The service IDs specified in routes in the tables.\n" - " --Filters.RouteGatewayIds: array string\n" - " The IDs of the gateways specified in routes in the tables.\n" - " --Filters.RouteNatServiceIds: array string\n" - " The IDs of the NAT services specified in routes in the tables.\n" - " --Filters.RouteNetPeeringIds: array string\n" - " The IDs of the Net peerings specified in routes in the tables.\n" - " --Filters.RouteStates: array string\n" - " The states of routes in the route tables (always `active`).\n" - " --Filters.RouteTableIds: array string\n" - " The IDs of the route tables.\n" - " --Filters.RouteVmIds: array string\n" - " The IDs of the VMs specified in routes in the tables.\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the route tables.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the route tables.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the route tables, \n" - " in the following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" + " --Filters.AccessKeyIds: array string\n" + " The IDs of the access keys.\n" + " --Filters.States: array string\n" + " The states of the access keys (`ACTIVE` \\| `INACTIVE`).\n" +"--UserName: string\n" + " The name of the EIM user. By default, the user who sends the request (which can be the root \n" + " account).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersQuota\n" - " One or more filters.\n" - " --Filters.Collections: array string\n" - " The group names of the quotas.\n" - " --Filters.QuotaNames: array string\n" - " The names of the quotas.\n" - " --Filters.QuotaTypes: array string\n" - " The resource IDs if these are resource-specific quotas, `global` if they \n" - " are not.\n" - " --Filters.ShortDescriptions: array string\n" - " The description of the quotas.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--VmId: string\n" + " The ID of the VM.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersPublicIp\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Filters: ref FiltersApiAccessRule\n" " One or more filters.\n" - " --Filters.LinkPublicIpIds: array string\n" - " The IDs representing the associations of public IPs with VMs or NICs.\n" - " --Filters.NicAccountIds: array string\n" - " The account IDs of the owners of the NICs.\n" - " --Filters.NicIds: array string\n" - " The IDs of the NICs.\n" - " --Filters.Placements: array string\n" - " Whether the public IPs are for use in the public Cloud or in a Net.\n" - " --Filters.PrivateIps: array string\n" - " The private IPs associated with the public IPs.\n" - " --Filters.PublicIpIds: array string\n" - " The IDs of the public IPs.\n" - " --Filters.PublicIps: array string\n" - " The public IPs.\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the public IPs.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the public IPs.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the public IPs, in \n" - " the following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" - " --Filters.VmIds: array string\n" - " The IDs of the VMs.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" + " --Filters.ApiAccessRuleIds: array string\n" + " One or more IDs of API access rules.\n" + " --Filters.CaIds: array string\n" + " One or more IDs of Client Certificate Authorities (CAs).\n" + " --Filters.Cns: array string\n" + " One or more Client Certificate Common Names (CNs).\n" + " --Filters.Descriptions: array string\n" + " One or more descriptions of API access rules.\n" + " --Filters.IpRanges: array string\n" + " One or more IPs or CIDR blocks (for example, `192.0.2.0/16`).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" +"--Filters: ref FiltersApiLog\n" + " One or more filters.\n" + " --Filters.QueryAccessKeys: array string\n" + " The access keys used for the logged calls.\n" + " --Filters.QueryApiNames: array string\n" + " The names of the APIs of the logged calls (always `oapi` for the \n" + " OUTSCALE API).\n" + " --Filters.QueryCallNames: array string\n" + " The names of the logged calls.\n" + " --Filters.QueryDateAfter: string\n" + " The date and time, or the date, after which you want to retrieve logged \n" + " calls, in ISO 8601 format (for example, `2020-06-14T00:00:00.000Z` or \n" + " `2020-06-14`). By default, this date is set to 48 hours before the \n" + " `QueryDateBefore` parameter value.\n" + " --Filters.QueryDateBefore: string\n" + " The date and time, or the date, before which you want to retrieve logged \n" + " calls, in ISO 8601 format (for example, `2020-06-30T00:00:00.000Z` or \n" + " `2020-06-14`). By default, this date is set to now, or 48 hours after the \n" + " `QueryDateAfter` parameter value.\n" + " --Filters.QueryIpAddresses: array string\n" + " The IPs used for the logged calls.\n" + " --Filters.QueryUserAgents: array string\n" + " The user agents of the HTTP requests of the logged calls.\n" + " --Filters.RequestIds: array string\n" + " The request IDs provided in the responses of the logged calls.\n" + " --Filters.ResponseStatusCodes: array integer\n" + " The HTTP status codes of the logged calls.\n" "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" +"--With: ref With\n" + " The information to display in each returned log.\n" + " --With.AccountId: bool\n" + " By default or if set to true, the account ID is displayed.\n" + " --With.CallDuration: bool\n" + " By default or if set to true, the duration of the call is displayed.\n" + " --With.QueryAccessKey: bool\n" + " By default or if set to true, the access key is displayed.\n" + " --With.QueryApiName: bool\n" + " By default or if set to true, the name of the API is displayed.\n" + " --With.QueryApiVersion: bool\n" + " By default or if set to true, the version of the API is displayed.\n" + " --With.QueryCallName: bool\n" + " By default or if set to true, the name of the call is displayed.\n" + " --With.QueryDate: bool\n" + " By default or if set to true, the date of the call is displayed.\n" + " --With.QueryHeaderRaw: bool\n" + " By default or if set to true, the raw header of the HTTP request is \n" + " displayed.\n" + " --With.QueryHeaderSize: bool\n" + " By default or if set to true, the size of the raw header of the HTTP \n" + " request is displayed.\n" + " --With.QueryIpAddress: bool\n" + " By default or if set to true, the IP is displayed.\n" + " --With.QueryPayloadRaw: bool\n" + " By default or if set to true, the raw payload of the HTTP request is \n" + " displayed.\n" + " --With.QueryPayloadSize: bool\n" + " By default or if set to true, the size of the raw payload of the HTTP \n" + " request is displayed.\n" + " --With.QueryUserAgent: bool\n" + " By default or if set to true, the user agent of the HTTP request is \n" + " displayed.\n" + " --With.RequestId: bool\n" + " By default or if set to true, the request ID is displayed.\n" + " --With.ResponseSize: bool\n" + " By default or if set to true, the size of the response is displayed.\n" + " --With.ResponseStatusCode: bool\n" + " By default or if set to true, the HTTP status code of the response is \n" + " displayed.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersProductType\n" +"--Filters: ref FiltersCa\n" " One or more filters.\n" - " --Filters.ProductTypeIds: array string\n" - " The IDs of the product types.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" -, - "--FirstItem: long long int\n" - " The item starting the list of policies requested.\n" -"--PolicyOrn: string\n" - " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" - " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" -"--ResultsPerPage: long long int\n" - " The maximum number of items that can be returned in a single response (by default, `100`).\n" -, - "--PolicyOrn: string\n" - " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" - " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" -"--VersionId: string\n" - " The ID of the policy version.\n" -, - "--PolicyOrn: string\n" - " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" - " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" + " --Filters.CaFingerprints: array string\n" + " The fingerprints of the CAs.\n" + " --Filters.CaIds: array string\n" + " The IDs of the CAs.\n" + " --Filters.Descriptions: array string\n" + " The descriptions of the CAs.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref ReadPoliciesFilters\n" - " One or more filters.\n" - " --Filters.OnlyLinked: bool\n" - " If set to true, lists only the policies attached to a user.\n" - " --Filters.PathPrefix: string\n" - " The path prefix you can use to filter the results. If not specified, it \n" - " is set to a slash (`/`).\n" - " --Filters.Scope: string\n" - " The scope to filter policies (`OWS` \\| `LOCAL`).\n" -"--FirstItem: long long int\n" - " The item starting the list of policies requested.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of items that can be returned in a single response (by default, `100`).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersNic\n" +"--Filters: ref FiltersCatalogs\n" " One or more filters.\n" - " --Filters.Descriptions: array string\n" - " The descriptions of the NICs.\n" - " --Filters.IsSourceDestCheck: bool\n" - " Whether the source/destination checking is enabled (true) or disabled \n" - " (false).\n" - " --Filters.LinkNicDeleteOnVmDeletion: bool\n" - " Whether the NICs are deleted when the VMs they are attached to are \n" - " terminated.\n" - " --Filters.LinkNicDeviceNumbers: array integer\n" - " The device numbers the NICs are attached to.\n" - " --Filters.LinkNicLinkNicIds: array string\n" - " The attachment IDs of the NICs.\n" - " --Filters.LinkNicStates: array string\n" - " The states of the attachments.\n" - " --Filters.LinkNicVmAccountIds: array string\n" - " The account IDs of the owners of the VMs the NICs are attached to.\n" - " --Filters.LinkNicVmIds: array string\n" - " The IDs of the VMs the NICs are attached to.\n" - " --Filters.LinkPublicIpAccountIds: array string\n" - " The account IDs of the owners of the public IPs associated with the \n" - " NICs.\n" - " --Filters.LinkPublicIpLinkPublicIpIds: array string\n" - " The association IDs returned when the public IPs were associated with \n" - " the NICs.\n" - " --Filters.LinkPublicIpPublicDnsNames: array string\n" - " The public DNS names associated with the public IPs.\n" - " --Filters.LinkPublicIpPublicIpIds: array string\n" - " The allocation IDs returned when the public IPs were allocated to their \n" - " accounts.\n" - " --Filters.LinkPublicIpPublicIps: array string\n" - " The public IPs associated with the NICs.\n" - " --Filters.MacAddresses: array string\n" - " The Media Access Control (MAC) addresses of the NICs.\n" - " --Filters.NetIds: array string\n" - " The IDs of the Nets where the NICs are located.\n" - " --Filters.NicIds: array string\n" - " The IDs of the NICs.\n" - " --Filters.PrivateDnsNames: array string\n" - " The private DNS names associated with the primary private IPs.\n" - " --Filters.PrivateIpsLinkPublicIpAccountIds: array string\n" - " The account IDs of the owner of the public IPs associated with the \n" - " private IPs.\n" - " --Filters.PrivateIpsLinkPublicIpPublicIps: array string\n" - " The public IPs associated with the private IPs.\n" - " --Filters.PrivateIpsPrimaryIp: bool\n" - " Whether the private IP is the primary IP associated with the NIC.\n" - " --Filters.PrivateIpsPrivateIps: array string\n" - " The private IPs of the NICs.\n" - " --Filters.SecurityGroupIds: array string\n" - " The IDs of the security groups associated with the NICs.\n" - " --Filters.SecurityGroupNames: array string\n" - " The names of the security groups associated with the NICs.\n" - " --Filters.States: array string\n" - " The states of the NICs.\n" - " --Filters.SubnetIds: array string\n" - " The IDs of the Subnets for the NICs.\n" - " --Filters.SubregionNames: array string\n" - " The Subregions where the NICs are located.\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the NICs.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the NICs.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the NICs, in the \n" - " following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" + " --Filters.CurrentCatalogOnly: bool\n" + " By default or if set to true, only returns the current catalog. If \n" + " false, returns the current catalog and past catalogs.\n" + " --Filters.FromDate: string\n" + " The beginning of the time period, in ISO 8601 date format (for example, \n" + " `2020-06-14`). This date cannot be older than 3 years. You must specify \n" + " the parameters `FromDate` and `ToDate` together.\n" + " --Filters.ToDate: string\n" + " The end of the time period, in ISO 8601 date format (for example, \n" + " `2020-06-30`). You must specify the parameters `FromDate` and `ToDate` \n" + " together.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersNet\n" +"--Filters: ref FiltersClientGateway\n" " One or more filters.\n" - " --Filters.DhcpOptionsSetIds: array string\n" - " The IDs of the DHCP options sets.\n" - " --Filters.IpRanges: array string\n" - " The IP ranges for the Nets, in CIDR notation (for example, \n" - " `10.0.0.0/16`).\n" - " --Filters.IsDefault: bool\n" - " If true, the Net used is the default one.\n" - " --Filters.NetIds: array string\n" - " The IDs of the Nets.\n" + " --Filters.BgpAsns: array integer\n" + " The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of \n" + " the connections.\n" + " --Filters.ClientGatewayIds: array string\n" + " The IDs of the client gateways.\n" + " --Filters.ConnectionTypes: array string\n" + " The types of communication tunnels used by the client gateways (always \n" + " `ipsec.1`).\n" + " --Filters.PublicIps: array string\n" + " The public IPv4 addresses of the client gateways.\n" " --Filters.States: array string\n" - " The states of the Nets (`pending` \\| `available` \\| `deleting`).\n" + " The states of the client gateways (`pending` \\| `available` \\| \n" + " `deleting` \\| `deleted`).\n" " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the Nets.\n" + " The keys of the tags associated with the client gateways.\n" " --Filters.TagValues: array string\n" - " The values of the tags associated with the Nets.\n" + " The values of the tags associated with the client gateways.\n" " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the Nets, in the \n" - " following format: \n" + " The key/value combination of the tags associated with the client \n" + " gateways, in the following format: \n" " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" @@ -2340,81 +2314,43 @@ static const char *calls_args_descriptions[] = { , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersNetPeering\n" - " One or more filters.\n" - " --Filters.AccepterNetAccountIds: array string\n" - " The account IDs of the owners of the peer Nets.\n" - " --Filters.AccepterNetIpRanges: array string\n" - " The IP ranges of the peer Nets, in CIDR notation (for example, \n" - " `10.0.0.0/24`).\n" - " --Filters.AccepterNetNetIds: array string\n" - " The IDs of the peer Nets.\n" - " --Filters.ExpirationDates: array string\n" - " The dates and times at which the Net peerings expire, in ISO 8601 \n" - " date-time format (for example, `2020-06-14T00:00:00.000Z`).\n" - " --Filters.NetPeeringIds: array string\n" - " The IDs of the Net peerings.\n" - " --Filters.SourceNetAccountIds: array string\n" - " The account IDs of the owners of the peer Nets.\n" - " --Filters.SourceNetIpRanges: array string\n" - " The IP ranges of the peer Nets.\n" - " --Filters.SourceNetNetIds: array string\n" - " The IDs of the peer Nets.\n" - " --Filters.StateMessages: array string\n" - " Additional information about the states of the Net peerings.\n" - " --Filters.StateNames: array string\n" - " The states of the Net peerings (`pending-acceptance` \\| `active` \\| \n" - " `rejected` \\| `failed` \\| `expired` \\| `deleted`).\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the Net peerings.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the Net peerings.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the Net peerings, \n" - " in the following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--VmId: string\n" + " The ID of the VM.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersNetAccessPoint\n" - " One or more filters.\n" - " --Filters.NetAccessPointIds: array string\n" - " The IDs of the Net access points.\n" - " --Filters.NetIds: array string\n" - " The IDs of the Nets.\n" - " --Filters.ServiceNames: array string\n" - " The names of the services. For more information, see \n" - " [ReadNetAccessPointServices](#readnetaccesspointservices).\n" - " --Filters.States: array string\n" - " The states of the Net access points (`pending` \\| `available` \\| \n" - " `deleting` \\| `deleted`).\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the Net access points.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the Net access points.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the Net access \n" - " points, in the following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--FromDate: string\n" + " The beginning of the time period, in ISO 8601 date format (for example, `2020-06-14`). The \n" + " date-time format is also accepted, but only with a time set to midnight (for example, \n" + " `2020-06-14T00:00:00.000Z`). This value is included in the time period.\n" +"--Overall: bool\n" + " By default or if false, returns only the consumption of the specific account that sends \n" + " this request. If true, returns either the overall consumption of your paying account and \n" + " all linked accounts (if the account that sends this request is a paying account) or returns \n" + " nothing (if the account that sends this request is a linked account).\n" +"--ShowPrice: bool\n" + " If true, the response also includes the unit price of the consumed resource (`UnitPrice`) \n" + " and the total price of the consumed resource during the specified time period (`Price`), in \n" + " the currency of your account.\n" +"--ToDate: string\n" + " The end of the time period, in ISO 8601 date format (for example, `2020-06-30`). The \n" + " date-time format is also accepted, but only with a time set to midnight (for example, \n" + " `2020-06-30T00:00:00.000Z`). This value is excluded from the time period, and must be set \n" + " to a later date than `FromDate`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersService\n" +"--Filters: ref FiltersDedicatedGroup\n" " One or more filters.\n" - " --Filters.ServiceIds: array string\n" - " The IDs of the services.\n" - " --Filters.ServiceNames: array string\n" - " The names of the services.\n" + " --Filters.CpuGenerations: array integer\n" + " The processor generation for the VMs in the dedicated group (for \n" + " example, `4`).\n" + " --Filters.DedicatedGroupIds: array string\n" + " The IDs of the dedicated groups.\n" + " --Filters.Names: array string\n" + " The names of the dedicated groups.\n" + " --Filters.SubregionNames: array string\n" + " The names of the Subregions in which the dedicated groups are located.\n" "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" @@ -2423,26 +2359,29 @@ static const char *calls_args_descriptions[] = { , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersNatService\n" +"--Filters: ref FiltersDhcpOptions\n" " One or more filters.\n" - " --Filters.ClientTokens: array string\n" - " The idempotency tokens provided when creating the NAT services.\n" - " --Filters.NatServiceIds: array string\n" - " The IDs of the NAT services.\n" - " --Filters.NetIds: array string\n" - " The IDs of the Nets in which the NAT services are.\n" - " --Filters.States: array string\n" - " The states of the NAT services (`pending` \\| `available` \\| `deleting` \n" - " \\| `deleted`).\n" - " --Filters.SubnetIds: array string\n" - " The IDs of the Subnets in which the NAT services are.\n" + " --Filters.Default: bool\n" + " If true, lists all default DHCP options set. If false, lists all \n" + " non-default DHCP options set.\n" + " --Filters.DhcpOptionsSetIds: array string\n" + " The IDs of the DHCP options sets.\n" + " --Filters.DomainNameServers: array string\n" + " The IPs of the domain name servers used for the DHCP options sets.\n" + " --Filters.DomainNames: array string\n" + " The domain names used for the DHCP options sets.\n" + " --Filters.LogServers: array string\n" + " The IPs of the log servers used for the DHCP options sets.\n" + " --Filters.NtpServers: array string\n" + " The IPs of the Network Time Protocol (NTP) servers used for the DHCP \n" + " options sets.\n" " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the NAT services.\n" + " The keys of the tags associated with the DHCP options sets.\n" " --Filters.TagValues: array string\n" - " The values of the tags associated with the NAT services.\n" + " The values of the tags associated with the DHCP options sets.\n" " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the NAT services, \n" - " in the following format: \n" + " The key/value combination of the tags associated with the DHCP options \n" + " sets, in the following format: \n" " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" @@ -2452,22 +2391,12 @@ static const char *calls_args_descriptions[] = { , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersUserGroup\n" +"--Filters: ref FiltersDirectLinkInterface\n" " One or more filters.\n" - " --Filters.PathPrefix: string\n" - " The path prefix of the groups. If not specified, it is set to a slash \n" - " (`/`).\n" - " --Filters.UserGroupIds: array string\n" - " The IDs of the user groups.\n" -"--FirstItem: long long int\n" - " The item starting the list of policies requested.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of items that can be returned in a single response (by default, `100`).\n" -"--UserGroupName: string\n" - " The name of the group.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" + " --Filters.DirectLinkIds: array string\n" + " The IDs of the DirectLinks.\n" + " --Filters.DirectLinkInterfaceIds: array string\n" + " The IDs of the DirectLink interfaces.\n" "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" @@ -2476,74 +2405,57 @@ static const char *calls_args_descriptions[] = { , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersLoadBalancer\n" +"--Filters: ref FiltersDirectLink\n" " One or more filters.\n" - " --Filters.LoadBalancerNames: array string\n" - " The names of the load balancers.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--LoadBalancerNames: array string\n" - " One or more load balancer names.\n" + " --Filters.DirectLinkIds: array string\n" + " The IDs of the DirectLinks.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersListenerRule\n" - " One or more filters.\n" - " --Filters.ListenerRuleNames: array string\n" - " The names of the listener rules.\n" + "--EntitiesType: array string\n" + " The type of entity linked to the policy (`ACCOUNT` \\| `USER` \\| `GROUP`) you want to get \n" + " information about.\n" +"--FirstItem: long long int\n" + " The item starting the list of entities requested.\n" +"--PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" +"--ResultsPerPage: long long int\n" + " The maximum number of items that can be returned in a single response (by default, 100).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref ReadLinkedPoliciesFilters\n" - " One or more filters.\n" - " --Filters.PathPrefix: string\n" - " The path prefix of the policies. If not specified, it is set to a slash \n" - " (`/`).\n" -"--FirstItem: long long int\n" - " The item starting the list of policies requested.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of items that can be returned in a single response (by default, `100`).\n" -"--UserName: string\n" - " The name of the user the policies are linked to.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersKeypair\n" +"--Filters: ref FiltersFlexibleGpu\n" " One or more filters.\n" - " --Filters.KeypairFingerprints: array string\n" - " The fingerprints of the keypairs.\n" - " --Filters.KeypairNames: array string\n" - " The names of the keypairs.\n" - " --Filters.KeypairTypes: array string\n" - " The types of the keypairs (`ssh-rsa`, `ssh-ed25519`, \n" - " `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or `ecdsa-sha2-nistp521`).\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" + " --Filters.DeleteOnVmDeletion: bool\n" + " Indicates whether the fGPU is deleted when terminating the VM.\n" + " --Filters.FlexibleGpuIds: array string\n" + " One or more IDs of fGPUs.\n" + " --Filters.Generations: array string\n" + " The processor generations that the fGPUs are compatible with.\n" + " --Filters.ModelNames: array string\n" + " One or more models of fGPUs. For more information, see [About Flexible \n" + " GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html).\n" + " --Filters.States: array string\n" + " The states of the fGPUs (`allocated` \\| `attaching` \\| `attached` \\| \n" + " `detaching`).\n" + " --Filters.SubregionNames: array string\n" + " The Subregions where the fGPUs are located.\n" + " --Filters.VmIds: array string\n" + " One or more IDs of VMs.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersInternetService\n" +"--Filters: ref FiltersExportTask\n" " One or more filters.\n" - " --Filters.InternetServiceIds: array string\n" - " The IDs of the Internet services.\n" - " --Filters.LinkNetIds: array string\n" - " The IDs of the Nets the Internet services are attached to.\n" - " --Filters.LinkStates: array string\n" - " The current states of the attachments between the Internet services and \n" - " the Nets (only `available`, if the Internet gateway is attached to a \n" - " Net).\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the Internet services.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the Internet services.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the Internet \n" - " services, in the following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" + " --Filters.TaskIds: array string\n" + " The IDs of the export tasks.\n" "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" @@ -2589,95 +2501,22 @@ static const char *calls_args_descriptions[] = { " The names of the product codes associated with the OMI.\n" " --Filters.ProductCodes: array string\n" " The product codes associated with the OMI.\n" - " --Filters.RootDeviceNames: array string\n" - " The name of the root device. This value must be /dev/sda1.\n" - " --Filters.RootDeviceTypes: array string\n" - " The types of root device used by the OMIs (`bsu` or `ebs`).\n" - " --Filters.States: array string\n" - " The states of the OMIs (`pending` \\| `available` \\| `failed`).\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the OMIs.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the OMIs.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the OMIs, in the \n" - " following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" - " --Filters.VirtualizationTypes: array string\n" - " The virtualization types (always `hvm`).\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersExportTask\n" - " One or more filters.\n" - " --Filters.TaskIds: array string\n" - " The IDs of the export tasks.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersFlexibleGpu\n" - " One or more filters.\n" - " --Filters.DeleteOnVmDeletion: bool\n" - " Indicates whether the fGPU is deleted when terminating the VM.\n" - " --Filters.FlexibleGpuIds: array string\n" - " One or more IDs of fGPUs.\n" - " --Filters.Generations: array string\n" - " The processor generations that the fGPUs are compatible with.\n" - " --Filters.ModelNames: array string\n" - " One or more models of fGPUs. For more information, see [About Flexible \n" - " GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html).\n" - " --Filters.States: array string\n" - " The states of the fGPUs (`allocated` \\| `attaching` \\| `attached` \\| \n" - " `detaching`).\n" - " --Filters.SubregionNames: array string\n" - " The Subregions where the fGPUs are located.\n" - " --Filters.VmIds: array string\n" - " One or more IDs of VMs.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -, - "--EntitiesType: array string\n" - " The type of entity linked to the policy (`ACCOUNT` \\| `USER` \\| `GROUP`) you want to get \n" - " information about.\n" -"--FirstItem: long long int\n" - " The item starting the list of entities requested.\n" -"--PolicyOrn: string\n" - " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" - " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" -"--ResultsPerPage: long long int\n" - " The maximum number of items that can be returned in a single response (by default, 100).\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersDirectLink\n" - " One or more filters.\n" - " --Filters.DirectLinkIds: array string\n" - " The IDs of the DirectLinks.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersDirectLinkInterface\n" - " One or more filters.\n" - " --Filters.DirectLinkIds: array string\n" - " The IDs of the DirectLinks.\n" - " --Filters.DirectLinkInterfaceIds: array string\n" - " The IDs of the DirectLink interfaces.\n" + " --Filters.RootDeviceNames: array string\n" + " The name of the root device. This value must be /dev/sda1.\n" + " --Filters.RootDeviceTypes: array string\n" + " The types of root device used by the OMIs (`bsu` or `ebs`).\n" + " --Filters.States: array string\n" + " The states of the OMIs (`pending` \\| `available` \\| `failed`).\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the OMIs.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the OMIs.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the OMIs, in the \n" + " following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" + " --Filters.VirtualizationTypes: array string\n" + " The virtualization types (always `hvm`).\n" "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" @@ -2686,29 +2525,23 @@ static const char *calls_args_descriptions[] = { , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersDhcpOptions\n" +"--Filters: ref FiltersInternetService\n" " One or more filters.\n" - " --Filters.Default: bool\n" - " If true, lists all default DHCP options set. If false, lists all \n" - " non-default DHCP options set.\n" - " --Filters.DhcpOptionsSetIds: array string\n" - " The IDs of the DHCP options sets.\n" - " --Filters.DomainNameServers: array string\n" - " The IPs of the domain name servers used for the DHCP options sets.\n" - " --Filters.DomainNames: array string\n" - " The domain names used for the DHCP options sets.\n" - " --Filters.LogServers: array string\n" - " The IPs of the log servers used for the DHCP options sets.\n" - " --Filters.NtpServers: array string\n" - " The IPs of the Network Time Protocol (NTP) servers used for the DHCP \n" - " options sets.\n" + " --Filters.InternetServiceIds: array string\n" + " The IDs of the Internet services.\n" + " --Filters.LinkNetIds: array string\n" + " The IDs of the Nets the Internet services are attached to.\n" + " --Filters.LinkStates: array string\n" + " The current states of the attachments between the Internet services and \n" + " the Nets (only `available`, if the Internet gateway is attached to a \n" + " Net).\n" " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the DHCP options sets.\n" + " The keys of the tags associated with the Internet services.\n" " --Filters.TagValues: array string\n" - " The values of the tags associated with the DHCP options sets.\n" + " The values of the tags associated with the Internet services.\n" " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the DHCP options \n" - " sets, in the following format: \n" + " The key/value combination of the tags associated with the Internet \n" + " services, in the following format: \n" " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" @@ -2718,17 +2551,15 @@ static const char *calls_args_descriptions[] = { , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersDedicatedGroup\n" +"--Filters: ref FiltersKeypair\n" " One or more filters.\n" - " --Filters.CpuGenerations: array integer\n" - " The processor generation for the VMs in the dedicated group (for \n" - " example, `4`).\n" - " --Filters.DedicatedGroupIds: array string\n" - " The IDs of the dedicated groups.\n" - " --Filters.Names: array string\n" - " The names of the dedicated groups.\n" - " --Filters.SubregionNames: array string\n" - " The names of the Subregions in which the dedicated groups are located.\n" + " --Filters.KeypairFingerprints: array string\n" + " The fingerprints of the keypairs.\n" + " --Filters.KeypairNames: array string\n" + " The names of the keypairs.\n" + " --Filters.KeypairTypes: array string\n" + " The types of the keypairs (`ssh-rsa`, `ssh-ed25519`, \n" + " `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or `ecdsa-sha2-nistp521`).\n" "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" @@ -2737,1585 +2568,1754 @@ static const char *calls_args_descriptions[] = { , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--FromDate: string\n" - " The beginning of the time period, in ISO 8601 date format (for example, `2020-06-14`). The \n" - " date-time format is also accepted, but only with a time set to midnight (for example, \n" - " `2020-06-14T00:00:00.000Z`). This value is included in the time period.\n" -"--Overall: bool\n" - " By default or if false, returns only the consumption of the specific account that sends \n" - " this request. If true, returns either the overall consumption of your paying account and \n" - " all linked accounts (if the account that sends this request is a paying account) or returns \n" - " nothing (if the account that sends this request is a linked account).\n" -"--ShowPrice: bool\n" - " If true, the response also includes the unit price of the consumed resource (`UnitPrice`) \n" - " and the total price of the consumed resource during the specified time period (`Price`), in \n" - " the currency of your account.\n" -"--ToDate: string\n" - " The end of the time period, in ISO 8601 date format (for example, `2020-06-30`). The \n" - " date-time format is also accepted, but only with a time set to midnight (for example, \n" - " `2020-06-30T00:00:00.000Z`). This value is excluded from the time period, and must be set \n" - " to a later date than `FromDate`.\n" +"--Filters: ref ReadLinkedPoliciesFilters\n" + " One or more filters.\n" + " --Filters.PathPrefix: string\n" + " The path prefix of the policies. If not specified, it is set to a slash \n" + " (`/`).\n" +"--FirstItem: long long int\n" + " The item starting the list of policies requested.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of items that can be returned in a single response (by default, `100`).\n" +"--UserName: string\n" + " The name of the user the policies are linked to.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--VmId: string\n" - " The ID of the VM.\n" +"--Filters: ref FiltersListenerRule\n" + " One or more filters.\n" + " --Filters.ListenerRuleNames: array string\n" + " The names of the listener rules.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersClientGateway\n" - " One or more filters.\n" - " --Filters.BgpAsns: array integer\n" - " The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of \n" - " the connections.\n" - " --Filters.ClientGatewayIds: array string\n" - " The IDs of the client gateways.\n" - " --Filters.ConnectionTypes: array string\n" - " The types of communication tunnels used by the client gateways (always \n" - " `ipsec.1`).\n" - " --Filters.PublicIps: array string\n" - " The public IPv4 addresses of the client gateways.\n" - " --Filters.States: array string\n" - " The states of the client gateways (`pending` \\| `available` \\| \n" - " `deleting` \\| `deleted`).\n" - " --Filters.TagKeys: array string\n" - " The keys of the tags associated with the client gateways.\n" - " --Filters.TagValues: array string\n" - " The values of the tags associated with the client gateways.\n" - " --Filters.Tags: array string\n" - " The key/value combination of the tags associated with the client \n" - " gateways, in the following format: \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" -"--NextPageToken: string\n" - " The token to request the next page of results. Each token refers to a specific page.\n" -"--ResultsPerPage: long long int\n" - " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" - " included). By default, `100`.\n" +"--LoadBalancerNames: array string\n" + " One or more load balancer names.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersCatalogs\n" +"--Filters: ref FiltersLoadBalancer\n" " One or more filters.\n" - " --Filters.CurrentCatalogOnly: bool\n" - " By default or if set to true, only returns the current catalog. If \n" - " false, returns the current catalog and past catalogs.\n" - " --Filters.FromDate: string\n" - " The beginning of the time period, in ISO 8601 date format (for example, \n" - " `2020-06-14`). This date cannot be older than 3 years. You must specify \n" - " the parameters `FromDate` and `ToDate` together.\n" - " --Filters.ToDate: string\n" - " The end of the time period, in ISO 8601 date format (for example, \n" - " `2020-06-30`). You must specify the parameters `FromDate` and `ToDate` \n" - " together.\n" + " --Filters.LoadBalancerNames: array string\n" + " The names of the load balancers.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersCa\n" +"--Filters: ref FiltersUserGroup\n" " One or more filters.\n" - " --Filters.CaFingerprints: array string\n" - " The fingerprints of the CAs.\n" - " --Filters.CaIds: array string\n" - " The IDs of the CAs.\n" - " --Filters.Descriptions: array string\n" - " The descriptions of the CAs.\n" + " --Filters.PathPrefix: string\n" + " The path prefix of the groups. If not specified, it is set to a slash \n" + " (`/`).\n" + " --Filters.UserGroupIds: array string\n" + " The IDs of the user groups.\n" +"--FirstItem: long long int\n" + " The item starting the list of policies requested.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of items that can be returned in a single response (by default, `100`).\n" +"--UserGroupName: string\n" + " The name of the group.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersApiLog\n" +"--Filters: ref FiltersNatService\n" " One or more filters.\n" - " --Filters.QueryAccessKeys: array string\n" - " The access keys used for the logged calls.\n" - " --Filters.QueryApiNames: array string\n" - " The names of the APIs of the logged calls (always `oapi` for the \n" - " OUTSCALE API).\n" - " --Filters.QueryCallNames: array string\n" - " The names of the logged calls.\n" - " --Filters.QueryDateAfter: string\n" - " The date and time, or the date, after which you want to retrieve logged \n" - " calls, in ISO 8601 format (for example, `2020-06-14T00:00:00.000Z` or \n" - " `2020-06-14`). By default, this date is set to 48 hours before the \n" - " `QueryDateBefore` parameter value.\n" - " --Filters.QueryDateBefore: string\n" - " The date and time, or the date, before which you want to retrieve logged \n" - " calls, in ISO 8601 format (for example, `2020-06-30T00:00:00.000Z` or \n" - " `2020-06-14`). By default, this date is set to now, or 48 hours after the \n" - " `QueryDateAfter` parameter value.\n" - " --Filters.QueryIpAddresses: array string\n" - " The IPs used for the logged calls.\n" - " --Filters.QueryUserAgents: array string\n" - " The user agents of the HTTP requests of the logged calls.\n" - " --Filters.RequestIds: array string\n" - " The request IDs provided in the responses of the logged calls.\n" - " --Filters.ResponseStatusCodes: array integer\n" - " The HTTP status codes of the logged calls.\n" + " --Filters.ClientTokens: array string\n" + " The idempotency tokens provided when creating the NAT services.\n" + " --Filters.NatServiceIds: array string\n" + " The IDs of the NAT services.\n" + " --Filters.NetIds: array string\n" + " The IDs of the Nets in which the NAT services are.\n" + " --Filters.States: array string\n" + " The states of the NAT services (`pending` \\| `available` \\| `deleting` \n" + " \\| `deleted`).\n" + " --Filters.SubnetIds: array string\n" + " The IDs of the Subnets in which the NAT services are.\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the NAT services.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the NAT services.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the NAT services, \n" + " in the following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" "--NextPageToken: string\n" " The token to request the next page of results. Each token refers to a specific page.\n" "--ResultsPerPage: long long int\n" " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" " included). By default, `100`.\n" -"--With: ref With\n" - " The information to display in each returned log.\n" - " --With.AccountId: bool\n" - " By default or if set to true, the account ID is displayed.\n" - " --With.CallDuration: bool\n" - " By default or if set to true, the duration of the call is displayed.\n" - " --With.QueryAccessKey: bool\n" - " By default or if set to true, the access key is displayed.\n" - " --With.QueryApiName: bool\n" - " By default or if set to true, the name of the API is displayed.\n" - " --With.QueryApiVersion: bool\n" - " By default or if set to true, the version of the API is displayed.\n" - " --With.QueryCallName: bool\n" - " By default or if set to true, the name of the call is displayed.\n" - " --With.QueryDate: bool\n" - " By default or if set to true, the date of the call is displayed.\n" - " --With.QueryHeaderRaw: bool\n" - " By default or if set to true, the raw header of the HTTP request is \n" - " displayed.\n" - " --With.QueryHeaderSize: bool\n" - " By default or if set to true, the size of the raw header of the HTTP \n" - " request is displayed.\n" - " --With.QueryIpAddress: bool\n" - " By default or if set to true, the IP is displayed.\n" - " --With.QueryPayloadRaw: bool\n" - " By default or if set to true, the raw payload of the HTTP request is \n" - " displayed.\n" - " --With.QueryPayloadSize: bool\n" - " By default or if set to true, the size of the raw payload of the HTTP \n" - " request is displayed.\n" - " --With.QueryUserAgent: bool\n" - " By default or if set to true, the user agent of the HTTP request is \n" - " displayed.\n" - " --With.RequestId: bool\n" - " By default or if set to true, the request ID is displayed.\n" - " --With.ResponseSize: bool\n" - " By default or if set to true, the size of the response is displayed.\n" - " --With.ResponseStatusCode: bool\n" - " By default or if set to true, the HTTP status code of the response is \n" - " displayed.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersApiAccessRule\n" +"--Filters: ref FiltersService\n" " One or more filters.\n" - " --Filters.ApiAccessRuleIds: array string\n" - " One or more IDs of API access rules.\n" - " --Filters.CaIds: array string\n" - " One or more IDs of Client Certificate Authorities (CAs).\n" - " --Filters.Cns: array string\n" - " One or more Client Certificate Common Names (CNs).\n" - " --Filters.Descriptions: array string\n" - " One or more descriptions of API access rules.\n" - " --Filters.IpRanges: array string\n" - " One or more IPs or CIDR blocks (for example, `192.0.2.0/16`).\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--VmId: string\n" - " The ID of the VM.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" + " --Filters.ServiceIds: array string\n" + " The IDs of the services.\n" + " --Filters.ServiceNames: array string\n" + " The names of the services.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Filters: ref FiltersAccessKeys\n" +"--Filters: ref FiltersNetAccessPoint\n" " One or more filters.\n" - " --Filters.AccessKeyIds: array string\n" - " The IDs of the access keys.\n" + " --Filters.NetAccessPointIds: array string\n" + " The IDs of the Net access points.\n" + " --Filters.NetIds: array string\n" + " The IDs of the Nets.\n" + " --Filters.ServiceNames: array string\n" + " The names of the services. For more information, see \n" + " [ReadNetAccessPointServices](#readnetaccesspointservices).\n" " --Filters.States: array string\n" - " The states of the access keys (`ACTIVE` \\| `INACTIVE`).\n" -"--UserName: string\n" - " The name of the EIM user. By default, the user who sends the request (which can be the root \n" - " account).\n" + " The states of the Net access points (`pending` \\| `available` \\| \n" + " `deleting` \\| `deleted`).\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the Net access points.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the Net access points.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the Net access \n" + " points, in the following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--PolicyDocument: string\n" - " The policy document, corresponding to a JSON string that contains the policy. For more \n" - " information, see [EIM Reference \n" - " Information](https://docs.outscale.com/en/userguide/EIM-Reference-Information.html) and \n" - " [EIM Policy Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator.html).\n" -"--PolicyName: string\n" - " The name of the policy.\n" -"--UserGroupName: string\n" - " The name of the group.\n" -"--UserGroupPath: string\n" - " The path to the group. If not specified, it is set to a slash (`/`).\n" -, - "--DeviceName: string\n" - " The name of the device. For a root device, you must use `/dev/sda1`. For other volumes, you \n" - " must use `/dev/sdX`, `/dev/sdXX`, `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a \n" - " letter between `b` and `z`, and the second `X` is a letter between `a` and `z`).\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--VmId: string\n" - " The ID of the VM you want to attach the volume to.\n" -"--VolumeId: string\n" - " The ID of the volume you want to attach.\n" +"--Filters: ref FiltersNetPeering\n" + " One or more filters.\n" + " --Filters.AccepterNetAccountIds: array string\n" + " The account IDs of the owners of the peer Nets.\n" + " --Filters.AccepterNetIpRanges: array string\n" + " The IP ranges of the peer Nets, in CIDR notation (for example, \n" + " `10.0.0.0/24`).\n" + " --Filters.AccepterNetNetIds: array string\n" + " The IDs of the peer Nets.\n" + " --Filters.ExpirationDates: array string\n" + " The dates and times at which the Net peerings expire, in ISO 8601 \n" + " date-time format (for example, `2020-06-14T00:00:00.000Z`).\n" + " --Filters.NetPeeringIds: array string\n" + " The IDs of the Net peerings.\n" + " --Filters.SourceNetAccountIds: array string\n" + " The account IDs of the owners of the peer Nets.\n" + " --Filters.SourceNetIpRanges: array string\n" + " The IP ranges of the peer Nets.\n" + " --Filters.SourceNetNetIds: array string\n" + " The IDs of the peer Nets.\n" + " --Filters.StateMessages: array string\n" + " Additional information about the states of the Net peerings.\n" + " --Filters.StateNames: array string\n" + " The states of the Net peerings (`pending-acceptance` \\| `active` \\| \n" + " `rejected` \\| `failed` \\| `expired` \\| `deleted`).\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the Net peerings.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the Net peerings.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the Net peerings, \n" + " in the following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--NetId: string\n" - " The ID of the Net to which you want to attach the virtual gateway.\n" -"--VirtualGatewayId: string\n" - " The ID of the virtual gateway.\n" +"--Filters: ref FiltersNet\n" + " One or more filters.\n" + " --Filters.DhcpOptionsSetIds: array string\n" + " The IDs of the DHCP options sets.\n" + " --Filters.IpRanges: array string\n" + " The IP ranges for the Nets, in CIDR notation (for example, \n" + " `10.0.0.0/16`).\n" + " --Filters.IsDefault: bool\n" + " If true, the Net used is the default one.\n" + " --Filters.NetIds: array string\n" + " The IDs of the Nets.\n" + " --Filters.States: array string\n" + " The states of the Nets (`pending` \\| `available` \\| `deleting`).\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the Nets.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the Nets.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the Nets, in the \n" + " following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--RouteTableId: string\n" - " The ID of the route table.\n" -"--SubnetId: string\n" - " The ID of the Subnet.\n" -, - "--AllowRelink: bool\n" - " If true, allows the public IP to be associated with the VM or NIC that you specify even if \n" - " it is already associated with another VM or NIC. If false, prevents the public IP from \n" - " being associated with the VM or NIC that you specify if it is already associated with \n" - " another VM or NIC. (By default, true in the public Cloud, false in a Net.)\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--NicId: string\n" - " (Net only) The ID of the NIC. This parameter is required if the VM has more than one NIC \n" - " attached. Otherwise, you need to specify the `VmId` parameter instead. You cannot specify \n" - " both parameters at the same time.\n" -"--PrivateIp: string\n" - " (Net only) The primary or secondary private IP of the specified NIC. By default, the \n" - " primary private IP.\n" -"--PublicIp: string\n" - " The public IP. This parameter is required unless you use the `PublicIpId` parameter.\n" -"--PublicIpId: string\n" - " The allocation ID of the public IP. This parameter is required unless you use the \n" - " `PublicIp` parameter.\n" -"--VmId: string\n" - " The ID of the VM.\n- In the public Cloud, this parameter is required.\n- In a Net, this \n" - " parameter is required if the VM has only one NIC. Otherwise, you need to specify the \n" - " `NicId` parameter instead. You cannot specify both parameters at the same time.\n" -, - "--AllowRelink: bool\n" - " If true, allows an IP that is already assigned to another NIC in the same Subnet to be \n" - " assigned to the NIC you specified.\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--NicId: string\n" - " The ID of the NIC.\n" -"--PrivateIps: array string\n" - " The secondary private IP or IPs you want to assign to the NIC within the IP range of the \n" - " Subnet.\n" -"--SecondaryPrivateIpCount: long long int\n" - " The number of secondary private IPs to assign to the NIC.\n" +"--Filters: ref FiltersNic\n" + " One or more filters.\n" + " --Filters.Descriptions: array string\n" + " The descriptions of the NICs.\n" + " --Filters.IsSourceDestCheck: bool\n" + " Whether the source/destination checking is enabled (true) or disabled \n" + " (false).\n" + " --Filters.LinkNicDeleteOnVmDeletion: bool\n" + " Whether the NICs are deleted when the VMs they are attached to are \n" + " terminated.\n" + " --Filters.LinkNicDeviceNumbers: array integer\n" + " The device numbers the NICs are attached to.\n" + " --Filters.LinkNicLinkNicIds: array string\n" + " The attachment IDs of the NICs.\n" + " --Filters.LinkNicStates: array string\n" + " The states of the attachments.\n" + " --Filters.LinkNicVmAccountIds: array string\n" + " The account IDs of the owners of the VMs the NICs are attached to.\n" + " --Filters.LinkNicVmIds: array string\n" + " The IDs of the VMs the NICs are attached to.\n" + " --Filters.LinkPublicIpAccountIds: array string\n" + " The account IDs of the owners of the public IPs associated with the \n" + " NICs.\n" + " --Filters.LinkPublicIpLinkPublicIpIds: array string\n" + " The association IDs returned when the public IPs were associated with \n" + " the NICs.\n" + " --Filters.LinkPublicIpPublicDnsNames: array string\n" + " The public DNS names associated with the public IPs.\n" + " --Filters.LinkPublicIpPublicIpIds: array string\n" + " The allocation IDs returned when the public IPs were allocated to their \n" + " accounts.\n" + " --Filters.LinkPublicIpPublicIps: array string\n" + " The public IPs associated with the NICs.\n" + " --Filters.MacAddresses: array string\n" + " The Media Access Control (MAC) addresses of the NICs.\n" + " --Filters.NetIds: array string\n" + " The IDs of the Nets where the NICs are located.\n" + " --Filters.NicIds: array string\n" + " The IDs of the NICs.\n" + " --Filters.PrivateDnsNames: array string\n" + " The private DNS names associated with the primary private IPs.\n" + " --Filters.PrivateIpsLinkPublicIpAccountIds: array string\n" + " The account IDs of the owner of the public IPs associated with the \n" + " private IPs.\n" + " --Filters.PrivateIpsLinkPublicIpPublicIps: array string\n" + " The public IPs associated with the private IPs.\n" + " --Filters.PrivateIpsPrimaryIp: bool\n" + " Whether the private IP is the primary IP associated with the NIC.\n" + " --Filters.PrivateIpsPrivateIps: array string\n" + " The private IPs of the NICs.\n" + " --Filters.SecurityGroupIds: array string\n" + " The IDs of the security groups associated with the NICs.\n" + " --Filters.SecurityGroupNames: array string\n" + " The names of the security groups associated with the NICs.\n" + " --Filters.States: array string\n" + " The states of the NICs.\n" + " --Filters.SubnetIds: array string\n" + " The IDs of the Subnets for the NICs.\n" + " --Filters.SubregionNames: array string\n" + " The Subregions where the NICs are located.\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the NICs.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the NICs.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the NICs, in the \n" + " following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--PolicyOrn: string\n" +"--Filters: ref ReadPoliciesFilters\n" + " One or more filters.\n" + " --Filters.OnlyLinked: bool\n" + " If set to true, lists only the policies attached to a user.\n" + " --Filters.PathPrefix: string\n" + " The path prefix you can use to filter the results. If not specified, it \n" + " is set to a slash (`/`).\n" + " --Filters.Scope: string\n" + " The scope to filter policies (`OWS` \\| `LOCAL`).\n" +"--FirstItem: long long int\n" + " The item starting the list of policies requested.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of items that can be returned in a single response (by default, `100`).\n" +, + "--PolicyOrn: string\n" " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" -"--UserName: string\n" - " The name of the user you want to link the policy to (between 1 and 64 characters).\n" , - "--DeviceNumber: long long int\n" - " The index of the VM device for the NIC attachment (between `1` and `7`, both included).\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--NicId: string\n" - " The ID of the NIC you want to attach.\n" -"--VmId: string\n" - " The ID of the VM to which you want to attach the NIC.\n" + "--PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" +"--VersionId: string\n" + " The ID of the policy version.\n" , - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" + "--FirstItem: long long int\n" + " The item starting the list of policies requested.\n" "--PolicyOrn: string\n" " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" -"--UserGroupName: string\n" - " The name of the group you want to link the policy to.\n" -, - "--BackendIps: array string\n" - " One or more public IPs of backend VMs.\n" -"--BackendVmIds: array string\n" - " One or more IDs of backend VMs.\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--LoadBalancerName: string\n" - " The name of the load balancer.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--InternetServiceId: string\n" - " The ID of the Internet service you want to attach.\n" -"--NetId: string\n" - " The ID of the Net to which you want to attach the Internet service.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--FlexibleGpuId: string\n" - " The ID of the fGPU you want to attach.\n" -"--VmId: string\n" - " The ID of the VM you want to attach the fGPU to.\n" -, - "--BackendVmIds: array string\n" - " One or more IDs of backend VMs.\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--LoadBalancerName: string\n" - " The name of the load balancer.\n" -, - "--DestinationIpRange: string\n" - " The network prefix of the route to delete, in CIDR notation (for example, `10.12.0.0/16`).\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--VpnConnectionId: string\n" - " The ID of the target VPN connection of the static route to delete.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--VpnConnectionId: string\n" - " The ID of the VPN connection you want to delete.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--VolumeId: string\n" - " The ID of the volume you want to delete.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--VmIds: array string\n" - " One or more IDs of VMs.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--VmTemplateId: string\n" - " The ID of the VM template you want to delete.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--VmGroupId: string\n" - " The ID of the VM group you want to delete.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--VirtualGatewayId: string\n" - " The ID of the virtual gateway you want to delete.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--PolicyName: string\n" - " The name of the policy document you want to delete.\n" -"--UserGroupName: string\n" - " The name of the group.\n" -"--UserGroupPath: string\n" - " The path to the group. If not specified, it is set to a slash (`/`).\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--Force: bool\n" - " If true, forces the deletion of the user group even if it is not empty.\n" -"--Path: string\n" - " The path to the group. If not specified, it is set to a slash (`/`).\n" -"--UserGroupName: string\n" - " The name of the group you want to delete.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--UserName: string\n" - " The name of the EIM user you want to delete.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of items that can be returned in a single response (by default, `100`).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--ResourceIds: array string\n" - " One or more resource IDs.\n" -"--Tags: array ref ResourceTag\n" - " One or more tags to delete (if you set a tag value, only the tags matching exactly this \n" - " value are deleted).\n" - " Information about the tag.\n" - " --Tags.INDEX.Key: string\n" - " The key of the tag, with a minimum of 1 character.\n" - " --Tags.INDEX.Value: string\n" - " The value of the tag, between 0 and 255 characters.\n" +"--Filters: ref FiltersProductType\n" + " One or more filters.\n" + " --Filters.ProductTypeIds: array string\n" + " The IDs of the product types.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--SubnetId: string\n" - " The ID of the Subnet you want to delete.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--SnapshotId: string\n" - " The ID of the snapshot you want to delete.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Name: string\n" - " The name of the server certificate you want to delete.\n" +"--Filters: ref FiltersPublicIp\n" + " One or more filters.\n" + " --Filters.LinkPublicIpIds: array string\n" + " The IDs representing the associations of public IPs with VMs or NICs.\n" + " --Filters.NicAccountIds: array string\n" + " The account IDs of the owners of the NICs.\n" + " --Filters.NicIds: array string\n" + " The IDs of the NICs.\n" + " --Filters.Placements: array string\n" + " Whether the public IPs are for use in the public Cloud or in a Net.\n" + " --Filters.PrivateIps: array string\n" + " The private IPs associated with the public IPs.\n" + " --Filters.PublicIpIds: array string\n" + " The IDs of the public IPs.\n" + " --Filters.PublicIps: array string\n" + " The public IPs.\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the public IPs.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the public IPs.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the public IPs, in \n" + " the following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" + " --Filters.VmIds: array string\n" + " The IDs of the VMs.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Flow: string\n" - " The direction of the flow: `Inbound` or `Outbound`. You can specify `Outbound` for Nets \n" - " only.\n" -"--FromPortRange: long long int\n" - " The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.\n" -"--IpProtocol: string\n" - " The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all protocols). By default, `-1`. \n" - " In a Net, this can also be an IP protocol number. For more information, see the [IANA.org \n" - " website](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml).\n" -"--IpRange: string\n" - " The IP range for the security group rule, in CIDR notation (for example, `10.0.0.0/16`).\n" -"--Rules: array ref SecurityGroupRule\n" - " One or more rules you want to delete from the security group.\n" - " Information about the security group rule.\n" - " --Rules.INDEX.FromPortRange: long long int\n" - " The beginning of the port range for the TCP and UDP protocols, or an \n" - " ICMP type number.\n" - " --Rules.INDEX.IpProtocol: string\n" - " The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all protocols). \n" - " By default, `-1`. In a Net, this can also be an IP protocol number. For \n" - " more information, see the [IANA.org \n" - " website](https://www.iana.org/assignments/protocol-numbers/protocol-number\n" - " s.xhtml).\n" - " --Rules.INDEX.IpRanges: array string\n" - " One or more IP ranges for the security group rules, in CIDR notation \n" - " (for example, `10.0.0.0/16`).\n" - " --Rules.INDEX.SecurityGroupsMembers: array ref SecurityGroupsMember\n" - " Information about one or more source or destination security groups.\n" - " Information about a source or destination security group.\n" - " --Rules.INDEX.SecurityGroupsMembers.INDEX.AccountId: string\n" - " The account ID that owns the source or destination security group.\n" - " --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupId: string\n" - " The ID of a source or destination security group that you want to link \n" - " to the security group of the rule.\n" - " --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupName: string\n" - " (Public Cloud only) The name of a source or destination security group \n" - " that you want to link to the security group of the rule.\n" - " --Rules.INDEX.ServiceIds: array string\n" - " One or more service IDs to allow traffic from a Net to access the \n" - " corresponding OUTSCALE services. For more information, see \n" - " [ReadNetAccessPointServices](#readnetaccesspointservices).\n" - " --Rules.INDEX.ToPortRange: long long int\n" - " The end of the port range for the TCP and UDP protocols, or an ICMP code \n" - " number.\n" -"--SecurityGroupAccountIdToUnlink: string\n" - " The account ID of the owner of the security group you want to delete a rule from.\n" -"--SecurityGroupId: string\n" - " The ID of the security group you want to delete a rule from.\n" -"--SecurityGroupNameToUnlink: string\n" - " The ID of the source security group. If you are in the Public Cloud, you can also specify \n" - " the name of the source security group.\n" -"--ToPortRange: long long int\n" - " The end of the port range for the TCP and UDP protocols, or an ICMP code number.\n" +"--Filters: ref FiltersQuota\n" + " One or more filters.\n" + " --Filters.Collections: array string\n" + " The group names of the quotas.\n" + " --Filters.QuotaNames: array string\n" + " The names of the quotas.\n" + " --Filters.QuotaTypes: array string\n" + " The resource IDs if these are resource-specific quotas, `global` if they \n" + " are not.\n" + " --Filters.ShortDescriptions: array string\n" + " The description of the quotas.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--SecurityGroupId: string\n" - " The ID of the security group you want to delete.\n" -"--SecurityGroupName: string\n" - " The name of the security group.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--RouteTableId: string\n" - " The ID of the route table you want to delete.\n" +"--Filters: ref FiltersRouteTable\n" + " One or more filters.\n" + " --Filters.LinkRouteTableIds: array string\n" + " The IDs of the route tables involved in the associations.\n" + " --Filters.LinkRouteTableLinkRouteTableIds: array string\n" + " The IDs of the associations between the route tables and the Subnets.\n" + " --Filters.LinkRouteTableMain: bool\n" + " If true, the route tables are the main ones for their Nets.\n" + " --Filters.LinkSubnetIds: array string\n" + " The IDs of the Subnets involved in the associations.\n" + " --Filters.NetIds: array string\n" + " The IDs of the Nets for the route tables.\n" + " --Filters.RouteCreationMethods: array string\n" + " The methods used to create a route.\n" + " --Filters.RouteDestinationIpRanges: array string\n" + " The IP ranges specified in routes in the tables.\n" + " --Filters.RouteDestinationServiceIds: array string\n" + " The service IDs specified in routes in the tables.\n" + " --Filters.RouteGatewayIds: array string\n" + " The IDs of the gateways specified in routes in the tables.\n" + " --Filters.RouteNatServiceIds: array string\n" + " The IDs of the NAT services specified in routes in the tables.\n" + " --Filters.RouteNetPeeringIds: array string\n" + " The IDs of the Net peerings specified in routes in the tables.\n" + " --Filters.RouteStates: array string\n" + " The states of routes in the route tables (always `active`).\n" + " --Filters.RouteTableIds: array string\n" + " The IDs of the route tables.\n" + " --Filters.RouteVmIds: array string\n" + " The IDs of the VMs specified in routes in the tables.\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the route tables.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the route tables.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the route tables, \n" + " in the following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , - "--DestinationIpRange: string\n" - " The exact IP range for the route.\n" + "--AccessKeyId: string\n" + " The ID of the access key.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--RouteTableId: string\n" - " The ID of the route table from which you want to delete a route.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--PublicIp: string\n" - " The public IP. In the public Cloud, this parameter is required.\n" -"--PublicIpId: string\n" - " The ID representing the association of the public IP with the VM or the NIC. In a Net, this \n" - " parameter is required.\n" -, - "--PolicyOrn: string\n" - " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" - " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" -"--VersionId: string\n" - " The ID of the version of the policy you want to delete.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--PolicyOrn: string\n" - " The OUTSCALE Resource Name (ORN) of the policy you want to delete. For more information, \n" - " see [Resource \n" - " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--NicId: string\n" - " The ID of the NIC you want to delete.\n" +"--Filters: ref FiltersSecurityGroup\n" + " One or more filters.\n" + " --Filters.Descriptions: array string\n" + " The descriptions of the security groups.\n" + " --Filters.InboundRuleAccountIds: array string\n" + " The account IDs that have been granted permissions.\n" + " --Filters.InboundRuleFromPortRanges: array integer\n" + " The beginnings of the port ranges for the TCP and UDP protocols, or the \n" + " ICMP type numbers.\n" + " --Filters.InboundRuleIpRanges: array string\n" + " The IP ranges that have been granted permissions, in CIDR notation (for \n" + " example, `10.0.0.0/24`).\n" + " --Filters.InboundRuleProtocols: array string\n" + " The IP protocols for the permissions (`tcp` \\| `udp` \\| `icmp`, or a \n" + " protocol number, or `-1` for all protocols).\n" + " --Filters.InboundRuleSecurityGroupIds: array string\n" + " The IDs of the security groups that have been granted permissions.\n" + " --Filters.InboundRuleSecurityGroupNames: array string\n" + " The names of the security groups that have been granted permissions.\n" + " --Filters.InboundRuleToPortRanges: array integer\n" + " The ends of the port ranges for the TCP and UDP protocols, or the ICMP \n" + " code numbers.\n" + " --Filters.NetIds: array string\n" + " The IDs of the Nets specified when the security groups were created.\n" + " --Filters.OutboundRuleAccountIds: array string\n" + " The account IDs that have been granted permissions.\n" + " --Filters.OutboundRuleFromPortRanges: array integer\n" + " The beginnings of the port ranges for the TCP and UDP protocols, or the \n" + " ICMP type numbers.\n" + " --Filters.OutboundRuleIpRanges: array string\n" + " The IP ranges that have been granted permissions, in CIDR notation (for \n" + " example, `10.0.0.0/24`).\n" + " --Filters.OutboundRuleProtocols: array string\n" + " The IP protocols for the permissions (`tcp` \\| `udp` \\| `icmp`, or a \n" + " protocol number, or `-1` for all protocols).\n" + " --Filters.OutboundRuleSecurityGroupIds: array string\n" + " The IDs of the security groups that have been granted permissions.\n" + " --Filters.OutboundRuleSecurityGroupNames: array string\n" + " The names of the security groups that have been granted permissions.\n" + " --Filters.OutboundRuleToPortRanges: array integer\n" + " The ends of the port ranges for the TCP and UDP protocols, or the ICMP \n" + " code numbers.\n" + " --Filters.SecurityGroupIds: array string\n" + " The IDs of the security groups.\n" + " --Filters.SecurityGroupNames: array string\n" + " The names of the security groups.\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the security groups.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the security groups.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the security \n" + " groups, in the following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--NetPeeringId: string\n" - " The ID of the Net peering you want to delete.\n" +"--Filters: ref FiltersServerCertificate\n" + " One or more filters.\n" + " --Filters.Paths: array string\n" + " The paths to the server certificates.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--NetAccessPointId: string\n" - " The ID of the Net access point.\n" +"--Filters: ref FiltersExportTask\n" + " One or more filters.\n" + " --Filters.TaskIds: array string\n" + " The IDs of the export tasks.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--NetId: string\n" - " The ID of the Net you want to delete.\n" +"--Filters: ref FiltersSnapshot\n" + " One or more filters.\n" + " --Filters.AccountAliases: array string\n" + " The account aliases of the owners of the snapshots.\n" + " --Filters.AccountIds: array string\n" + " The account IDs of the owners of the snapshots.\n" + " --Filters.Descriptions: array string\n" + " The descriptions of the snapshots.\n" + " --Filters.FromCreationDate: string\n" + " The beginning of the time period, in ISO 8601 date-time format (for \n" + " example, `2020-06-14T00:00:00.000Z`).\n" + " --Filters.PermissionsToCreateVolumeAccountIds: array string\n" + " The account IDs which have permissions to create volumes.\n" + " --Filters.PermissionsToCreateVolumeGlobalPermission: bool\n" + " If true, lists all public volumes. If false, lists all private volumes.\n" + " --Filters.Progresses: array integer\n" + " The progresses of the snapshots, as a percentage.\n" + " --Filters.SnapshotIds: array string\n" + " The IDs of the snapshots.\n" + " --Filters.States: array string\n" + " The states of the snapshots (`in-queue` \\| `pending` \\| `completed` \n" + " \\| `error` \\| `deleting`).\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the snapshots.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the snapshots.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the snapshots, in \n" + " the following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" + " --Filters.ToCreationDate: string\n" + " The end of the time period, in ISO 8601 date-time format (for example, \n" + " `2020-06-30T00:00:00.000Z`).\n" + " --Filters.VolumeIds: array string\n" + " The IDs of the volumes used to create the snapshots.\n" + " --Filters.VolumeSizes: array integer\n" + " The sizes of the volumes used to create the snapshots, in gibibytes \n" + " (GiB).\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--NatServiceId: string\n" - " The ID of the NAT service you want to delete.\n" +"--Filters: ref FiltersSubnet\n" + " One or more filters.\n" + " --Filters.AvailableIpsCounts: array integer\n" + " The number of available IPs.\n" + " --Filters.IpRanges: array string\n" + " The IP ranges in the Subnets, in CIDR notation (for example, \n" + " `10.0.0.0/16`).\n" + " --Filters.NetIds: array string\n" + " The IDs of the Nets in which the Subnets are.\n" + " --Filters.States: array string\n" + " The states of the Subnets (`pending` \\| `available` \\| `deleted`).\n" + " --Filters.SubnetIds: array string\n" + " The IDs of the Subnets.\n" + " --Filters.SubregionNames: array string\n" + " The names of the Subregions in which the Subnets are located.\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the Subnets.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the Subnets.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the Subnets, in \n" + " the following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--LoadBalancerNames: array string\n" - " One or more load balancer names.\n" -"--Tags: array ref ResourceLoadBalancerTag\n" - " One or more tags to delete from the load balancers.\n" - " Information about the tag.\n" - " --Tags.INDEX.Key: string\n" - " The key of the tag, with a minimum of 1 character.\n" +"--Filters: ref FiltersSubregion\n" + " One or more filters.\n" + " --Filters.RegionNames: array string\n" + " The names of the Regions containing the Subregions.\n" + " --Filters.States: array string\n" + " The states of the Subregions.\n" + " --Filters.SubregionNames: array string\n" + " The names of the Subregions.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--LoadBalancerName: string\n" - " The name of the load balancer for which you want to delete a policy.\n" -"--PolicyName: string\n" - " The name of the policy you want to delete.\n" +"--Filters: ref FiltersTag\n" + " One or more filters.\n" + " --Filters.Keys: array string\n" + " The keys of the tags that are assigned to the resources. You can use \n" + " this filter alongside the `Values` filter. In that case, you filter the \n" + " resources corresponding to each tag, regardless of the other filter.\n" + " --Filters.ResourceIds: array string\n" + " The IDs of the resources with which the tags are associated.\n" + " --Filters.ResourceTypes: array string\n" + " The resource type (`vm` \\| `image` \\| `volume` \\| `snapshot` \\| \n" + " `public-ip` \\| `security-group` \\| `route-table` \\| `nic` \\| `net` \n" + " \\| `subnet` \\| `net-peering` \\| `net-access-point` \\| `nat-service` \n" + " \\| `internet-service` \\| `client-gateway` \\| `virtual-gateway` \\| \n" + " `vpn-connection` \\| `dhcp-options` \\| `task`).\n" + " --Filters.Values: array string\n" + " The values of the tags that are assigned to the resources. You can use \n" + " this filter alongside the `TagKeys` filter. In that case, you filter the \n" + " resources corresponding to each tag, regardless of the other filter.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--LoadBalancerName: string\n" - " The name of the load balancer for which you want to delete listeners.\n" -"--LoadBalancerPorts: array integer\n" - " One or more port numbers of the listeners you want to delete.\n" + "--Operation: string\n" + " The operation associated with the catalog entry (for example, `RunInstances-OD` or \n" + " `CreateVolume`).\n" +"--Service: string\n" + " The service associated with the catalog entry (for example, `TinaOS-FCU` or `TinaOS-OOS`).\n" +"--Type: string\n" + " The type associated with the catalog entry (for example, `BSU:VolumeIOPS:io1` or \n" + " `BoxUsage:tinav6.c6r16p3`).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--LoadBalancerName: string\n" - " The name of the load balancer you want to delete.\n" +"--FirstItem: long long int\n" + " The item starting the list of policies requested.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of items that can be returned in a single response (by default, `100`).\n" +"--UserGroupName: string\n" + " The name of the group.\n" +"--UserGroupPath: string\n" + " The path to the group. If not specified, it is set to a slash (`/`).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--ListenerRuleName: string\n" - " The name of the rule you want to delete.\n" +"--PolicyName: string\n" + " The name of the policy.\n" +"--UserGroupName: string\n" + " The name of the group.\n" +"--UserGroupPath: string\n" + " The path to the group. If not specified, it is set to a slash (`/`).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--KeypairName: string\n" - " The name of the keypair you want to delete.\n" +"--Path: string\n" + " The path to the group. If not specified, it is set to a slash (`/`).\n" +"--UserGroupName: string\n" + " The name of the group.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--InternetServiceId: string\n" - " The ID of the Internet service you want to delete.\n" +"--UserName: string\n" + " The name of the user.\n" +"--UserPath: string\n" + " The path to the user (by default, `/`).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--ImageId: string\n" - " The ID of the OMI you want to delete.\n" +"--Filters: ref FiltersUserGroup\n" + " One or more filters.\n" + " --Filters.PathPrefix: string\n" + " The path prefix of the groups. If not specified, it is set to a slash \n" + " (`/`).\n" + " --Filters.UserGroupIds: array string\n" + " The IDs of the user groups.\n" +"--FirstItem: long long int\n" + " The item starting the list of groups requested.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of items that can be returned in a single response (by default, `100`).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--FlexibleGpuId: string\n" - " The ID of the fGPU you want to delete.\n" +"--Filters: ref FiltersUsers\n" + " One or more filters.\n" + " --Filters.UserIds: array string\n" + " The IDs of the users.\n" +"--FirstItem: long long int\n" + " The item starting the list of users requested.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of items that can be returned in a single response (by default, `100`).\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--ExportTaskId: string\n" - " The ID of the export task to delete.\n" -, - "--DirectLinkInterfaceId: string\n" - " The ID of the DirectLink interface you want to delete.\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -, - "--DirectLinkId: string\n" - " The ID of the DirectLink you want to delete.\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -, - "--DhcpOptionsSetId: string\n" - " The ID of the DHCP options set you want to delete.\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -, - "--DedicatedGroupId: string\n" - " The ID of the dedicated group you want to delete.\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--Force: bool\n" - " If true, forces the deletion of the dedicated group and all its dependencies.\n" -, - "--ClientGatewayId: string\n" - " The ID of the client gateway you want to delete.\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -, - "--CaId: string\n" - " The ID of the CA you want to delete.\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -, - "--ApiAccessRuleId: string\n" - " The ID of the API access rule you want to delete.\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -, - "--AccessKeyId: string\n" - " The ID of the access key you want to delete.\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--UserName: string\n" - " The name of the EIM user the access key you want to delete is associated with. By default, \n" - " the user who sends the request (which can be the root account).\n" -, - "--DestinationIpRange: string\n" - " The network prefix of the route, in CIDR notation (for example, `10.12.0.0/16`).\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--VpnConnectionId: string\n" - " The ID of the target VPN connection of the static route.\n" +"--Filters: ref FiltersVirtualGateway\n" + " One or more filters.\n" + " --Filters.ConnectionTypes: array string\n" + " The types of the virtual gateways (always `ipsec.1`).\n" + " --Filters.LinkNetIds: array string\n" + " The IDs of the Nets the virtual gateways are attached to.\n" + " --Filters.LinkStates: array string\n" + " The current states of the attachments between the virtual gateways and \n" + " the Nets (`attaching` \\| `attached` \\| `detaching` \\| `detached`).\n" + " --Filters.States: array string\n" + " The states of the virtual gateways (`pending` \\| `available` \\| \n" + " `deleting` \\| `deleted`).\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the virtual gateways.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the virtual gateways.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the virtual \n" + " gateways, in the following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" + " --Filters.VirtualGatewayIds: array string\n" + " The IDs of the virtual gateways.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , - "--ClientGatewayId: string\n" - " The ID of the client gateway.\n" -"--ConnectionType: string\n" - " The type of VPN connection (always `ipsec.1`).\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--StaticRoutesOnly: bool\n" - " By default or if false, the VPN connection uses dynamic routing with Border Gateway \n" - " Protocol (BGP). If true, routing is controlled using static routes. For more information \n" - " about how to create and delete static routes, see \n" - " [CreateVpnConnectionRoute](#createvpnconnectionroute) and \n" - " [DeleteVpnConnectionRoute](#deletevpnconnectionroute).\n" -"--VirtualGatewayId: string\n" - " The ID of the virtual gateway.\n" +"--Filters: ref FiltersVmGroup\n" + " One or more filters.\n" + " --Filters.Descriptions: array string\n" + " The descriptions of the VM groups.\n" + " --Filters.SecurityGroupIds: array string\n" + " The IDs of the security groups.\n" + " --Filters.SubnetIds: array string\n" + " The IDs of the Subnets.\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the VM groups.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the VM groups.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the VMs, in the \n" + " following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" + " --Filters.VmCounts: array integer\n" + " The number of VMs in the VM group.\n" + " --Filters.VmGroupIds: array string\n" + " The IDs of the VM groups.\n" + " --Filters.VmGroupNames: array string\n" + " The names of the VM groups.\n" + " --Filters.VmTemplateIds: array string\n" + " The IDs of the VM templates.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Iops: long long int\n" - " The number of I/O operations per second (IOPS). This parameter must be specified only if \n" - " you create an `io1` volume. The maximum number of IOPS allowed for `io1` volumes is `13000` \n" - " with a maximum performance ratio of 300 IOPS per gibibyte.\n" -"--Size: long long int\n" - " The size of the volume, in gibibytes (GiB). The maximum allowed size for a volume is 14901 \n" - " GiB. This parameter is required if the volume is not created from a snapshot (`SnapshotId` \n" - " unspecified).\n" -"--SnapshotId: string\n" - " The ID of the snapshot from which you want to create the volume.\n" -"--SubregionName: string\n" - " The Subregion in which you want to create the volume.\n" -"--VolumeType: string\n" - " The type of volume you want to create (`io1` \\| `gp2` \\| `standard`). If not specified, a \n" - " `standard` volume is created.\nFor more information about volume types, see [About Volumes \n" - " > Volume Types and \n" - " IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volume_types_and_iops).\n" +"--Filters: ref FiltersVmTemplate\n" + " One or more filters.\n" + " --Filters.CpuCores: array integer\n" + " The number of vCores.\n" + " --Filters.CpuGenerations: array string\n" + " The processor generations (for example, `v4`).\n" + " --Filters.CpuPerformances: array string\n" + " The performances of the VMs.\n" + " --Filters.Descriptions: array string\n" + " The descriptions of the VM templates.\n" + " --Filters.ImageIds: array string\n" + " The IDs of the OMIs.\n" + " --Filters.KeypairNames: array string\n" + " The names of the keypairs.\n" + " --Filters.Rams: array integer\n" + " The amount of RAM.\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the VM templates.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the VM templates.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the VM templates, \n" + " in the following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" + " --Filters.VmTemplateIds: array string\n" + " The IDs of the VM templates.\n" + " --Filters.VmTemplateNames: array string\n" + " The names of the VM templates.\n" , - "--BlockDeviceMappings: array ref BlockDeviceMappingVmCreation\n" - " One or more block device mappings.\n" - " Information about the block device mapping.\n" - " --BlockDeviceMappings.INDEX.Bsu: ref BsuToCreate\n" - " Information about the BSU volume to create.\n" - " --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool\n" - " By default or if set to true, the volume is deleted when terminating the \n" - " VM. If false, the volume is not deleted when terminating the VM.\n" - " --BlockDeviceMappings.INDEX.Bsu.Iops: long long int\n" - " The number of I/O operations per second (IOPS). This parameter must be \n" - " specified only if you create an `io1` volume. The maximum number of IOPS \n" - " allowed for `io1` volumes is `13000` with a maximum performance ratio of \n" - " 300 IOPS per gibibyte.\n" - " --BlockDeviceMappings.INDEX.Bsu.SnapshotId: string\n" - " The ID of the snapshot used to create the volume.\n" - " --BlockDeviceMappings.INDEX.Bsu.VolumeSize: long long int\n" - " The size of the volume, in gibibytes (GiB).\nIf you specify a \n" - " snapshot ID, the volume size must be at least equal to the snapshot \n" - " size.\nIf you specify a snapshot ID but no volume size, the volume \n" - " is created with a size similar to the snapshot one.\n" - " --BlockDeviceMappings.INDEX.Bsu.VolumeType: string\n" - " The type of the volume (`standard` \\| `io1` \\| `gp2`). If not \n" - " specified in the request, a `standard` volume is created.\nFor more \n" - " information about volume types, see [About Volumes > Volume Types and \n" - " IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volume_ty\n" - " pes_and_iops).\n" - " --BlockDeviceMappings.INDEX.DeviceName: string\n" - " The device name for the volume. For a root device, you must use \n" - " `/dev/sda1`. For other volumes, you must use `/dev/sdX`, `/dev/sdXX`, \n" - " `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter between `b` \n" - " and `z`, and the second `X` is a letter between `a` and `z`).\n" - " --BlockDeviceMappings.INDEX.NoDevice: string\n" - " Removes the device which is included in the block device mapping of the \n" - " OMI.\n" - " --BlockDeviceMappings.INDEX.VirtualDeviceName: string\n" - " The name of the virtual device (`ephemeralN`).\n" -"--BootOnCreation: bool\n" - " By default or if true, the VM is started on creation. If false, the VM is stopped on \n" - " creation.\n" -"--BsuOptimized: bool\n" - " This parameter is not available. It is present in our API for the sake of historical \n" - " compatibility with AWS.\n" -"--ClientToken: string\n" - " A unique identifier which enables you to manage the idempotency.\n" -"--DeletionProtection: bool\n" - " If true, you cannot delete the VM unless you change this parameter back to false.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--ImageId: string\n" - " The ID of the OMI used to create the VM. You can find the list of OMIs by calling the \n" - " [ReadImages](#readimages) method.\n" -"--KeypairName: string\n" - " The name of the keypair.\n" -"--MaxVmsCount: long long int\n" - " The maximum number of VMs you want to create. If all the VMs cannot be created, the largest \n" - " possible number of VMs above MinVmsCount is created.\n" -"--MinVmsCount: long long int\n" - " The minimum number of VMs you want to create. If this number of VMs cannot be created, no \n" - " VMs are created.\n" -"--NestedVirtualization: bool\n" - " (dedicated tenancy only) If true, nested virtualization is enabled. If false, it is \n" - " disabled.\n" -"--Nics: array ref NicForVmCreation\n" - " One or more NICs. If you specify this parameter, you must not specify the `SubnetId` and \n" - " `SubregionName` parameters. You also must define one NIC as the primary network interface \n" - " of the VM with `0` as its device number.\n" - " Information about the network interface card (NIC) when creating a \n" - " virtual machine (VM).\n" - " --Nics.INDEX.DeleteOnVmDeletion: bool\n" - " If true, the NIC is deleted when the VM is terminated. You can specify \n" - " this parameter only for a new NIC. To modify this value for an existing \n" - " NIC, see [UpdateNic](#updatenic).\n" - " --Nics.INDEX.Description: string\n" - " The description of the NIC, if you are creating a NIC when creating the \n" - " VM.\n" - " --Nics.INDEX.DeviceNumber: long long int\n" - " The index of the VM device for the NIC attachment (between `0` and `7`, \n" - " both included). This parameter is required if you create a NIC when \n" - " creating the VM.\n" - " --Nics.INDEX.NicId: string\n" - " The ID of the NIC, if you are attaching an existing NIC when creating a \n" - " VM.\n" - " --Nics.INDEX.PrivateIps: array ref PrivateIpLight\n" - " One or more private IPs to assign to the NIC, if you create a NIC when \n" - " creating a VM. Only one private IP can be the primary private IP.\n" - " Information about the private IP.\n" - " --Nics.INDEX.PrivateIps.INDEX.IsPrimary: bool\n" - " If true, the IP is the primary private IP of the NIC.\n" - " --Nics.INDEX.PrivateIps.INDEX.PrivateIp: string\n" - " The private IP of the NIC.\n" - " --Nics.INDEX.SecondaryPrivateIpCount: long long int\n" - " The number of secondary private IPs, if you create a NIC when creating a \n" - " VM. This parameter cannot be specified if you specified more than one \n" - " private IP in the `PrivateIps` parameter.\n" - " --Nics.INDEX.SecurityGroupIds: array string\n" - " One or more IDs of security groups for the NIC, if you create a NIC when \n" - " creating a VM.\n" - " --Nics.INDEX.SubnetId: string\n" - " The ID of the Subnet for the NIC, if you create a NIC when creating a \n" - " VM. This parameter is required if you create a NIC when creating the VM.\n" -"--Performance: string\n" - " The performance of the VM (`medium` \\| `high` \\| `highest`). By default, `high`. This \n" - " parameter is ignored if you specify a performance flag directly in the `VmType` parameter.\n" -"--Placement: ref Placement\n" - " Information about the placement of the VM.\n" - " --Placement.SubregionName: string\n" - " The name of the Subregion. If you specify this parameter, you must not \n" - " specify the `Nics` parameter.\n" - " --Placement.Tenancy: string\n" - " The tenancy of the VM (`default`, `dedicated`, or a dedicated group ID).\n" -"--PrivateIps: array string\n" - " One or more private IPs of the VM.\n" -"--SecurityGroupIds: array string\n" - " One or more IDs of security group for the VMs.\n" -"--SecurityGroups: array string\n" - " One or more names of security groups for the VMs.\n" -"--SubnetId: string\n" - " The ID of the Subnet in which you want to create the VM. If you specify this parameter, you \n" - " must not specify the `Nics` parameter.\n" -"--UserData: string\n" - " Data or script used to add a specific configuration to the VM. It must be Base64-encoded \n" - " and is limited to 500 kibibytes (KiB). For more information about user data, see \n" - " [Configuring a VM with User Data and OUTSCALE \n" - " Tags](https://docs.outscale.com/en/userguide/Configuring-a-VM-with-User-Data-and-OUTSCALE-Ta\n" - " gs.html).\n" -"--VmInitiatedShutdownBehavior: string\n" - " The VM behavior when you stop it. By default or if set to `stop`, the VM stops. If set to \n" - " `restart`, the VM stops then automatically restarts. If set to `terminate`, the VM stops \n" - " and is terminated.\n" -"--VmType: string\n" - " The type of VM. You can specify a TINA type (in the `tinavW.cXrYpZ` or `tinavW.cXrY` \n" - " format), or an AWS type (for example, `t2.small`, which is the default value).\nIf you \n" - " specify an AWS type, it is converted in the background to its corresponding TINA type, but \n" - " the AWS type is still returned. If the specified or converted TINA type includes a \n" - " performance flag, this performance flag is applied regardless of the value you may have \n" - " provided in the `Performance` parameter. For more information, see [VM \n" - " Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" +"--Filters: ref FiltersVmType\n" + " One or more filters.\n" + " --Filters.BsuOptimized: bool\n" + " This parameter is not available. It is present in our API for the sake \n" + " of historical compatibility with AWS.\n" + " --Filters.EphemeralsTypes: array string\n" + " The types of ephemeral storage disk.\n" + " --Filters.Eths: array integer\n" + " The number of Ethernet interfaces available.\n" + " --Filters.Gpus: array integer\n" + " The number of GPUs available.\n" + " --Filters.MemorySizes: array double\n" + " The amounts of memory, in gibibytes (GiB).\n" + " --Filters.VcoreCounts: array integer\n" + " The numbers of vCores.\n" + " --Filters.VmTypeNames: array string\n" + " The names of the VM types. For more information, see [VM \n" + " Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" + " --Filters.VolumeCounts: array integer\n" + " The maximum number of ephemeral storage disks.\n" + " --Filters.VolumeSizes: array integer\n" + " The size of one ephemeral storage disk, in gibibytes (GiB).\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , - "--CpuCores: long long int\n" - " The number of vCores to use for each VM.\n" -"--CpuGeneration: string\n" - " The processor generation to use for each VM (for example, `v4`).\n" -"--CpuPerformance: string\n" - " The performance of the VMs (`medium` \\| `high` \\| `highest`).\n" -"--Description: string\n" - " A description for the VM template.\n" + "--BackendVmIds: array string\n" + " One or more IDs of backend VMs.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--ImageId: string\n" - " The ID of the OMI to use for each VM. You can find a list of OMIs by calling the \n" - " [ReadImages](#readimages) method.\n" -"--KeypairName: string\n" - " The name of the keypair to use for each VM.\n" -"--Ram: long long int\n" - " The amount of RAM to use for each VM.\n" -"--Tags: array ref ResourceTag\n" - " One or more tags to add to the VM template.\n" - " Information about the tag.\n" - " --Tags.INDEX.Key: string\n" - " The key of the tag, with a minimum of 1 character.\n" - " --Tags.INDEX.Value: string\n" - " The value of the tag, between 0 and 255 characters.\n" -"--VmTemplateName: string\n" - " The name of the VM template.\n" +"--LoadBalancerName: string\n" + " The name of the load balancer.\n" , - "--Description: string\n" - " A description for the VM group.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--PositioningStrategy: string\n" - " The positioning strategy of VMs on hypervisors. By default, or if set to `no-strategy` our \n" - " orchestrator determines the most adequate position for your VMs. If set to `attract`, your \n" - " VMs are deployed on the same hypervisor, which improves network performance. If set to \n" - " `repulse`, your VMs are deployed on a different hypervisor, which improves fault tolerance.\n" -"--SecurityGroupIds: array string\n" - " One or more IDs of security groups for the VM group.\n" -"--SubnetId: string\n" - " The ID of the Subnet in which you want to create the VM group.\n" -"--Tags: array ref ResourceTag\n" - " One or more tags to add to the VM group.\n" - " Information about the tag.\n" - " --Tags.INDEX.Key: string\n" - " The key of the tag, with a minimum of 1 character.\n" - " --Tags.INDEX.Value: string\n" - " The value of the tag, between 0 and 255 characters.\n" -"--VmCount: long long int\n" - " The number of VMs deployed in the VM group.\n" -"--VmGroupName: string\n" - " The name of the VM group.\n" -"--VmTemplateId: string\n" - " The ID of the VM template used to launch VMs in the VM group.\n" +"--Filters: ref FiltersVm\n" + " One or more filters.\n" + " --Filters.Architectures: array string\n" + " The architectures of the VMs (`i386` \\| `x86_64`).\n" + " --Filters.BlockDeviceMappingDeleteOnVmDeletion: bool\n" + " Whether the BSU volumes are deleted when terminating the VMs.\n" + " --Filters.BlockDeviceMappingDeviceNames: array string\n" + " The device names for the BSU volumes (in the format `/dev/sdX`, \n" + " `/dev/sdXX`, `/dev/xvdX`, or `/dev/xvdXX`).\n" + " --Filters.BlockDeviceMappingLinkDates: array string\n" + " The link dates for the BSU volumes mapped to the VMs (for example, \n" + " `2016-01-23T18:45:30.000Z`).\n" + " --Filters.BlockDeviceMappingStates: array string\n" + " The states for the BSU volumes (`attaching` \\| `attached` \\| \n" + " `detaching` \\| `detached`).\n" + " --Filters.BlockDeviceMappingVolumeIds: array string\n" + " The volume IDs of the BSU volumes.\n" + " --Filters.ClientTokens: array string\n" + " The idempotency tokens provided when launching the VMs.\n" + " --Filters.CreationDates: array string\n" + " The dates when the VMs were launched.\n" + " --Filters.ImageIds: array string\n" + " The IDs of the OMIs used to launch the VMs.\n" + " --Filters.IsSourceDestChecked: bool\n" + " Whether the source/destination checking is enabled (true) or disabled \n" + " (false).\n" + " --Filters.KeypairNames: array string\n" + " The names of the keypairs used when launching the VMs.\n" + " --Filters.LaunchNumbers: array integer\n" + " The numbers for the VMs when launching a group of several VMs (for \n" + " example, `0`, `1`, `2`, and so on).\n" + " --Filters.Lifecycles: array string\n" + " Whether the VMs are Spot Instances (spot).\n" + " --Filters.NetIds: array string\n" + " The IDs of the Nets in which the VMs are running.\n" + " --Filters.NicAccountIds: array string\n" + " The IDs of the NICs.\n" + " --Filters.NicDescriptions: array string\n" + " The descriptions of the NICs.\n" + " --Filters.NicIsSourceDestChecked: bool\n" + " Whether the source/destination checking is enabled (true) or disabled \n" + " (false).\n" + " --Filters.NicLinkNicDeleteOnVmDeletion: bool\n" + " Whether the NICs are deleted when the VMs they are attached to are \n" + " deleted.\n" + " --Filters.NicLinkNicDeviceNumbers: array integer\n" + " The device numbers the NICs are attached to.\n" + " --Filters.NicLinkNicLinkNicDates: array string\n" + " The dates and times (UTC) when the NICs were attached to the VMs.\n" + " --Filters.NicLinkNicLinkNicIds: array string\n" + " The IDs of the NIC attachments.\n" + " --Filters.NicLinkNicStates: array string\n" + " The states of the attachments.\n" + " --Filters.NicLinkNicVmAccountIds: array string\n" + " The account IDs of the owners of the VMs the NICs are attached to.\n" + " --Filters.NicLinkNicVmIds: array string\n" + " The IDs of the VMs the NICs are attached to.\n" + " --Filters.NicLinkPublicIpAccountIds: array string\n" + " The account IDs of the owners of the public IPs associated with the \n" + " NICs.\n" + " --Filters.NicLinkPublicIpLinkPublicIpIds: array string\n" + " The association IDs returned when the public IPs were associated with \n" + " the NICs.\n" + " --Filters.NicLinkPublicIpPublicIpIds: array string\n" + " The allocation IDs returned when the public IPs were allocated to their \n" + " accounts.\n" + " --Filters.NicLinkPublicIpPublicIps: array string\n" + " The public IPs associated with the NICs.\n" + " --Filters.NicMacAddresses: array string\n" + " The Media Access Control (MAC) addresses of the NICs.\n" + " --Filters.NicNetIds: array string\n" + " The IDs of the Nets where the NICs are located.\n" + " --Filters.NicNicIds: array string\n" + " The IDs of the NICs.\n" + " --Filters.NicPrivateIpsLinkPublicIpAccountIds: array string\n" + " The account IDs of the owner of the public IPs associated with the \n" + " private IPs.\n" + " --Filters.NicPrivateIpsLinkPublicIpIds: array string\n" + " The public IPs associated with the private IPs.\n" + " --Filters.NicPrivateIpsPrimaryIp: bool\n" + " Whether the private IPs are the primary IPs associated with the NICs.\n" + " --Filters.NicPrivateIpsPrivateIps: array string\n" + " The private IPs of the NICs.\n" + " --Filters.NicSecurityGroupIds: array string\n" + " The IDs of the security groups associated with the NICs.\n" + " --Filters.NicSecurityGroupNames: array string\n" + " The names of the security groups associated with the NICs.\n" + " --Filters.NicStates: array string\n" + " The states of the NICs (`available` \\| `in-use`).\n" + " --Filters.NicSubnetIds: array string\n" + " The IDs of the Subnets for the NICs.\n" + " --Filters.NicSubregionNames: array string\n" + " The Subregions where the NICs are located.\n" + " --Filters.Platforms: array string\n" + " The platforms. Use windows if you have Windows VMs. Otherwise, leave \n" + " this filter blank.\n" + " --Filters.PrivateIps: array string\n" + " The private IPs of the VMs.\n" + " --Filters.ProductCodes: array string\n" + " The product codes associated with the OMI used to create the VMs.\n" + " --Filters.PublicIps: array string\n" + " The public IPs of the VMs.\n" + " --Filters.ReservationIds: array string\n" + " The IDs of the reservation of the VMs, created every time you launch \n" + " VMs. These reservation IDs can be associated with several VMs when you \n" + " lauch a group of VMs using the same launch request.\n" + " --Filters.RootDeviceNames: array string\n" + " The names of the root devices for the VMs (for example, `/dev/sda1`)\n" + " --Filters.RootDeviceTypes: array string\n" + " The root devices types used by the VMs (always `ebs`)\n" + " --Filters.SecurityGroupIds: array string\n" + " The IDs of the security groups for the VMs (only in the public Cloud).\n" + " --Filters.SecurityGroupNames: array string\n" + " The names of the security groups for the VMs (only in the public Cloud).\n" + " --Filters.StateReasonCodes: array integer\n" + " The reason codes for the state changes.\n" + " --Filters.StateReasonMessages: array string\n" + " The messages describing the state changes.\n" + " --Filters.StateReasons: array string\n" + " The reasons explaining the current states of the VMs. This filter is \n" + " like the `StateReasonCodes` one.\n" + " --Filters.SubnetIds: array string\n" + " The IDs of the Subnets for the VMs.\n" + " --Filters.SubregionNames: array string\n" + " The names of the Subregions of the VMs.\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the VMs.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the VMs.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the VMs, in the \n" + " following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" + " --Filters.Tenancies: array string\n" + " The tenancies of the VMs (`dedicated` \\| `default` \\| `host`).\n" + " --Filters.VmIds: array string\n" + " One or more IDs of VMs.\n" + " --Filters.VmSecurityGroupIds: array string\n" + " The IDs of the security groups for the VMs.\n" + " --Filters.VmSecurityGroupNames: array string\n" + " The names of the security group for the VMs.\n" + " --Filters.VmStateCodes: array integer\n" + " The state codes of the VMs: `-1` (quarantine), `0` (pending), `16` \n" + " (running), `32` (shutting-down), `48` (terminated), `64` (stopping), and \n" + " `80` (stopped).\n" + " --Filters.VmStateNames: array string\n" + " The state names of the VMs (`pending` \\| `running` \\| `stopping` \\| \n" + " `stopped` \\| `shutting-down` \\| `terminated` \\| `quarantine`).\n" + " --Filters.VmTypes: array string\n" + " The VM types (for example, t2.micro). For more information, see [VM \n" + " Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , - "--ConnectionType: string\n" - " The type of VPN connection supported by the virtual gateway (always `ipsec.1`).\n" + "--AllVms: bool\n" + " If true, includes the status of all VMs. By default or if set to false, only includes the \n" + " status of running VMs.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" +"--Filters: ref FiltersVmsState\n" + " One or more filters.\n" + " --Filters.MaintenanceEventCodes: array string\n" + " The code for the scheduled event (`system-reboot` \\| \n" + " `system-maintenance`).\n" + " --Filters.MaintenanceEventDescriptions: array string\n" + " The description of the scheduled event.\n" + " --Filters.MaintenanceEventsNotAfter: array string\n" + " The latest date and time (UTC) the event can end.\n" + " --Filters.MaintenanceEventsNotBefore: array string\n" + " The earliest date and time (UTC) the event can start.\n" + " --Filters.SubregionNames: array string\n" + " The names of the Subregions of the VMs.\n" + " --Filters.VmIds: array string\n" + " One or more IDs of VMs.\n" + " --Filters.VmStates: array string\n" + " The states of the VMs (`pending` \\| `running` \\| `stopping` \\| \n" + " `stopped` \\| `shutting-down` \\| `terminated` \\| `quarantine`).\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Path: string\n" - " The path to the group. If not specified, it is set to a slash (`/`).\n" -"--UserGroupName: string\n" - " The name of the group.\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--Path: string\n" - " The path to the EIM user you want to create (by default, `/`). This path name must begin \n" - " and end with a slash (`/`), and contain between 1 and 512 alphanumeric characters and/or \n" - " slashes (`/`), or underscores (`_`).\n" -"--UserEmail: string\n" - " The email address of the EIM user.\n" -"--UserName: string\n" - " The name of the EIM user. This user name must contain between 1 and 64 alphanumeric \n" - " characters and/or pluses (`+`), equals (`=`), commas (`,`), periods (`.`), at signs (`@`), \n" - " dashes (`-`), or underscores (`_`).\n" -, - "--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--ResourceIds: array string\n" - " One or more resource IDs.\n" -"--Tags: array ref ResourceTag\n" - " One or more tags to add to the specified resources.\n" - " Information about the tag.\n" - " --Tags.INDEX.Key: string\n" - " The key of the tag, with a minimum of 1 character.\n" - " --Tags.INDEX.Value: string\n" - " The value of the tag, between 0 and 255 characters.\n" +"--Filters: ref FiltersVolume\n" + " One or more filters.\n" + " --Filters.CreationDates: array string\n" + " The dates and times at which the volumes were created, in ISO 8601 \n" + " date-time format (for example, `2020-06-30T00:00:00.000Z`).\n" + " --Filters.LinkVolumeDeleteOnVmDeletion: bool\n" + " Whether the volumes are deleted or not when terminating the VMs.\n" + " --Filters.LinkVolumeDeviceNames: array string\n" + " The VM device names.\n" + " --Filters.LinkVolumeLinkDates: array string\n" + " The dates and times at which the volumes were attached, in ISO 8601 \n" + " date-time format (for example, `2020-06-30T00:00:00.000Z`).\n" + " --Filters.LinkVolumeLinkStates: array string\n" + " The attachment states of the volumes (`attaching` \\| `detaching` \\| \n" + " `attached` \\| `detached`).\n" + " --Filters.LinkVolumeVmIds: array string\n" + " One or more IDs of VMs.\n" + " --Filters.SnapshotIds: array string\n" + " The snapshots from which the volumes were created.\n" + " --Filters.SubregionNames: array string\n" + " The names of the Subregions in which the volumes were created.\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the volumes.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the volumes.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the volumes, in \n" + " the following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" + " --Filters.VolumeIds: array string\n" + " The IDs of the volumes.\n" + " --Filters.VolumeSizes: array integer\n" + " The sizes of the volumes, in gibibytes (GiB).\n" + " --Filters.VolumeStates: array string\n" + " The states of the volumes (`creating` \\| `available` \\| `in-use` \\| \n" + " `updating` \\| `deleting` \\| `error`).\n" + " --Filters.VolumeTypes: array string\n" + " The types of the volumes (`standard` \\| `gp2` \\| `io1`).\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--IpRange: string\n" - " The IP range in the Subnet, in CIDR notation (for example, `10.0.0.0/16`).\nThe IP range of \n" - " the Subnet can be either the same as the Net one if you create only a single Subnet in this \n" - " Net, or a subset of the Net one. In case of several Subnets in a Net, their IP ranges must \n" - " not overlap. The smallest Subnet you can create uses a /29 netmask (eight IPs). For more \n" - " information, see [About Nets](https://docs.outscale.com/en/userguide/About-Nets.html).\n" -"--NetId: string\n" - " The ID of the Net for which you want to create a Subnet.\n" -"--SubregionName: string\n" - " The name of the Subregion in which you want to create the Subnet.\n" +"--Filters: ref FiltersVpnConnection\n" + " One or more filters.\n" + " --Filters.BgpAsns: array integer\n" + " The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of \n" + " the connections.\n" + " --Filters.ClientGatewayIds: array string\n" + " The IDs of the client gateways.\n" + " --Filters.ConnectionTypes: array string\n" + " The types of the VPN connections (always `ipsec.1`).\n" + " --Filters.RouteDestinationIpRanges: array string\n" + " The destination IP ranges.\n" + " --Filters.States: array string\n" + " The states of the VPN connections (`pending` \\| `available` \\| \n" + " `deleting` \\| `deleted`).\n" + " --Filters.StaticRoutesOnly: bool\n" + " If false, the VPN connection uses dynamic routing with Border Gateway \n" + " Protocol (BGP). If true, routing is controlled using static routes. For \n" + " more information about how to create and delete static routes, see \n" + " [CreateVpnConnectionRoute](#createvpnconnectionroute) and \n" + " [DeleteVpnConnectionRoute](#deletevpnconnectionroute).\n" + " --Filters.TagKeys: array string\n" + " The keys of the tags associated with the VPN connections.\n" + " --Filters.TagValues: array string\n" + " The values of the tags associated with the VPN connections.\n" + " --Filters.Tags: array string\n" + " The key/value combination of the tags associated with the VPN \n" + " connections, in the following format: \n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" + " --Filters.VirtualGatewayIds: array string\n" + " The IDs of the virtual gateways.\n" + " --Filters.VpnConnectionIds: array string\n" + " The IDs of the VPN connections.\n" +"--NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a specific page.\n" +"--ResultsPerPage: long long int\n" + " The maximum number of logs returned in a single response (between `1` and `1000`, both \n" + " included). By default, `100`.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--OsuExport: ref OsuExportToCreate\n" - " Information about the OOS export task to create.\n" - " --OsuExport.DiskImageFormat: string\n" - " The format of the export disk (`qcow2` \\| `raw`).\n" - " --OsuExport.OsuApiKey: ref OsuApiKey\n" - " Information about the OOS API key.\n" - " --OsuExport.OsuApiKey.ApiKeyId: string\n" - " The API key of the OOS account that enables you to access the bucket.\n" - " --OsuExport.OsuApiKey.SecretKey: string\n" - " The secret key of the OOS account that enables you to access the bucket.\n" - " --OsuExport.OsuBucket: string\n" - " The name of the OOS bucket where you want to export the object.\n" - " --OsuExport.OsuManifestUrl: string\n" - " The URL of the manifest file.\n" - " --OsuExport.OsuPrefix: string\n" - " The prefix for the key of the OOS object.\n" -"--SnapshotId: string\n" - " The ID of the snapshot to export.\n" +"--VmIds: array string\n" + " One or more IDs of the VMs you want to reboot.\n" , - "--Description: string\n" - " A description for the snapshot.\n" + "--BackendVmIds: array string\n" + " One or more IDs of backend VMs.\nSpecifying the same ID several times has no effect as each \n" + " backend VM has equal weight.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--FileLocation: string\n" - " **(when importing from a bucket)** The pre-signed URL of the snapshot you want to import. \n" - " For more information, see [Creating a Pre-signed \n" - " URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\n" -"--SnapshotSize: long long int\n" - " **(when importing from a bucket)** The size of the snapshot you want to create in your \n" - " account, in bytes. This size must be greater than or equal to the size of the original, \n" - " uncompressed snapshot.\n" -"--SourceRegionName: string\n" - " **(when copying a snapshot)** The name of the source Region, which must be the same as the \n" - " Region of your account.\n" -"--SourceSnapshotId: string\n" - " **(when copying a snapshot)** The ID of the snapshot you want to copy.\n" -"--VolumeId: string\n" - " **(when creating from a volume)** The ID of the volume you want to create a snapshot of.\n" +"--LoadBalancerName: string\n" + " The name of the load balancer.\n" , - "--Body: string\n" - " The PEM-encoded X509 certificate.With OSC CLI, use the following syntax to make sure your \n" - " certificate file is correctly parsed: `--Body=\"$(cat FILENAME)\"`.\n" -"--Chain: string\n" - " The PEM-encoded intermediate certification authorities.With OSC CLI, use the following \n" - " syntax to make sure your certificate chain file is correctly parsed: `--Chain=\"$(cat \n" - " FILENAME)\"`.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Name: string\n" - " A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses \n" - " (`+`), equals (`=`), commas (`,`), periods (`.`), at signs (`@`), minuses (`-`), or \n" - " underscores (`_`).\n" -"--Path: string\n" - " The path to the server certificate, set to a slash (`/`) if not specified.\n" -"--PrivateKey: string\n" - " The PEM-encoded private key matching the certificate.With OSC CLI, use the following syntax \n" - " to make sure your key file is correctly parsed: `--PrivateKey=\"$(cat FILENAME)\"`.\n" +"--NetPeeringId: string\n" + " The ID of the Net peering you want to reject.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Flow: string\n" - " The direction of the flow: `Inbound` or `Outbound`. You can specify `Outbound` for Nets \n" - " only.\n" -"--FromPortRange: long long int\n" - " The beginning of the port range for the TCP and UDP protocols, or an ICMP type number. If \n" - " you specify this parameter, you cannot specify the `Rules` parameter and its subparameters.\n" -"--IpProtocol: string\n" - " The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all protocols). By default, `-1`. \n" - " In a Net, this can also be an IP protocol number. For more information, see the [IANA.org \n" - " website](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). If you \n" - " specify this parameter, you cannot specify the `Rules` parameter and its subparameters.\n" -"--IpRange: string\n" - " The IP range for the security group rule, in CIDR notation (for example, 10.0.0.0/16). If \n" - " you specify this parameter, you cannot specify the `Rules` parameter and its subparameters.\n" -"--Rules: array ref SecurityGroupRule\n" - " Information about the security group rule to create. If you specify this parent parameter \n" - " and its subparameters, you cannot specify the following parent parameters: `FromPortRange`, \n" - " `IpProtocol`, `IpRange`, and `ToPortRange`.\n" - " Information about the security group rule.\n" - " --Rules.INDEX.FromPortRange: long long int\n" - " The beginning of the port range for the TCP and UDP protocols, or an \n" - " ICMP type number.\n" - " --Rules.INDEX.IpProtocol: string\n" - " The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all protocols). \n" - " By default, `-1`. In a Net, this can also be an IP protocol number. For \n" - " more information, see the [IANA.org \n" - " website](https://www.iana.org/assignments/protocol-numbers/protocol-number\n" - " s.xhtml).\n" - " --Rules.INDEX.IpRanges: array string\n" - " One or more IP ranges for the security group rules, in CIDR notation \n" - " (for example, `10.0.0.0/16`).\n" - " --Rules.INDEX.SecurityGroupsMembers: array ref SecurityGroupsMember\n" - " Information about one or more source or destination security groups.\n" - " Information about a source or destination security group.\n" - " --Rules.INDEX.SecurityGroupsMembers.INDEX.AccountId: string\n" - " The account ID that owns the source or destination security group.\n" - " --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupId: string\n" - " The ID of a source or destination security group that you want to link \n" - " to the security group of the rule.\n" - " --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupName: string\n" - " (Public Cloud only) The name of a source or destination security group \n" - " that you want to link to the security group of the rule.\n" - " --Rules.INDEX.ServiceIds: array string\n" - " One or more service IDs to allow traffic from a Net to access the \n" - " corresponding OUTSCALE services. For more information, see \n" - " [ReadNetAccessPointServices](#readnetaccesspointservices).\n" - " --Rules.INDEX.ToPortRange: long long int\n" - " The end of the port range for the TCP and UDP protocols, or an ICMP code \n" - " number.\n" -"--SecurityGroupAccountIdToLink: string\n" - " The account ID that owns the source or destination security group specified in the \n" - " `SecurityGroupNameToLink` parameter.\n" -"--SecurityGroupId: string\n" - " The ID of the security group for which you want to create a rule.\n" -"--SecurityGroupNameToLink: string\n" - " The ID of a source or destination security group that you want to link to the security \n" - " group of the rule.\n" -"--ToPortRange: long long int\n" - " The end of the port range for the TCP and UDP protocols, or an ICMP code number. If you \n" - " specify this parameter, you cannot specify the `Rules` parameter and its subparameters.\n" +"--UserGroupName: string\n" + " The name of the group you want to remove the user from.\n" +"--UserGroupPath: string\n" + " The path to the group. If not specified, it is set to a slash (`/`).\n" +"--UserName: string\n" + " The name of the user you want to remove from the group.\n" +"--UserPath: string\n" + " The path to the user (by default, `/`).\n" , - "--Description: string\n" - " A description for the security group.\nThis description can contain between 1 and 255 \n" - " characters. Allowed characters are `a-z`, `A-Z`, `0-9`, accented letters, spaces, and \n" - " `_.-:/()#,@[]+=&;{}!$*`.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--NetId: string\n" - " The ID of the Net for the security group.\n" -"--SecurityGroupName: string\n" - " The name of the security group.\nThis name must not start with `sg-`.\nThis name must be \n" - " unique and contain between 1 and 255 characters. Allowed characters are `a-z`, `A-Z`, \n" - " `0-9`, spaces, and `_.-:/()#,@[]+=&;{}!$*`.\n" +"--VmGroupId: string\n" + " The ID of the VM group you want to scale down.\n" +"--VmSubtraction: long long int\n" + " The number of VMs you want to delete from the VM group.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--NetId: string\n" - " The ID of the Net for which you want to create a route table.\n" +"--VmAddition: long long int\n" + " The number of VMs you want to add to the VM group.\n" +"--VmGroupId: string\n" + " The ID of the VM group you want to scale up.\n" , - "--DestinationIpRange: string\n" - " The IP range used for the destination match, in CIDR notation (for example, `10.0.0.0/24`).\n" -"--DryRun: bool\n" - " If true, checks whether you have the required permissions to perform the action.\n" -"--GatewayId: string\n" - " The ID of an Internet service or virtual gateway attached to your Net.\n" -"--NatServiceId: string\n" - " The ID of a NAT service.\n" -"--NetPeeringId: string\n" - " The ID of a Net peering.\n" -"--NicId: string\n" - " The ID of a NIC.\n" -"--RouteTableId: string\n" - " The ID of the route table for which you want to create a route.\n" -"--VmId: string\n" - " The ID of a NAT VM in your Net (attached to exactly one NIC).\n" + "--PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" +"--VersionId: string\n" + " The ID of the version.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" +"--VmIds: array string\n" + " One or more IDs of VMs.\n" , - "--Description: string\n" - " The description of the product type.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Vendor: string\n" - " The vendor of the product type.\n" -, - "--Document: string\n" - " The policy document, corresponding to a JSON string that contains the policy. For more \n" - " information, see [EIM Reference \n" - " Information](https://docs.outscale.com/en/userguide/EIM-Reference-Information.html) and \n" - " [EIM Policy Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator.html).\n" -"--PolicyOrn: string\n" - " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" - " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" -"--SetAsDefault: bool\n" - " If set to true, the new policy version is set as the default version and becomes the \n" - " operative one.\n" +"--ForceStop: bool\n" + " Forces the VM to stop.\n" +"--VmIds: array string\n" + " One or more IDs of VMs.\n" , - "--Description: string\n" - " A description for the policy.\n" -"--Document: string\n" - " The policy document, corresponding to a JSON string that contains the policy. For more \n" - " information, see [EIM Reference \n" - " Information](https://docs.outscale.com/en/userguide/EIM-Reference-Information.html) and \n" - " [EIM Policy Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator.html).\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Path: string\n" - " The path of the policy.\n" -"--PolicyName: string\n" - " The name of the policy.\n" +"--FlexibleGpuId: string\n" + " The ID of the fGPU you want to detach from your VM.\n" , - "--Description: string\n" - " A description for the NIC.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--PrivateIps: array ref PrivateIpLight\n" - " The primary private IP for the NIC.\nThis IP must be within the IP range of the Subnet that \n" - " you specify with the `SubnetId` attribute.\nIf you do not specify this attribute, a random \n" - " private IP is selected within the IP range of the Subnet.\n" - " Information about the private IP.\n" - " --PrivateIps.INDEX.IsPrimary: bool\n" - " If true, the IP is the primary private IP of the NIC.\n" - " --PrivateIps.INDEX.PrivateIp: string\n" - " The private IP of the NIC.\n" -"--SecurityGroupIds: array string\n" - " One or more IDs of security groups for the NIC.\n" -"--SubnetId: string\n" - " The ID of the Subnet in which you want to create the NIC.\n" +"--InternetServiceId: string\n" + " The ID of the Internet service you want to detach.\n" +"--NetId: string\n" + " The ID of the Net from which you want to detach the Internet service.\n" , - "--AccepterNetId: string\n" - " The ID of the Net you want to connect with.\n" -"--AccepterOwnerId: string\n" - " The account ID of the owner of the Net you want to connect with. By default, the account ID \n" - " of the owner of the Net from which the peering request is sent.\n" + "--BackendIps: array string\n" + " One or more public IPs of backend VMs.\n" +"--BackendVmIds: array string\n" + " One or more IDs of backend VMs.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--SourceNetId: string\n" - " The ID of the Net you send the peering request from.\n" +"--LoadBalancerName: string\n" + " The name of the load balancer.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" +"--UserGroupName: string\n" + " The name of the group you want to unlink the policy from.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--NetId: string\n" - " The ID of the Net.\n" -"--RouteTableIds: array string\n" - " One or more IDs of route tables to use for the connection.\n" -"--ServiceName: string\n" - " The name of the service (in the format `com.outscale.region.service`).\n" +"--LinkNicId: string\n" + " The ID of the attachment operation.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--IpRange: string\n" - " The IP range for the Net, in CIDR notation (for example, `10.0.0.0/16`).\n" -"--Tenancy: string\n" - " The tenancy options for the VMs:\n- `default` if a VM created in a Net can be launched with \n" - " any tenancy.\n- `dedicated` if it can be launched with dedicated tenancy VMs running on \n" - " single-tenant hardware.\n- `dedicated group ID`: if it can be launched in a dedicated group \n" - " on single-tenant hardware.\n" +"--PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers.html).\n" +"--UserName: string\n" + " The name of the user you want to detach the policy from.\n" , - "--ClientToken: string\n" - " A unique identifier which enables you to manage the idempotency.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--PublicIpId: string\n" - " The allocation ID of the public IP to associate with the NAT service.\nIf the public IP is \n" - " already associated with another resource, you must first disassociate it.\n" -"--SubnetId: string\n" - " The ID of the Subnet in which you want to create the NAT service.\n" +"--NicId: string\n" + " The ID of the NIC.\n" +"--PrivateIps: array string\n" + " One or more secondary private IPs you want to unassign from the NIC.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--LoadBalancerNames: array string\n" - " One or more load balancer names.\n" -"--Tags: array ref ResourceTag\n" - " One or more tags to add to the specified load balancers.\n" - " Information about the tag.\n" - " --Tags.INDEX.Key: string\n" - " The key of the tag, with a minimum of 1 character.\n" - " --Tags.INDEX.Value: string\n" - " The value of the tag, between 0 and 255 characters.\n" +"--LinkPublicIpId: string\n" + " The ID representing the association of the public IP with the VM or the NIC. This parameter \n" + " is required unless you use the `PublicIp` parameter.\n" +"--PublicIp: string\n" + " The public IP. This parameter is required unless you use the `LinkPublicIpId` parameter.\n" , - "--CookieExpirationPeriod: long long int\n" - " The lifetime of the cookie, in seconds. If not specified, the default value of this \n" - " parameter is `1`, which means that the sticky session lasts for the duration of the browser \n" - " session.\n" -"--CookieName: string\n" - " The name of the application cookie used for stickiness. This parameter is required if you \n" - " create a stickiness policy based on an application-generated cookie.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--LoadBalancerName: string\n" - " The name of the load balancer for which you want to create a policy.\n" -"--PolicyName: string\n" - " The unique name of the policy, with a maximum length of 32 alphanumeric characters and \n" - " dashes (`-`).\n" -"--PolicyType: string\n" - " The type of stickiness policy you want to create: `app` or `load_balancer`.\n" +"--LinkRouteTableId: string\n" + " The ID of the association between the route table and the Subnet.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Listeners: array ref ListenerForCreation\n" - " One or more listeners for the load balancer.\n" - " Information about the listener to create.\n" - " --Listeners.INDEX.BackendPort: long long int\n" - " The port on which the backend VM is listening (between `1` and `65535`, \n" - " both included).\n" - " --Listeners.INDEX.BackendProtocol: string\n" - " The protocol for routing traffic to backend VMs (`HTTP` \\| `HTTPS` \\| \n" - " `TCP` \\| `SSL`).\n" - " --Listeners.INDEX.LoadBalancerPort: long long int\n" - " The port on which the load balancer is listening (between `1` and \n" - " `65535`, both included).\n" - " --Listeners.INDEX.LoadBalancerProtocol: string\n" - " The routing protocol (`HTTP` \\| `HTTPS` \\| `TCP` \\| `SSL`).\n" - " --Listeners.INDEX.ServerCertificateId: string\n" - " The OUTSCALE Resource Name (ORN) of the server certificate. For more \n" - " information, see [Resource Identifiers > OUTSCALE Resource Names \n" - " (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.html#_\n" - " outscale_resource_names_orns).\n" -"--LoadBalancerName: string\n" - " The name of the load balancer for which you want to create listeners.\n" +"--NetId: string\n" + " The ID of the Net from which you want to detach the virtual gateway.\n" +"--VirtualGatewayId: string\n" + " The ID of the virtual gateway.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Listeners: array ref ListenerForCreation\n" - " One or more listeners to create.\n" - " Information about the listener to create.\n" - " --Listeners.INDEX.BackendPort: long long int\n" - " The port on which the backend VM is listening (between `1` and `65535`, \n" - " both included).\n" - " --Listeners.INDEX.BackendProtocol: string\n" - " The protocol for routing traffic to backend VMs (`HTTP` \\| `HTTPS` \\| \n" - " `TCP` \\| `SSL`).\n" - " --Listeners.INDEX.LoadBalancerPort: long long int\n" - " The port on which the load balancer is listening (between `1` and \n" - " `65535`, both included).\n" - " --Listeners.INDEX.LoadBalancerProtocol: string\n" - " The routing protocol (`HTTP` \\| `HTTPS` \\| `TCP` \\| `SSL`).\n" - " --Listeners.INDEX.ServerCertificateId: string\n" - " The OUTSCALE Resource Name (ORN) of the server certificate. For more \n" - " information, see [Resource Identifiers > OUTSCALE Resource Names \n" - " (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.html#_\n" - " outscale_resource_names_orns).\n" -"--LoadBalancerName: string\n" - " The unique name of the load balancer, with a maximum length of 32 alphanumeric characters \n" - " and dashes (`-`). This name must not start or end with a dash.\n" -"--LoadBalancerType: string\n" - " The type of load balancer: `internet-facing` or `internal`. Use this parameter only for \n" - " load balancers in a Net.\n" -"--PublicIp: string\n" - " (internet-facing only) The public IP you want to associate with the load balancer. If not \n" - " specified, a public IP owned by 3DS OUTSCALE is associated.\n" -"--SecurityGroups: array string\n" - " (Net only) One or more IDs of security groups you want to assign to the load balancer. If \n" - " not specified, the default security group of the Net is assigned to the load balancer.\n" -"--Subnets: array string\n" - " (Net only) The ID of the Subnet in which you want to create the load balancer. Regardless \n" - " of this Subnet, the load balancer can distribute traffic to all Subnets. This parameter is \n" - " required in a Net.\n" -"--SubregionNames: array string\n" - " (public Cloud only) The Subregion in which you want to create the load balancer. Regardless \n" - " of this Subregion, the load balancer can distribute traffic to all Subregions. This \n" - " parameter is required in the public Cloud.\n" -"--Tags: array ref ResourceTag\n" - " One or more tags assigned to the load balancer.\n" - " Information about the tag.\n" - " --Tags.INDEX.Key: string\n" - " The key of the tag, with a minimum of 1 character.\n" - " --Tags.INDEX.Value: string\n" - " The value of the tag, between 0 and 255 characters.\n" +"--ForceUnlink: bool\n" + " Forces the detachment of the volume in case of previous failure. Important: This action may \n" + " damage your data or file systems.\n" +"--VolumeId: string\n" + " The ID of the volume you want to detach.\n" +, + "--AccessKeyId: string\n" + " The ID of the access key.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--ExpirationDate: string\n" + " The date and time, or the date, at which you want the access key to expire, in ISO 8601 \n" + " format (for example, `2020-06-14T00:00:00.000Z` or `2020-06-14`). If not specified, the \n" + " access key is set to not expire.\n" +"--State: string\n" + " The new state for the access key (`ACTIVE` \\| `INACTIVE`). When set to `ACTIVE`, the \n" + " access key is enabled and can be used to send requests. When set to `INACTIVE`, the access \n" + " key is disabled.\n" +"--UserName: string\n" + " The name of the EIM user that the access key you want to modify is associated with. If you \n" + " do not specify a user name, this action modifies the access key of the user who sends the \n" + " request (which can be the root account).\n" +, + "--AdditionalEmails: array string\n" + " One or more additional email addresses for the account. These addresses are used for \n" + " notifications only. If you already have a list of additional emails registered, you cannot \n" + " add to it, only replace it. To remove all registered additional emails, specify an empty \n" + " list.\n" +"--City: string\n" + " The new city of the account owner.\n" +"--CompanyName: string\n" + " The new name of the company for the account.\n" +"--Country: string\n" + " The new country of the account owner.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Email: string\n" + " The main email address for the account. This address is used for your credentials and \n" + " notifications.\n" +"--FirstName: string\n" + " The new first name of the account owner.\n" +"--JobTitle: string\n" + " The new job title of the account owner.\n" +"--LastName: string\n" + " The new last name of the account owner.\n" +"--MobileNumber: string\n" + " The new mobile phone number of the account owner.\n" +"--PhoneNumber: string\n" + " The new landline phone number of the account owner.\n" +"--StateProvince: string\n" + " The new state/province of the account owner.\n" +"--VatNumber: string\n" + " The new value added tax (VAT) number for the account.\n" +"--ZipCode: string\n" + " The new ZIP code of the city.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Listener: ref LoadBalancerLight\n" - " Information about the load balancer.\n" - " --Listener.LoadBalancerName: string\n" - " The name of the load balancer to which the listener is attached.\n" - " --Listener.LoadBalancerPort: long long int\n" - " The port of load balancer on which the load balancer is listening \n" - " (between `1` and `65535` both included).\n" -"--ListenerRule: ref ListenerRuleForCreation\n" - " Information about the listener rule.\n" - " --ListenerRule.Action: string\n" - " The type of action for the rule (always `forward`).\n" - " --ListenerRule.HostNamePattern: string\n" - " A host-name pattern for the rule, with a maximum length of 128 \n" - " characters. This host-name pattern supports maximum three wildcards, and \n" - " must not contain any special characters except `-.?`.\n" - " --ListenerRule.ListenerRuleName: string\n" - " A human-readable name for the listener rule.\n" - " --ListenerRule.PathPattern: string\n" - " A path pattern for the rule, with a maximum length of 128 characters. \n" - " This path pattern supports maximum three wildcards, and must not contain \n" - " any special characters except `_-.$/~\"'@:+?`.\n" - " --ListenerRule.Priority: long long int\n" - " The priority level of the listener rule, between `1` and `19999` both \n" - " included. Each rule must have a unique priority level. Otherwise, an \n" - " error is returned.\n" -"--VmIds: array string\n" - " The IDs of the backend VMs.\n" +"--MaxAccessKeyExpirationSeconds: long long int\n" + " The maximum possible lifetime for your access keys, in seconds (between `0` and \n" + " `3153600000`, both included). If set to `O`, your access keys can have unlimited lifetimes, \n" + " but a trusted session cannot be activated. Otherwise, all your access keys must have an \n" + " expiration date. This value must be greater than the remaining lifetime of each access key \n" + " of your account.\n" +"--RequireTrustedEnv: bool\n" + " If true, a trusted session is activated, provided that you specify the \n" + " `MaxAccessKeyExpirationSeconds` parameter with a value greater than `0`.\nEnabling this \n" + " will require you and all your users to log in to Cockpit v2 using the WebAuthn method for \n" + " multi-factor authentication. For more information, see [About Authentication > Multi-Factor \n" + " Authentication](https://docs.outscale.com/en/userguide/About-Authentication.html#_multi_fact\n" + " or_authentication).\n" +, + "--ApiAccessRuleId: string\n" + " The ID of the API access rule you want to update.\n" +"--CaIds: array string\n" + " One or more IDs of Client Certificate Authorities (CAs).\n" +"--Cns: array string\n" + " One or more Client Certificate Common Names (CNs).\n" +"--Description: string\n" + " A new description for the API access rule.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--IpRanges: array string\n" + " One or more IPs or CIDR blocks (for example, `192.0.2.0/16`).\n" +, + "--CaId: string\n" + " The ID of the CA.\n" +"--Description: string\n" + " The description of the CA.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" , - "--DryRun: bool\n" + "--DedicatedGroupId: string\n" + " The ID of the dedicated group you want to update.\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--KeypairName: string\n" - " A unique name for the keypair, with a maximum length of 255 [ASCII printable \n" - " characters](https://en.wikipedia.org/wiki/ASCII#Printable_characters).\n" -"--PublicKey: string\n" - " The public key to import in your account, if you are importing an existing keypair. This \n" - " value must be Base64-encoded.\n" +"--Name: string\n" + " The new name of the dedicated group.\n" , - "--DryRun: bool\n" + "--DirectLinkInterfaceId: string\n" + " The ID of the DirectLink interface you want to update.\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" +"--Mtu: long long int\n" + " The maximum transmission unit (MTU) of the DirectLink interface, in bytes (always `1500`).\n" , - "--DryRun: bool\n" + "--DeleteOnVmDeletion: bool\n" + " If true, the fGPU is deleted when the VM is terminated.\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--FlexibleGpuId: string\n" + " The ID of the fGPU you want to modify.\n" +, + "--Description: string\n" + " A new description for the image.\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--ImageId: string\n" - " The ID of the OMI to export.\n" -"--OsuExport: ref OsuExportToCreate\n" - " Information about the OOS export task to create.\n" - " --OsuExport.DiskImageFormat: string\n" - " The format of the export disk (`qcow2` \\| `raw`).\n" - " --OsuExport.OsuApiKey: ref OsuApiKey\n" - " Information about the OOS API key.\n" - " --OsuExport.OsuApiKey.ApiKeyId: string\n" - " The API key of the OOS account that enables you to access the bucket.\n" - " --OsuExport.OsuApiKey.SecretKey: string\n" - " The secret key of the OOS account that enables you to access the bucket.\n" - " --OsuExport.OsuBucket: string\n" - " The name of the OOS bucket where you want to export the object.\n" - " --OsuExport.OsuManifestUrl: string\n" - " The URL of the manifest file.\n" - " --OsuExport.OsuPrefix: string\n" - " The prefix for the key of the OOS object.\n" + " The ID of the OMI you want to modify.\n" +"--PermissionsToLaunch: ref PermissionsOnResourceCreation\n" + " Information about the permissions for the resource.\nSpecify \n" + " either the `Additions` or the `Removals` parameter.\n" + " --PermissionsToLaunch.Additions: ref PermissionsOnResource\n" + " Permissions for the resource.\n" + " --PermissionsToLaunch.Additions.AccountIds: array string\n" + " One or more account IDs that the permission is associated with.\n" + " --PermissionsToLaunch.Additions.GlobalPermission: bool\n" + " A global permission for all accounts.\n(Request) Set this \n" + " parameter to true to make the resource public (if the parent parameter is \n" + " `Additions`) or to make the resource private (if the parent parameter is \n" + " `Removals`).\n(Response) If true, the resource is public. If false, \n" + " the resource is private.\n" + " --PermissionsToLaunch.Removals: ref PermissionsOnResource\n" + " Permissions for the resource.\n" + " --PermissionsToLaunch.Removals.AccountIds: array string\n" + " One or more account IDs that the permission is associated with.\n" + " --PermissionsToLaunch.Removals.GlobalPermission: bool\n" + " A global permission for all accounts.\n(Request) Set this \n" + " parameter to true to make the resource public (if the parent parameter is \n" + " `Additions`) or to make the resource private (if the parent parameter is \n" + " `Removals`).\n(Response) If true, the resource is public. If false, \n" + " the resource is private.\n" , - "--Architecture: string\n" - " **(when registering from a snapshot)** The architecture of the OMI (`i386` or `x86_64`).\n" -"--BlockDeviceMappings: array ref BlockDeviceMappingImage\n" - " **(when registering from a snapshot)** One or more block device mappings.\n" - " One or more parameters used to automatically set up volumes when the VM \n" - " is created.\n" - " --BlockDeviceMappings.INDEX.Bsu: ref BsuToCreate\n" - " Information about the BSU volume to create.\n" - " --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool\n" - " By default or if set to true, the volume is deleted when terminating the \n" - " VM. If false, the volume is not deleted when terminating the VM.\n" - " --BlockDeviceMappings.INDEX.Bsu.Iops: long long int\n" - " The number of I/O operations per second (IOPS). This parameter must be \n" - " specified only if you create an `io1` volume. The maximum number of IOPS \n" - " allowed for `io1` volumes is `13000` with a maximum performance ratio of \n" - " 300 IOPS per gibibyte.\n" - " --BlockDeviceMappings.INDEX.Bsu.SnapshotId: string\n" - " The ID of the snapshot used to create the volume.\n" - " --BlockDeviceMappings.INDEX.Bsu.VolumeSize: long long int\n" - " The size of the volume, in gibibytes (GiB).\nIf you specify a \n" - " snapshot ID, the volume size must be at least equal to the snapshot \n" - " size.\nIf you specify a snapshot ID but no volume size, the volume \n" - " is created with a size similar to the snapshot one.\n" - " --BlockDeviceMappings.INDEX.Bsu.VolumeType: string\n" - " The type of the volume (`standard` \\| `io1` \\| `gp2`). If not \n" - " specified in the request, a `standard` volume is created.\nFor more \n" - " information about volume types, see [About Volumes > Volume Types and \n" - " IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volume_ty\n" - " pes_and_iops).\n" - " --BlockDeviceMappings.INDEX.DeviceName: string\n" - " The device name for the volume. For a root device, you must use \n" - " `/dev/sda1`. For other volumes, you must use `/dev/sdX`, `/dev/sdXX`, \n" - " `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter between `b` \n" - " and `z`, and the second `X` is a letter between `a` and `z`).\n" - " --BlockDeviceMappings.INDEX.VirtualDeviceName: string\n" - " The name of the virtual device (`ephemeralN`).\n" -"--Description: string\n" - " A description for the new OMI.\n" + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--HostPattern: string\n" + " A host-name pattern for the rule, with a maximum length of 128 characters. This host-name \n" + " pattern supports maximum three wildcards, and must not contain any special characters \n" + " except `-.?`.\n" +"--ListenerRuleName: string\n" + " The name of the listener rule.\n" +"--PathPattern: string\n" + " A path pattern for the rule, with a maximum length of 128 characters. This path pattern \n" + " supports maximum three wildcards, and must not contain any special characters except \n" + " `_-.$/~\"'@:+?`.\n" +, + "--AccessLog: ref AccessLog\n" + " Information about access logs.\n" + " --AccessLog.IsEnabled: bool\n" + " If true, access logs are enabled for your load balancer. If false, they \n" + " are not. If you set this to true in your request, the `OsuBucketName` \n" + " parameter is required.\n" + " --AccessLog.OsuBucketName: string\n" + " The name of the OOS bucket for the access logs.\n" + " --AccessLog.OsuBucketPrefix: string\n" + " The path to the folder of the access logs in your OOS bucket (by \n" + " default, the `root` level of your bucket).\n" + " --AccessLog.PublicationInterval: long long int\n" + " The time interval for the publication of access logs in the OOS bucket, \n" + " in minutes. This value can be either `5` or `60` (by default, `60`).\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--FileLocation: string\n" - " **(when registering from a bucket by using a manifest file)** The pre-signed URL of the \n" - " manifest file for the OMI you want to register. For more information, see [Creating a \n" - " Pre-signed URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL.html).\n" -"--ImageName: string\n" - " A unique name for the new OMI.\nConstraints: 3-128 alphanumeric characters, underscores \n" - " (`_`), spaces (` `), parentheses (`()`), slashes (`/`), periods (`.`), or dashes (`-`).\n" -"--NoReboot: bool\n" - " **(when creating from a VM)** If false, the VM shuts down before creating the OMI and then \n" - " reboots. If true, the VM does not.\n" -"--ProductCodes: array string\n" - " The product codes associated with the OMI.\n" -"--RootDeviceName: string\n" - " **(when registering from a snapshot)** The name of the root device for the new OMI.\n" -"--SourceImageId: string\n" - " **(when copying an OMI)** The ID of the OMI you want to copy.\n" -"--SourceRegionName: string\n" - " **(when copying an OMI)** The name of the source Region (always the same as the Region of \n" - " your account).\n" -"--VmId: string\n" - " **(when creating from a VM)** The ID of the VM from which you want to create the OMI.\n" +"--HealthCheck: ref HealthCheck\n" + " Information about the health check configuration.\n" + " --HealthCheck.CheckInterval: long long int\n" + " The number of seconds between two requests (between `5` and `600` both \n" + " included).\n" + " --HealthCheck.HealthyThreshold: long long int\n" + " The number of consecutive successful requests before considering the VM \n" + " as healthy (between `2` and `10` both included).\n" + " --HealthCheck.Path: string\n" + " If you use the HTTP or HTTPS protocols, the request URL path.\n" + " --HealthCheck.Port: long long int\n" + " The port number (between `1` and `65535`, both included).\n" + " --HealthCheck.Protocol: string\n" + " The protocol for the URL of the VM (`HTTP` \\| `HTTPS` \\| `TCP` \\| \n" + " `SSL`).\n" + " --HealthCheck.Timeout: long long int\n" + " The maximum waiting time for a response before considering the VM as \n" + " unhealthy, in seconds (between `2` and `60` both included).\n" + " --HealthCheck.UnhealthyThreshold: long long int\n" + " The number of consecutive failed requests before considering the VM as \n" + " unhealthy (between `2` and `10` both included).\n" +"--LoadBalancerName: string\n" + " The name of the load balancer.\n" +"--LoadBalancerPort: long long int\n" + " The port on which the load balancer is listening (between `1` and `65535`, both included). \n" + " This parameter is required if you want to update the server certificate.\n" +"--PolicyNames: array string\n" + " The name of the policy you want to enable for the listener.\n" +"--PublicIp: string\n" + " (internet-facing only) The public IP you want to associate with the load balancer. The \n" + " former public IP of the load balancer is then disassociated. If you specify an empty string \n" + " and the former public IP belonged to you, it is disassociated and replaced by a public IP \n" + " owned by 3DS OUTSCALE.\n" +"--SecuredCookies: bool\n" + " If true, secure cookies are enabled for the load balancer.\n" +"--SecurityGroups: array string\n" + " (Net only) One or more IDs of security groups you want to assign to the load balancer. You \n" + " need to specify the already assigned security groups that you want to keep along with the \n" + " new ones you are assigning. If the list is empty, the default security group of the Net is \n" + " assigned to the load balancer.\n" +"--ServerCertificateId: string\n" + " The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see \n" + " [Resource Identifiers > OUTSCALE Resource Names \n" + " (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.html#_outscale_resource_\n" + " names_orns). If this parameter is specified, you must also specify the `LoadBalancerPort` \n" + " parameter.\n" , - "--DeleteOnVmDeletion: bool\n" - " If true, the fGPU is deleted when the VM is terminated.\n" + "--AddRouteTableIds: array string\n" + " One or more IDs of route tables to associate with the specified Net access point.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Generation: string\n" - " The processor generation that the fGPU must be compatible with. If not specified, the \n" - " oldest possible processor generation is selected (as provided by \n" - " [ReadFlexibleGpuCatalog](#readflexiblegpucatalog) for the specified model of fGPU).\n" -"--ModelName: string\n" - " The model of fGPU you want to allocate. For more information, see [About Flexible \n" - " GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html).\n" -"--SubregionName: string\n" - " The Subregion in which you want to create the fGPU.\n" +"--NetAccessPointId: string\n" + " The ID of the Net access point.\n" +"--RemoveRouteTableIds: array string\n" + " One or more IDs of route tables to disassociate from the specified Net access point.\n" , - "--DirectLinkId: string\n" - " The ID of the existing DirectLink for which you want to create the DirectLink interface.\n" -"--DirectLinkInterface: ref DirectLinkInterface\n" - " Information about the DirectLink interface.\n" - " --DirectLinkInterface.BgpAsn: long long int\n" - " The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the \n" - " customer's side of the DirectLink interface. This number must be between \n" - " `64512` and `65534`.\n" - " --DirectLinkInterface.BgpKey: string\n" - " The BGP authentication key.\n" - " --DirectLinkInterface.ClientPrivateIp: string\n" - " The IP on the customer's side of the DirectLink interface.\n" - " --DirectLinkInterface.DirectLinkInterfaceName: string\n" - " The name of the DirectLink interface.\n" - " --DirectLinkInterface.OutscalePrivateIp: string\n" - " The IP on the OUTSCALE side of the DirectLink interface.\n" - " --DirectLinkInterface.VirtualGatewayId: string\n" - " The ID of the target virtual gateway.\n" - " --DirectLinkInterface.Vlan: long long int\n" - " The VLAN number associated with the DirectLink interface. This number \n" - " must be unique and be between `2` and `4094`.\n" + "--DhcpOptionsSetId: string\n" + " The ID of the DHCP options set (or `default` if you want to associate the default one).\n" +"--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--NetId: string\n" + " The ID of the Net.\n" +, + "--Description: string\n" + " A new description for the NIC.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" +"--LinkNic: ref LinkNicToUpdate\n" + " Information about the NIC attachment. If you are modifying the \n" + " `DeleteOnVmDeletion` attribute, you must specify the ID of the NIC \n" + " attachment.\n" + " --LinkNic.DeleteOnVmDeletion: bool\n" + " If true, the NIC is deleted when the VM is terminated. If false, the NIC \n" + " is detached from the VM.\n" + " --LinkNic.LinkNicId: string\n" + " The ID of the NIC attachment.\n" +"--NicId: string\n" + " The ID of the NIC you want to modify.\n" +"--SecurityGroupIds: array string\n" + " One or more IDs of security groups for the NIC.\nYou must specify at least one group, even \n" + " if you use the default security group in the Net.\n" +, + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--Enable: bool\n" + " If true, a virtual gateway can propagate routes to a specified route table of a Net. If \n" + " false, the propagation is disabled.\n" +"--RouteTableId: string\n" + " The ID of the route table.\n" +"--VirtualGatewayId: string\n" + " The ID of the virtual gateway.\n" , - "--Bandwidth: string\n" - " The bandwidth of the DirectLink (`1Gbps` \\| `10Gbps`).\n" -"--DirectLinkName: string\n" - " The name of the DirectLink.\n" + "--DestinationIpRange: string\n" + " The IP range used for the destination match, in CIDR notation (for example, `10.0.0.0/24`).\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Location: string\n" - " The code of the requested location for the DirectLink, returned by the \n" - " [ReadLocations](#readlocations) method.\n" +"--GatewayId: string\n" + " The ID of an Internet service or virtual gateway attached to your Net.\n" +"--NatServiceId: string\n" + " The ID of a NAT service.\n" +"--NetPeeringId: string\n" + " The ID of a Net peering.\n" +"--NicId: string\n" + " The ID of a network interface card (NIC).\n" +"--RouteTableId: string\n" + " The ID of the route table.\n" +"--VmId: string\n" + " The ID of a NAT VM in your Net.\n" , - "--DomainName: string\n" - " Specify a domain name (for example, `MyCompany.com`). You can specify only one domain name. \n" - " You must specify at least one of the following parameters: `DomainName`, \n" - " `DomainNameServers`, `LogServers`, or `NtpServers`.\n" -"--DomainNameServers: array string\n" - " The IPs of domain name servers. If no IPs are specified, the `OutscaleProvidedDNS` value is \n" - " set by default. You must specify at least one of the following parameters: `DomainName`, \n" - " `DomainNameServers`, `LogServers`, or `NtpServers`.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--LogServers: array string\n" - " The IPs of the log servers. You must specify at least one of the following parameters: \n" - " `DomainName`, `DomainNameServers`, `LogServers`, or `NtpServers`.\n" -"--NtpServers: array string\n" - " The IPs of the Network Time Protocol (NTP) servers. You must specify at least one of the \n" - " following parameters: `DomainName`, `DomainNameServers`, `LogServers`, or `NtpServers`.\n" +"--LinkRouteTableId: string\n" + " The ID of the current route table link.\n" +"--RouteTableId: string\n" + " The ID of the new route table to associate with the Subnet.\n" , - "--CpuGeneration: long long int\n" - " The processor generation for the VMs in the dedicated group (for example, `4`).\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" "--Name: string\n" - " A name for the dedicated group.\n" -"--SubregionName: string\n" - " The Subregion in which you want to create the dedicated group.\n" + " The name of the server certificate you want to modify.\n" +"--NewName: string\n" + " A new name for the server certificate.\n" +"--NewPath: string\n" + " A new path for the server certificate.\n" , - "--BgpAsn: long long int\n" - " The Autonomous System Number (ASN) used by the Border Gateway Protocol (BGP) to find the \n" - " path to your client gateway through the Internet.
\nThis number must be between `1` \n" - " and `4294967295`. If you do not have an ASN, you can choose one between 64512 and 65534, or \n" - " between 4200000000 and 4294967294.\n" -"--ConnectionType: string\n" - " The communication protocol used to establish tunnel with your client gateway (always \n" - " `ipsec.1`).\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--PublicIp: string\n" - " The public fixed IPv4 address of your client gateway.\n" +"--PermissionsToCreateVolume: ref PermissionsOnResourceCreation\n" + " Information about the permissions for the resource.\nSpecify \n" + " either the `Additions` or the `Removals` parameter.\n" + " --PermissionsToCreateVolume.Additions: ref PermissionsOnResource\n" + " Permissions for the resource.\n" + " --PermissionsToCreateVolume.Additions.AccountIds: array string\n" + " One or more account IDs that the permission is associated with.\n" + " --PermissionsToCreateVolume.Additions.GlobalPermission: bool\n" + " A global permission for all accounts.\n(Request) Set this \n" + " parameter to true to make the resource public (if the parent parameter is \n" + " `Additions`) or to make the resource private (if the parent parameter is \n" + " `Removals`).\n(Response) If true, the resource is public. If false, \n" + " the resource is private.\n" + " --PermissionsToCreateVolume.Removals: ref PermissionsOnResource\n" + " Permissions for the resource.\n" + " --PermissionsToCreateVolume.Removals.AccountIds: array string\n" + " One or more account IDs that the permission is associated with.\n" + " --PermissionsToCreateVolume.Removals.GlobalPermission: bool\n" + " A global permission for all accounts.\n(Request) Set this \n" + " parameter to true to make the resource public (if the parent parameter is \n" + " `Additions`) or to make the resource private (if the parent parameter is \n" + " `Removals`).\n(Response) If true, the resource is public. If false, \n" + " the resource is private.\n" +"--SnapshotId: string\n" + " The ID of the snapshot.\n" , - "--CaPem: string\n" - " The CA in PEM format.With OSC CLI, use the following syntax to make sure your CA file is \n" - " correctly parsed: `--CaPem=\"$(cat FILENAME)\"`.\n" -"--Description: string\n" - " The description of the CA.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" +"--MapPublicIpOnLaunch: bool\n" + " If true, a public IP is assigned to the network interface cards (NICs) created in the \n" + " specified Subnet.\n" +"--SubnetId: string\n" + " The ID of the Subnet.\n" , - "--CaIds: array string\n" - " One or more IDs of Client Certificate Authorities (CAs).\n" -"--Cns: array string\n" - " One or more Client Certificate Common Names (CNs). If this parameter is specified, you must \n" - " also specify the `CaIds` parameter.\n" -"--Description: string\n" - " A description for the API access rule.\n" -"--DryRun: bool\n" + "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--IpRanges: array string\n" - " One or more IPs or CIDR blocks (for example, `192.0.2.0/16`).\n" +"--NewPath: string\n" + " A new path for the group. If not specified, it is set to a slash (`/`).\n" +"--NewUserGroupName: string\n" + " A new name for the user group.\n" +"--Path: string\n" + " The path to the group. If not specified, it is set to a slash (`/`).\n" +"--UserGroupName: string\n" + " The name of the group you want to update.\n" , - "--AdditionalEmails: array string\n" - " One or more additional email addresses for the account. These addresses are used for \n" - " notifications only. If you already have a list of additional emails registered, you cannot \n" - " add to it, only replace it. To remove all registered additional emails, specify an empty \n" - " list.\n" -"--City: string\n" - " The city of the account owner.\n" -"--CompanyName: string\n" - " The name of the company for the account.\n" -"--Country: string\n" - " The country of the account owner.\n" -"--CustomerId: string\n" - " The ID of the customer. It must be 8 digits.\n" + "--DryRun: bool\n" + " If true, checks whether you have the required permissions to perform the action.\n" +"--NewPath: string\n" + " A new path for the EIM user.\n" +"--NewUserEmail: string\n" + " A new email address for the EIM user.\n" +"--NewUserName: string\n" + " A new name for the EIM user.\n" +"--UserName: string\n" + " The name of the EIM user you want to modify.\n" +, + "--Description: string\n" + " A new description for the VM group.\n" "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Email: string\n" - " The main email address for the account. This address is used for your credentials and \n" - " notifications.\n" -"--FirstName: string\n" - " The first name of the account owner.\n" -"--JobTitle: string\n" - " The job title of the account owner.\n" -"--LastName: string\n" - " The last name of the account owner.\n" -"--MobileNumber: string\n" - " The mobile phone number of the account owner.\n" -"--PhoneNumber: string\n" - " The landline phone number of the account owner.\n" -"--StateProvince: string\n" - " The state/province of the account.\n" -"--VatNumber: string\n" - " The value added tax (VAT) number for the account.\n" -"--ZipCode: string\n" - " The ZIP code of the city.\n" +"--Tags: array ref ResourceTag\n" + " New tags for your VM group.\n" + " Information about the tag.\n" + " --Tags.INDEX.Key: string\n" + " The key of the tag, with a minimum of 1 character.\n" + " --Tags.INDEX.Value: string\n" + " The value of the tag, between 0 and 255 characters.\n" +"--VmGroupId: string\n" + " The ID of the VM group you want to update.\n" +"--VmGroupName: string\n" + " A new name for your VM group.\n" +"--VmTemplateId: string\n" + " A new VM template ID for your VM group.\n" , - "--DryRun: bool\n" + "--BlockDeviceMappings: array ref BlockDeviceMappingVmUpdate\n" + " One or more block device mappings of the VM.\n" + " Information about the block device mapping.\n" + " --BlockDeviceMappings.INDEX.Bsu: ref BsuToUpdateVm\n" + " Information about the BSU volume.\n" + " --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool\n" + " If set to true, the volume is deleted when terminating the VM. If set to \n" + " false, the volume is not deleted when terminating the VM.\n" + " --BlockDeviceMappings.INDEX.Bsu.VolumeId: string\n" + " The ID of the volume.\n" + " --BlockDeviceMappings.INDEX.DeviceName: string\n" + " The device name for the volume. For a root device, you must use \n" + " `/dev/sda1`. For other volumes, you must use `/dev/sdX`, `/dev/sdXX`, \n" + " `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter between `b` \n" + " and `z`, and the second `X` is a letter between `a` and `z`).\n" + " --BlockDeviceMappings.INDEX.NoDevice: string\n" + " Removes the device which is included in the block device mapping of the \n" + " OMI.\n" + " --BlockDeviceMappings.INDEX.VirtualDeviceName: string\n" + " The name of the virtual device (`ephemeralN`).\n" +"--BsuOptimized: bool\n" + " This parameter is not available. It is present in our API for the sake of historical \n" + " compatibility with AWS.\n" +"--DeletionProtection: bool\n" + " If true, you cannot delete the VM unless you change this parameter back to false.\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--ExpirationDate: string\n" - " The date and time, or the date, at which you want the access key to expire, in ISO 8601 \n" - " format (for example, `2020-06-14T00:00:00.000Z`, or `2020-06-14`). To remove an existing \n" - " expiration date, use the method without specifying this parameter.\n" -"--UserName: string\n" - " The name of the EIM user that owns the key to be created. If you do not specify a user \n" - " name, this action creates an access key for the user who sends the request (which can be \n" - " the root account).\n" +"--IsSourceDestChecked: bool\n" + " (Net only) If true, the source/destination check is enabled. If false, it is disabled.\n" +"--KeypairName: string\n" + " The name of a keypair you want to associate with the VM.\nWhen you replace the keypair of a \n" + " VM with another one, the metadata of the VM is modified to reflect the new public key, but \n" + " the replacement is still not effective in the operating system of the VM. To complete the \n" + " replacement and effectively apply the new keypair, you need to perform other actions inside \n" + " the VM. For more information, see [Modifying the Keypair of a \n" + " VM](https://docs.outscale.com/en/userguide/Modifying-the-Keypair-of-a-VM.html).\n" +"--NestedVirtualization: bool\n" + " (dedicated tenancy only) If true, nested virtualization is enabled. If false, it is \n" + " disabled.\n" +"--Performance: string\n" + " The performance of the VM (`medium` \\| `high` \\| `highest`).\n" +"--SecurityGroupIds: array string\n" + " One or more IDs of security groups for the VM.\n" +"--UserData: string\n" + " The Base64-encoded MIME user data, limited to 500 kibibytes (KiB).\n" +"--VmId: string\n" + " The ID of the VM.\n" +"--VmInitiatedShutdownBehavior: string\n" + " The VM behavior when you stop it. If set to `stop`, the VM stops. If set to `restart`, the \n" + " VM stops then automatically restarts. If set to `terminate`, the VM stops and is terminated.\n" +"--VmType: string\n" + " The type of VM. For more information, see [VM \n" + " Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" , - "--DryRun: bool\n" + "--Description: string\n" + " A new description for the VM template.\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--Login: string\n" - " The email address of the account.\n" -"--Password: string\n" - " The password of the account.\n" +"--Tags: array ref ResourceTag\n" + " New tags for your VM template.\n" + " Information about the tag.\n" + " --Tags.INDEX.Key: string\n" + " The key of the tag, with a minimum of 1 character.\n" + " --Tags.INDEX.Value: string\n" + " The value of the tag, between 0 and 255 characters.\n" +"--VmTemplateId: string\n" + " The ID of the VM template you want to update.\n" +"--VmTemplateName: string\n" + " A new name for your VM template.\n" , "--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--UserGroupName: string\n" - " The name of the group you want to add a user to.\n" -"--UserGroupPath: string\n" - " The path to the group. If not specified, it is set to a slash (`/`).\n" -"--UserName: string\n" - " The name of the user you want to add to the group.\n" -"--UserPath: string\n" - " The path to the user. If not specified, it is set to a slash (`/`).\n" +"--Iops: long long int\n" + " **Cold volume**: the new number of I/O operations per second (IOPS). This parameter can be \n" + " specified only if you update an `io1` volume or if you change the type of the volume for an \n" + " `io1`. This modification is instantaneous. \n**Hot volume**: the new number of I/O \n" + " operations per second (IOPS). This parameter can be specified only if you update an `io1` \n" + " volume. This modification is not instantaneous. \nThe maximum number of IOPS allowed for \n" + " `io1` volumes is `13000` with a maximum performance ratio of 300 IOPS per gibibyte.\n" +"--Size: long long int\n" + " **Cold volume**: the new size of the volume, in gibibytes (GiB). This value must be equal \n" + " to or greater than the current size of the volume. This modification is not instantaneous. \n" + " \n**Hot volume**: you cannot change the size of a hot volume.\n" +"--VolumeId: string\n" + " The ID of the volume you want to update.\n" +"--VolumeType: string\n" + " **Cold volume**: the new type of the volume (`standard` \\| `io1` \\| `gp2`). This \n" + " modification is instantaneous. If you update to an `io1` volume, you must also specify the \n" + " `Iops` parameter.\n**Hot volume**: you cannot change the type of a hot volume.\n" , - "--DryRun: bool\n" + "--ClientGatewayId: string\n" + " The ID of the client gateway.\n" +"--DryRun: bool\n" " If true, checks whether you have the required permissions to perform the action.\n" -"--NetPeeringId: string\n" - " The ID of the Net peering you want to accept.\n" +"--VirtualGatewayId: string\n" + " The ID of the virtual gateway.\n" +"--VpnConnectionId: string\n" + " The ID of the VPN connection you want to modify.\n" +"--VpnOptions: ref VpnOptions\n" + " Information about the VPN options.\n" + " --VpnOptions.Phase1Options: ref Phase1Options\n" + " Information about Phase 1 of the Internet Key Exchange (IKE) \n" + " negotiation. When Phase 1 finishes successfully, peers proceed to Phase 2 \n" + " negotiations.\n" + " --VpnOptions.Phase1Options.DpdTimeoutAction: string\n" + " The action to carry out after a Dead Peer Detection (DPD) timeout \n" + " occurs.\n" + " --VpnOptions.Phase1Options.DpdTimeoutSeconds: long long int\n" + " The maximum waiting time for a Dead Peer Detection (DPD) response before \n" + " considering the peer as dead, in seconds.\n" + " --VpnOptions.Phase1Options.IkeVersions: array string\n" + " The Internet Key Exchange (IKE) versions allowed for the VPN tunnel.\n" + " --VpnOptions.Phase1Options.Phase1DhGroupNumbers: array integer\n" + " The Diffie-Hellman (DH) group numbers allowed for the VPN tunnel for \n" + " phase 1.\n" + " --VpnOptions.Phase1Options.Phase1EncryptionAlgorithms: array string\n" + " The encryption algorithms allowed for the VPN tunnel for phase 1.\n" + " --VpnOptions.Phase1Options.Phase1IntegrityAlgorithms: array string\n" + " The integrity algorithms allowed for the VPN tunnel for phase 1.\n" + " --VpnOptions.Phase1Options.Phase1LifetimeSeconds: long long int\n" + " The lifetime for phase 1 of the IKE negotiation process, in seconds.\n" + " --VpnOptions.Phase1Options.ReplayWindowSize: long long int\n" + " The number of packets in an IKE replay window.\n" + " --VpnOptions.Phase1Options.StartupAction: string\n" + " The action to carry out when establishing tunnels for a VPN connection.\n" + " --VpnOptions.Phase2Options: ref Phase2Options\n" + " Information about Phase 2 of the Internet Key Exchange (IKE) \n" + " negotiation.\n" + " --VpnOptions.Phase2Options.Phase2DhGroupNumbers: array integer\n" + " The Diffie-Hellman (DH) group numbers allowed for the VPN tunnel for \n" + " phase 2.\n" + " --VpnOptions.Phase2Options.Phase2EncryptionAlgorithms: array string\n" + " The encryption algorithms allowed for the VPN tunnel for phase 2.\n" + " --VpnOptions.Phase2Options.Phase2IntegrityAlgorithms: array string\n" + " The integrity algorithms allowed for the VPN tunnel for phase 2.\n" + " --VpnOptions.Phase2Options.Phase2LifetimeSeconds: long long int\n" + " The lifetime for phase 2 of the Internet Key Exchange (IKE) negociation \n" + " process, in seconds.\n" + " --VpnOptions.Phase2Options.PreSharedKey: string\n" + " The pre-shared key to establish the initial authentication between the \n" + " client gateway and the virtual gateway. This key can contain any \n" + " character except line breaks and double quotes (\").\n" + " --VpnOptions.TunnelInsideIpRange: string\n" + " The range of inside IPs for the tunnel. This must be a /30 CIDR block \n" + " from the 169.254.254.0/24 range.\n" , NULL }; @@ -4509,6 +4509,45 @@ static char *osc_strdup(const char *str) { } while (0) +int osc_set_extra_flag_from_conf(const char *profile, unsigned int *flag) +{ + char buf[1024]; + const char *cfg = cfg_path; + auto_osc_json_c struct json_object *to_free = NULL; + struct json_object *json_tmp, *js = NULL; + + if (!cfg) { + LOAD_CFG_GET_HOME(buf); + cfg = buf; + } + TRY(access(cfg, R_OK), "can't open/read %s\n", cfg); + js = json_object_from_file(cfg); + TRY(!js, "can't load json-file %s (json might have incorect syntaxe)\n", cfg); + to_free = js; + js = json_object_object_get(js, profile); + TRY(!js, "can't find profile %s\n", profile); + + json_tmp = json_object_object_get(js, "ssl_verify"); + if (json_tmp) { + if (!json_object_get_boolean(json_tmp) || + !json_object_get_int(json_tmp)) { + *flag = *flag | OSC_INSECURE_MODE; + } else { + *flag = *flag & (~OSC_INSECURE_MODE); + } + } + json_tmp = json_object_object_get(js, "verbose"); + if (json_tmp) { + if (json_object_get_boolean(json_tmp) || + json_object_get_int(json_tmp)) { + *flag = *flag | OSC_VERBOSE_MODE; + } else { + *flag = *flag & (~OSC_VERBOSE_MODE); + } + } + return 0; +} + int osc_load_ak_sk_from_conf(const char *profile, char **ak, char **sk) { char buf[1024]; @@ -4772,9 +4811,9 @@ static int filters_users_setter(struct filters_users *args, struct osc_str *data static int filters_virtual_gateway_setter(struct filters_virtual_gateway *args, struct osc_str *data); static int filters_vm_setter(struct filters_vm *args, struct osc_str *data); static int filters_vm_group_setter(struct filters_vm_group *args, struct osc_str *data); +static int filters_vms_state_setter(struct filters_vms_state *args, struct osc_str *data); static int filters_vm_template_setter(struct filters_vm_template *args, struct osc_str *data); static int filters_vm_type_setter(struct filters_vm_type *args, struct osc_str *data); -static int filters_vms_state_setter(struct filters_vms_state *args, struct osc_str *data); static int filters_volume_setter(struct filters_volume *args, struct osc_str *data); static int filters_vpn_connection_setter(struct filters_vpn_connection *args, struct osc_str *data); static int flexible_gpu_setter(struct flexible_gpu *args, struct osc_str *data); @@ -4786,14 +4825,14 @@ static int inline_policy_setter(struct inline_policy *args, struct osc_str *data static int internet_service_setter(struct internet_service *args, struct osc_str *data); static int keypair_setter(struct keypair *args, struct osc_str *data); static int keypair_created_setter(struct keypair_created *args, struct osc_str *data); +static int linked_policy_setter(struct linked_policy *args, struct osc_str *data); +static int linked_volume_setter(struct linked_volume *args, struct osc_str *data); static int link_nic_setter(struct link_nic *args, struct osc_str *data); static int link_nic_light_setter(struct link_nic_light *args, struct osc_str *data); static int link_nic_to_update_setter(struct link_nic_to_update *args, struct osc_str *data); static int link_public_ip_setter(struct link_public_ip *args, struct osc_str *data); static int link_public_ip_light_for_vm_setter(struct link_public_ip_light_for_vm *args, struct osc_str *data); static int link_route_table_setter(struct link_route_table *args, struct osc_str *data); -static int linked_policy_setter(struct linked_policy *args, struct osc_str *data); -static int linked_volume_setter(struct linked_volume *args, struct osc_str *data); static int listener_setter(struct listener *args, struct osc_str *data); static int listener_for_creation_setter(struct listener_for_creation *args, struct osc_str *data); static int listener_rule_setter(struct listener_rule *args, struct osc_str *data); @@ -11109,24 +11148,142 @@ static int filters_vm_group_setter(struct filters_vm_group *args, struct osc_str } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->vm_group_names_str) { - ARG_TO_JSON(VmGroupNames, string, args->vm_group_names_str); + } else if (args->vm_group_names_str) { + ARG_TO_JSON(VmGroupNames, string, args->vm_group_names_str); + ret += 1; + } + if (args->vm_template_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"VmTemplateIds\":[" )); + for (as = args->vm_template_ids; *as; ++as) { + if (as != args->vm_template_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->vm_template_ids_str) { + ARG_TO_JSON(VmTemplateIds, string, args->vm_template_ids_str); + ret += 1; + } + + return !!ret; +} +static int filters_vms_state_setter(struct filters_vms_state *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->maintenance_event_codes) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"MaintenanceEventCodes\":[" )); + for (as = args->maintenance_event_codes; *as; ++as) { + if (as != args->maintenance_event_codes) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->maintenance_event_codes_str) { + ARG_TO_JSON(MaintenanceEventCodes, string, args->maintenance_event_codes_str); + ret += 1; + } + if (args->maintenance_event_descriptions) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"MaintenanceEventDescriptions\":[" )); + for (as = args->maintenance_event_descriptions; *as; ++as) { + if (as != args->maintenance_event_descriptions) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->maintenance_event_descriptions_str) { + ARG_TO_JSON(MaintenanceEventDescriptions, string, args->maintenance_event_descriptions_str); + ret += 1; + } + if (args->maintenance_events_not_after) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"MaintenanceEventsNotAfter\":[" )); + for (as = args->maintenance_events_not_after; *as; ++as) { + if (as != args->maintenance_events_not_after) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->maintenance_events_not_after_str) { + ARG_TO_JSON(MaintenanceEventsNotAfter, string, args->maintenance_events_not_after_str); + ret += 1; + } + if (args->maintenance_events_not_before) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"MaintenanceEventsNotBefore\":[" )); + for (as = args->maintenance_events_not_before; *as; ++as) { + if (as != args->maintenance_events_not_before) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->maintenance_events_not_before_str) { + ARG_TO_JSON(MaintenanceEventsNotBefore, string, args->maintenance_events_not_before_str); + ret += 1; + } + if (args->subregion_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"SubregionNames\":[" )); + for (as = args->subregion_names; *as; ++as) { + if (as != args->subregion_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->subregion_names_str) { + ARG_TO_JSON(SubregionNames, string, args->subregion_names_str); + ret += 1; + } + if (args->vm_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"VmIds\":[" )); + for (as = args->vm_ids; *as; ++as) { + if (as != args->vm_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->vm_ids_str) { + ARG_TO_JSON(VmIds, string, args->vm_ids_str); ret += 1; } - if (args->vm_template_ids) { + if (args->vm_states) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"VmTemplateIds\":[" )); - for (as = args->vm_template_ids; *as; ++as) { - if (as != args->vm_template_ids) + STRY(osc_str_append_string(data, "\"VmStates\":[" )); + for (as = args->vm_states; *as; ++as) { + if (as != args->vm_states) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->vm_template_ids_str) { - ARG_TO_JSON(VmTemplateIds, string, args->vm_template_ids_str); + } else if (args->vm_states_str) { + ARG_TO_JSON(VmStates, string, args->vm_states_str); ret += 1; } @@ -11468,124 +11625,6 @@ static int filters_vm_type_setter(struct filters_vm_type *args, struct osc_str * return !!ret; } -static int filters_vms_state_setter(struct filters_vms_state *args, struct osc_str *data) { - int count_args = 0; - int ret = 0; - if (args->maintenance_event_codes) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"MaintenanceEventCodes\":[" )); - for (as = args->maintenance_event_codes; *as; ++as) { - if (as != args->maintenance_event_codes) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->maintenance_event_codes_str) { - ARG_TO_JSON(MaintenanceEventCodes, string, args->maintenance_event_codes_str); - ret += 1; - } - if (args->maintenance_event_descriptions) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"MaintenanceEventDescriptions\":[" )); - for (as = args->maintenance_event_descriptions; *as; ++as) { - if (as != args->maintenance_event_descriptions) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->maintenance_event_descriptions_str) { - ARG_TO_JSON(MaintenanceEventDescriptions, string, args->maintenance_event_descriptions_str); - ret += 1; - } - if (args->maintenance_events_not_after) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"MaintenanceEventsNotAfter\":[" )); - for (as = args->maintenance_events_not_after; *as; ++as) { - if (as != args->maintenance_events_not_after) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->maintenance_events_not_after_str) { - ARG_TO_JSON(MaintenanceEventsNotAfter, string, args->maintenance_events_not_after_str); - ret += 1; - } - if (args->maintenance_events_not_before) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"MaintenanceEventsNotBefore\":[" )); - for (as = args->maintenance_events_not_before; *as; ++as) { - if (as != args->maintenance_events_not_before) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->maintenance_events_not_before_str) { - ARG_TO_JSON(MaintenanceEventsNotBefore, string, args->maintenance_events_not_before_str); - ret += 1; - } - if (args->subregion_names) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"SubregionNames\":[" )); - for (as = args->subregion_names; *as; ++as) { - if (as != args->subregion_names) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->subregion_names_str) { - ARG_TO_JSON(SubregionNames, string, args->subregion_names_str); - ret += 1; - } - if (args->vm_ids) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"VmIds\":[" )); - for (as = args->vm_ids; *as; ++as) { - if (as != args->vm_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->vm_ids_str) { - ARG_TO_JSON(VmIds, string, args->vm_ids_str); - ret += 1; - } - if (args->vm_states) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"VmStates\":[" )); - for (as = args->vm_states; *as; ++as) { - if (as != args->vm_states) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->vm_states_str) { - ARG_TO_JSON(VmStates, string, args->vm_states_str); - ret += 1; - } - - return !!ret; -} static int filters_volume_setter(struct filters_volume *args, struct osc_str *data) { int count_args = 0; int ret = 0; @@ -12403,6 +12442,67 @@ static int keypair_created_setter(struct keypair_created *args, struct osc_str * return !!ret; } +static int linked_policy_setter(struct linked_policy *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->creation_date) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"CreationDate\":", args->creation_date); + ret += 1; + } + if (args->last_modification_date) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"LastModificationDate\":", args->last_modification_date); + ret += 1; + } + if (args->orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Orn\":", args->orn); + ret += 1; + } + if (args->policy_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyId\":", args->policy_id); + ret += 1; + } + if (args->policy_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); + ret += 1; + } + + return !!ret; +} +static int linked_volume_setter(struct linked_volume *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->is_set_delete_on_vm_deletion) { + ARG_TO_JSON(DeleteOnVmDeletion, bool, args->delete_on_vm_deletion); + ret += 1; + } + if (args->device_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"DeviceName\":", args->device_name); + ret += 1; + } + if (args->state) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"State\":", args->state); + ret += 1; + } + if (args->vm_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VmId\":", args->vm_id); + ret += 1; + } + if (args->volume_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VolumeId\":", args->volume_id); + ret += 1; + } + + return !!ret; +} static int link_nic_setter(struct link_nic *args, struct osc_str *data) { int count_args = 0; int ret = 0; @@ -12545,75 +12645,14 @@ static int link_route_table_setter(struct link_route_table *args, struct osc_str ARG_TO_JSON_STR("\"NetId\":", args->net_id); ret += 1; } - if (args->route_table_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); - ret += 1; - } - if (args->subnet_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); - ret += 1; - } - - return !!ret; -} -static int linked_policy_setter(struct linked_policy *args, struct osc_str *data) { - int count_args = 0; - int ret = 0; - if (args->creation_date) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"CreationDate\":", args->creation_date); - ret += 1; - } - if (args->last_modification_date) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LastModificationDate\":", args->last_modification_date); - ret += 1; - } - if (args->orn) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Orn\":", args->orn); - ret += 1; - } - if (args->policy_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyId\":", args->policy_id); - ret += 1; - } - if (args->policy_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); - ret += 1; - } - - return !!ret; -} -static int linked_volume_setter(struct linked_volume *args, struct osc_str *data) { - int count_args = 0; - int ret = 0; - if (args->is_set_delete_on_vm_deletion) { - ARG_TO_JSON(DeleteOnVmDeletion, bool, args->delete_on_vm_deletion); - ret += 1; - } - if (args->device_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DeviceName\":", args->device_name); - ret += 1; - } - if (args->state) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"State\":", args->state); - ret += 1; - } - if (args->vm_id) { + if (args->route_table_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmId\":", args->vm_id); + ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); ret += 1; } - if (args->volume_id) { + if (args->subnet_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VolumeId\":", args->volume_id); + ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); ret += 1; } @@ -16169,2072 +16208,2490 @@ static int vpn_connection_setter(struct vpn_connection *args, struct osc_str *da ARG_TO_JSON_STR("\"VirtualGatewayId\":", args->virtual_gateway_id); ret += 1; } - if (args->vpn_connection_id) { + if (args->vpn_connection_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VpnConnectionId\":", args->vpn_connection_id); + ret += 1; + } + if (args->vpn_options_str) { + ARG_TO_JSON(VpnOptions, string, args->vpn_options_str); + ret += 1; + } else if (args->is_set_vpn_options) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"VpnOptions\": { " )); + STRY(vpn_options_setter(&args->vpn_options, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + + return !!ret; +} +static int vpn_options_setter(struct vpn_options *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->phase1_options_str) { + ARG_TO_JSON(Phase1Options, string, args->phase1_options_str); + ret += 1; + } else if (args->is_set_phase1_options) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Phase1Options\": { " )); + STRY(phase1_options_setter(&args->phase1_options, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->phase2_options_str) { + ARG_TO_JSON(Phase2Options, string, args->phase2_options_str); + ret += 1; + } else if (args->is_set_phase2_options) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Phase2Options\": { " )); + STRY(phase2_options_setter(&args->phase2_options, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->tunnel_inside_ip_range) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"TunnelInsideIpRange\":", args->tunnel_inside_ip_range); + ret += 1; + } + + return !!ret; +} +static int with_setter(struct with *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->is_set_account_id) { + ARG_TO_JSON(AccountId, bool, args->account_id); + ret += 1; + } + if (args->is_set_call_duration) { + ARG_TO_JSON(CallDuration, bool, args->call_duration); + ret += 1; + } + if (args->is_set_query_access_key) { + ARG_TO_JSON(QueryAccessKey, bool, args->query_access_key); + ret += 1; + } + if (args->is_set_query_api_name) { + ARG_TO_JSON(QueryApiName, bool, args->query_api_name); + ret += 1; + } + if (args->is_set_query_api_version) { + ARG_TO_JSON(QueryApiVersion, bool, args->query_api_version); + ret += 1; + } + if (args->is_set_query_call_name) { + ARG_TO_JSON(QueryCallName, bool, args->query_call_name); + ret += 1; + } + if (args->is_set_query_date) { + ARG_TO_JSON(QueryDate, bool, args->query_date); + ret += 1; + } + if (args->is_set_query_header_raw) { + ARG_TO_JSON(QueryHeaderRaw, bool, args->query_header_raw); + ret += 1; + } + if (args->is_set_query_header_size) { + ARG_TO_JSON(QueryHeaderSize, bool, args->query_header_size); + ret += 1; + } + if (args->is_set_query_ip_address) { + ARG_TO_JSON(QueryIpAddress, bool, args->query_ip_address); + ret += 1; + } + if (args->is_set_query_payload_raw) { + ARG_TO_JSON(QueryPayloadRaw, bool, args->query_payload_raw); + ret += 1; + } + if (args->is_set_query_payload_size) { + ARG_TO_JSON(QueryPayloadSize, bool, args->query_payload_size); + ret += 1; + } + if (args->is_set_query_user_agent) { + ARG_TO_JSON(QueryUserAgent, bool, args->query_user_agent); + ret += 1; + } + if (args->is_set_request_id) { + ARG_TO_JSON(RequestId, bool, args->request_id); + ret += 1; + } + if (args->is_set_response_size) { + ARG_TO_JSON(ResponseSize, bool, args->response_size); + ret += 1; + } + if (args->is_set_response_status_code) { + ARG_TO_JSON(ResponseStatusCode, bool, args->response_status_code); + ret += 1; + } + + return !!ret; +} + +static int accept_net_peering_data(struct osc_env *e, struct osc_accept_net_peering_arg *args, struct osc_str *data) +{ + struct osc_str end_call; + int ret = 0; + int count_args = 0; + + (void)count_args; /* if use only query/header and path, this is unused */ + if (!args) + return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->net_peering_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NetPeeringId\":", args->net_peering_id); + ret += 1; + } + osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/AcceptNetPeering"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); + return !!ret; +} + +int osc_accept_net_peering(struct osc_env *e, struct osc_str *out, struct osc_accept_net_peering_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + int r; + + osc_init_str(&data); + r = accept_net_peering_data(e, args, &data); + if (r < 0) + goto out; + + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&data); + return res; +} +static int add_user_to_user_group_data(struct osc_env *e, struct osc_add_user_to_user_group_arg *args, struct osc_str *data) +{ + struct osc_str end_call; + int ret = 0; + int count_args = 0; + + (void)count_args; /* if use only query/header and path, this is unused */ + if (!args) + return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->user_group_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); + ret += 1; + } + if (args->user_group_path) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserGroupPath\":", args->user_group_path); + ret += 1; + } + if (args->user_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ret += 1; + } + if (args->user_path) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserPath\":", args->user_path); + ret += 1; + } + osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/AddUserToUserGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); + return !!ret; +} + +int osc_add_user_to_user_group(struct osc_env *e, struct osc_str *out, struct osc_add_user_to_user_group_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + int r; + + osc_init_str(&data); + r = add_user_to_user_group_data(e, args, &data); + if (r < 0) + goto out; + + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&data); + return res; +} +static int check_authentication_data(struct osc_env *e, struct osc_check_authentication_arg *args, struct osc_str *data) +{ + struct osc_str end_call; + int ret = 0; + int count_args = 0; + + (void)count_args; /* if use only query/header and path, this is unused */ + if (!args) + return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->login) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Login\":", args->login); + ret += 1; + } + if (args->password) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VpnConnectionId\":", args->vpn_connection_id); + ARG_TO_JSON_STR("\"Password\":", args->password); ret += 1; } - if (args->vpn_options_str) { - ARG_TO_JSON(VpnOptions, string, args->vpn_options_str); - ret += 1; - } else if (args->is_set_vpn_options) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"VpnOptions\": { " )); - STRY(vpn_options_setter(&args->vpn_options, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } + osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CheckAuthentication"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -static int vpn_options_setter(struct vpn_options *args, struct osc_str *data) { - int count_args = 0; - int ret = 0; - if (args->phase1_options_str) { - ARG_TO_JSON(Phase1Options, string, args->phase1_options_str); - ret += 1; - } else if (args->is_set_phase1_options) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Phase1Options\": { " )); - STRY(phase1_options_setter(&args->phase1_options, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + +int osc_check_authentication(struct osc_env *e, struct osc_str *out, struct osc_check_authentication_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + int r; + + osc_init_str(&data); + r = check_authentication_data(e, args, &data); + if (r < 0) + goto out; + + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); } - if (args->phase2_options_str) { - ARG_TO_JSON(Phase2Options, string, args->phase2_options_str); - ret += 1; - } else if (args->is_set_phase2_options) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Phase2Options\": { " )); - STRY(phase2_options_setter(&args->phase2_options, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&data); + return res; +} +static int create_access_key_data(struct osc_env *e, struct osc_create_access_key_arg *args, struct osc_str *data) +{ + struct osc_str end_call; + int ret = 0; + int count_args = 0; + + (void)count_args; /* if use only query/header and path, this is unused */ + if (!args) + return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; } - if (args->tunnel_inside_ip_range) { + if (args->expiration_date) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"TunnelInsideIpRange\":", args->tunnel_inside_ip_range); + ARG_TO_JSON_STR("\"ExpirationDate\":", args->expiration_date); + ret += 1; + } + if (args->user_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); ret += 1; } + osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateAccessKey"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -static int with_setter(struct with *args, struct osc_str *data) { - int count_args = 0; - int ret = 0; - if (args->is_set_account_id) { - ARG_TO_JSON(AccountId, bool, args->account_id); - ret += 1; + +int osc_create_access_key(struct osc_env *e, struct osc_str *out, struct osc_create_access_key_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + int r; + + osc_init_str(&data); + r = create_access_key_data(e, args, &data); + if (r < 0) + goto out; + + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); } - if (args->is_set_call_duration) { - ARG_TO_JSON(CallDuration, bool, args->call_duration); - ret += 1; + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&data); + return res; +} +static int create_account_data(struct osc_env *e, struct osc_create_account_arg *args, struct osc_str *data) +{ + struct osc_str end_call; + int ret = 0; + int count_args = 0; + + (void)count_args; /* if use only query/header and path, this is unused */ + if (!args) + return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->additional_emails) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"AdditionalEmails\":[" )); + for (as = args->additional_emails; *as; ++as) { + if (as != args->additional_emails) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->additional_emails_str) { + ARG_TO_JSON(AdditionalEmails, string, args->additional_emails_str); + ret += 1; } - if (args->is_set_query_access_key) { - ARG_TO_JSON(QueryAccessKey, bool, args->query_access_key); + if (args->city) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"City\":", args->city); ret += 1; } - if (args->is_set_query_api_name) { - ARG_TO_JSON(QueryApiName, bool, args->query_api_name); + if (args->company_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"CompanyName\":", args->company_name); ret += 1; } - if (args->is_set_query_api_version) { - ARG_TO_JSON(QueryApiVersion, bool, args->query_api_version); + if (args->country) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Country\":", args->country); ret += 1; } - if (args->is_set_query_call_name) { - ARG_TO_JSON(QueryCallName, bool, args->query_call_name); + if (args->customer_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"CustomerId\":", args->customer_id); ret += 1; } - if (args->is_set_query_date) { - ARG_TO_JSON(QueryDate, bool, args->query_date); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->is_set_query_header_raw) { - ARG_TO_JSON(QueryHeaderRaw, bool, args->query_header_raw); + if (args->email) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Email\":", args->email); ret += 1; } - if (args->is_set_query_header_size) { - ARG_TO_JSON(QueryHeaderSize, bool, args->query_header_size); + if (args->first_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"FirstName\":", args->first_name); ret += 1; } - if (args->is_set_query_ip_address) { - ARG_TO_JSON(QueryIpAddress, bool, args->query_ip_address); + if (args->job_title) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"JobTitle\":", args->job_title); ret += 1; } - if (args->is_set_query_payload_raw) { - ARG_TO_JSON(QueryPayloadRaw, bool, args->query_payload_raw); + if (args->last_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"LastName\":", args->last_name); ret += 1; } - if (args->is_set_query_payload_size) { - ARG_TO_JSON(QueryPayloadSize, bool, args->query_payload_size); + if (args->mobile_number) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"MobileNumber\":", args->mobile_number); ret += 1; } - if (args->is_set_query_user_agent) { - ARG_TO_JSON(QueryUserAgent, bool, args->query_user_agent); + if (args->phone_number) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PhoneNumber\":", args->phone_number); ret += 1; } - if (args->is_set_request_id) { - ARG_TO_JSON(RequestId, bool, args->request_id); + if (args->state_province) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"StateProvince\":", args->state_province); ret += 1; } - if (args->is_set_response_size) { - ARG_TO_JSON(ResponseSize, bool, args->response_size); + if (args->vat_number) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VatNumber\":", args->vat_number); ret += 1; } - if (args->is_set_response_status_code) { - ARG_TO_JSON(ResponseStatusCode, bool, args->response_status_code); + if (args->zip_code) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ZipCode\":", args->zip_code); ret += 1; } + osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateAccount"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -static int update_vpn_connection_data(struct osc_update_vpn_connection_arg *args, struct osc_str *data) +int osc_create_account(struct osc_env *e, struct osc_str *out, struct osc_create_account_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + int r; + + osc_init_str(&data); + r = create_account_data(e, args, &data); + if (r < 0) + goto out; + + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&data); + return res; +} +static int create_api_access_rule_data(struct osc_env *e, struct osc_create_api_access_rule_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; - if (!args) - return 0; - osc_str_append_string(data, "{"); - if (args->client_gateway_id) { + (void)count_args; /* if use only query/header and path, this is unused */ + if (!args) + return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->ca_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"CaIds\":[" )); + for (as = args->ca_ids; *as; ++as) { + if (as != args->ca_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->ca_ids_str) { + ARG_TO_JSON(CaIds, string, args->ca_ids_str); + ret += 1; + } + if (args->cns) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Cns\":[" )); + for (as = args->cns; *as; ++as) { + if (as != args->cns) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->cns_str) { + ARG_TO_JSON(Cns, string, args->cns_str); + ret += 1; + } + if (args->description) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ClientGatewayId\":", args->client_gateway_id); + ARG_TO_JSON_STR("\"Description\":", args->description); ret += 1; } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->virtual_gateway_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VirtualGatewayId\":", args->virtual_gateway_id); - ret += 1; - } - if (args->vpn_connection_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VpnConnectionId\":", args->vpn_connection_id); - ret += 1; - } - if (args->vpn_options_str) { - ARG_TO_JSON(VpnOptions, string, args->vpn_options_str); + if (args->ip_ranges) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"IpRanges\":[" )); + for (as = args->ip_ranges; *as; ++as) { + if (as != args->ip_ranges) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->ip_ranges_str) { + ARG_TO_JSON(IpRanges, string, args->ip_ranges_str); ret += 1; - } else if (args->is_set_vpn_options) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"VpnOptions\": { " )); - STRY(vpn_options_setter(&args->vpn_options, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateApiAccessRule"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_vpn_connection(struct osc_env *e, struct osc_str *out, struct osc_update_vpn_connection_arg *args) +int osc_create_api_access_rule(struct osc_env *e, struct osc_str *out, struct osc_create_api_access_rule_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_vpn_connection_data(args, &data); + r = create_api_access_rule_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateVpnConnection"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_volume_data(struct osc_update_volume_arg *args, struct osc_str *data) +static int create_ca_data(struct osc_env *e, struct osc_create_ca_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->is_set_iops || args->iops) { - ARG_TO_JSON(Iops, int, args->iops); - ret += 1; - } - if (args->is_set_size || args->size) { - ARG_TO_JSON(Size, int, args->size); + if (args->ca_pem) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"CaPem\":", args->ca_pem); ret += 1; } - if (args->volume_id) { + if (args->description) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VolumeId\":", args->volume_id); + ARG_TO_JSON_STR("\"Description\":", args->description); ret += 1; } - if (args->volume_type) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VolumeType\":", args->volume_type); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateCa"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_volume(struct osc_env *e, struct osc_str *out, struct osc_update_volume_arg *args) +int osc_create_ca(struct osc_env *e, struct osc_str *out, struct osc_create_ca_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_volume_data(args, &data); + r = create_ca_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateVolume"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_vm_template_data(struct osc_update_vm_template_arg *args, struct osc_str *data) +static int create_client_gateway_data(struct osc_env *e, struct osc_create_client_gateway_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->description) { + if (args->is_set_bgp_asn || args->bgp_asn) { + ARG_TO_JSON(BgpAsn, int, args->bgp_asn); + ret += 1; + } + if (args->connection_type) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Description\":", args->description); + ARG_TO_JSON_STR("\"ConnectionType\":", args->connection_type); ret += 1; } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->tags) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Tags\":[" )); - for (int i = 0; i < args->nb_tags; ++i) { - struct resource_tag *p = &args->tags[i]; - if (p != args->tags) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(resource_tag_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->tags_str) { - ARG_TO_JSON(Tags, string, args->tags_str); - ret += 1; - } - if (args->vm_template_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmTemplateId\":", args->vm_template_id); - ret += 1; - } - if (args->vm_template_name) { + if (args->public_ip) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmTemplateName\":", args->vm_template_name); + ARG_TO_JSON_STR("\"PublicIp\":", args->public_ip); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateClientGateway"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_vm_template(struct osc_env *e, struct osc_str *out, struct osc_update_vm_template_arg *args) +int osc_create_client_gateway(struct osc_env *e, struct osc_str *out, struct osc_create_client_gateway_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_vm_template_data(args, &data); + r = create_client_gateway_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateVmTemplate"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_vm_group_data(struct osc_update_vm_group_arg *args, struct osc_str *data) +static int create_dedicated_group_data(struct osc_env *e, struct osc_create_dedicated_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->description) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Description\":", args->description); + if (args->is_set_cpu_generation || args->cpu_generation) { + ARG_TO_JSON(CpuGeneration, int, args->cpu_generation); ret += 1; } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->tags) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Tags\":[" )); - for (int i = 0; i < args->nb_tags; ++i) { - struct resource_tag *p = &args->tags[i]; - if (p != args->tags) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(resource_tag_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->tags_str) { - ARG_TO_JSON(Tags, string, args->tags_str); - ret += 1; - } - if (args->vm_group_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmGroupId\":", args->vm_group_id); - ret += 1; - } - if (args->vm_group_name) { + if (args->name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmGroupName\":", args->vm_group_name); + ARG_TO_JSON_STR("\"Name\":", args->name); ret += 1; } - if (args->vm_template_id) { + if (args->subregion_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmTemplateId\":", args->vm_template_id); + ARG_TO_JSON_STR("\"SubregionName\":", args->subregion_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateDedicatedGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_vm_group(struct osc_env *e, struct osc_str *out, struct osc_update_vm_group_arg *args) +int osc_create_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_create_dedicated_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_vm_group_data(args, &data); + r = create_dedicated_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateVmGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_vm_data(struct osc_update_vm_arg *args, struct osc_str *data) +static int create_dhcp_options_data(struct osc_env *e, struct osc_create_dhcp_options_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; - osc_str_append_string(data, "{"); - if (args->block_device_mappings) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"BlockDeviceMappings\":[" )); - for (int i = 0; i < args->nb_block_device_mappings; ++i) { - struct block_device_mapping_vm_update *p = &args->block_device_mappings[i]; - if (p != args->block_device_mappings) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(block_device_mapping_vm_update_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->block_device_mappings_str) { - ARG_TO_JSON(BlockDeviceMappings, string, args->block_device_mappings_str); - ret += 1; - } - if (args->is_set_bsu_optimized) { - ARG_TO_JSON(BsuOptimized, bool, args->bsu_optimized); - ret += 1; - } - if (args->is_set_deletion_protection) { - ARG_TO_JSON(DeletionProtection, bool, args->deletion_protection); - ret += 1; - } - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->is_set_is_source_dest_checked) { - ARG_TO_JSON(IsSourceDestChecked, bool, args->is_source_dest_checked); - ret += 1; - } - if (args->keypair_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"KeypairName\":", args->keypair_name); - ret += 1; - } - if (args->is_set_nested_virtualization) { - ARG_TO_JSON(NestedVirtualization, bool, args->nested_virtualization); - ret += 1; - } - if (args->performance) { + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->domain_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Performance\":", args->performance); + ARG_TO_JSON_STR("\"DomainName\":", args->domain_name); ret += 1; } - if (args->security_group_ids) { + if (args->domain_name_servers) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"SecurityGroupIds\":[" )); - for (as = args->security_group_ids; *as; ++as) { - if (as != args->security_group_ids) + STRY(osc_str_append_string(data, "\"DomainNameServers\":[" )); + for (as = args->domain_name_servers; *as; ++as) { + if (as != args->domain_name_servers) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->security_group_ids_str) { - ARG_TO_JSON(SecurityGroupIds, string, args->security_group_ids_str); + } else if (args->domain_name_servers_str) { + ARG_TO_JSON(DomainNameServers, string, args->domain_name_servers_str); ret += 1; } - if (args->user_data) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserData\":", args->user_data); - ret += 1; - } - if (args->vm_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmId\":", args->vm_id); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->vm_initiated_shutdown_behavior) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmInitiatedShutdownBehavior\":", args->vm_initiated_shutdown_behavior); - ret += 1; + if (args->log_servers) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"LogServers\":[" )); + for (as = args->log_servers; *as; ++as) { + if (as != args->log_servers) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->log_servers_str) { + ARG_TO_JSON(LogServers, string, args->log_servers_str); + ret += 1; } - if (args->vm_type) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmType\":", args->vm_type); - ret += 1; + if (args->ntp_servers) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NtpServers\":[" )); + for (as = args->ntp_servers; *as; ++as) { + if (as != args->ntp_servers) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->ntp_servers_str) { + ARG_TO_JSON(NtpServers, string, args->ntp_servers_str); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateDhcpOptions"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_vm(struct osc_env *e, struct osc_str *out, struct osc_update_vm_arg *args) +int osc_create_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_create_dhcp_options_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_vm_data(args, &data); + r = create_dhcp_options_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateVm"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_user_group_data(struct osc_update_user_group_arg *args, struct osc_str *data) +static int create_direct_link_interface_data(struct osc_env *e, struct osc_create_direct_link_interface_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->new_path) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NewPath\":", args->new_path); - ret += 1; - } - if (args->new_user_group_name) { + if (args->direct_link_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NewUserGroupName\":", args->new_user_group_name); + ARG_TO_JSON_STR("\"DirectLinkId\":", args->direct_link_id); ret += 1; } - if (args->path) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Path\":", args->path); - ret += 1; + if (args->direct_link_interface_str) { + ARG_TO_JSON(DirectLinkInterface, string, args->direct_link_interface_str); + ret += 1; + } else if (args->is_set_direct_link_interface) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"DirectLinkInterface\": { " )); + STRY(direct_link_interface_setter(&args->direct_link_interface, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } - if (args->user_group_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateDirectLinkInterface"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_user_group(struct osc_env *e, struct osc_str *out, struct osc_update_user_group_arg *args) +int osc_create_direct_link_interface(struct osc_env *e, struct osc_str *out, struct osc_create_direct_link_interface_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_user_group_data(args, &data); + r = create_direct_link_interface_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateUserGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_user_data(struct osc_update_user_arg *args, struct osc_str *data) +static int create_direct_link_data(struct osc_env *e, struct osc_create_direct_link_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->new_path) { + if (args->bandwidth) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NewPath\":", args->new_path); + ARG_TO_JSON_STR("\"Bandwidth\":", args->bandwidth); ret += 1; } - if (args->new_user_email) { + if (args->direct_link_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NewUserEmail\":", args->new_user_email); + ARG_TO_JSON_STR("\"DirectLinkName\":", args->direct_link_name); ret += 1; } - if (args->new_user_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NewUserName\":", args->new_user_name); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->user_name) { + if (args->location) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ARG_TO_JSON_STR("\"Location\":", args->location); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateDirectLink"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_user(struct osc_env *e, struct osc_str *out, struct osc_update_user_arg *args) +int osc_create_direct_link(struct osc_env *e, struct osc_str *out, struct osc_create_direct_link_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_user_data(args, &data); + r = create_direct_link_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateUser"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_subnet_data(struct osc_update_subnet_arg *args, struct osc_str *data) +static int create_flexible_gpu_data(struct osc_env *e, struct osc_create_flexible_gpu_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->is_set_delete_on_vm_deletion) { + ARG_TO_JSON(DeleteOnVmDeletion, bool, args->delete_on_vm_deletion); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->is_set_map_public_ip_on_launch) { - ARG_TO_JSON(MapPublicIpOnLaunch, bool, args->map_public_ip_on_launch); + if (args->generation) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Generation\":", args->generation); ret += 1; } - if (args->subnet_id) { + if (args->model_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); + ARG_TO_JSON_STR("\"ModelName\":", args->model_name); + ret += 1; + } + if (args->subregion_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SubregionName\":", args->subregion_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateFlexibleGpu"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_subnet(struct osc_env *e, struct osc_str *out, struct osc_update_subnet_arg *args) +int osc_create_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_create_flexible_gpu_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_subnet_data(args, &data); + r = create_flexible_gpu_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateSubnet"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_snapshot_data(struct osc_update_snapshot_arg *args, struct osc_str *data) +static int create_image_export_task_data(struct osc_env *e, struct osc_create_image_export_task_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->permissions_to_create_volume_str) { - ARG_TO_JSON(PermissionsToCreateVolume, string, args->permissions_to_create_volume_str); + if (args->image_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ImageId\":", args->image_id); + ret += 1; + } + if (args->osu_export_str) { + ARG_TO_JSON(OsuExport, string, args->osu_export_str); ret += 1; - } else if (args->is_set_permissions_to_create_volume) { + } else if (args->is_set_osu_export) { TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"PermissionsToCreateVolume\": { " )); - STRY(permissions_on_resource_creation_setter(&args->permissions_to_create_volume, data) < 0); + STRY(osc_str_append_string(data, "\"OsuExport\": { " )); + STRY(osu_export_to_create_setter(&args->osu_export, data) < 0); STRY(osc_str_append_string(data, "}" )); ret += 1; } - if (args->snapshot_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SnapshotId\":", args->snapshot_id); - ret += 1; - } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateImageExportTask"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_snapshot(struct osc_env *e, struct osc_str *out, struct osc_update_snapshot_arg *args) +int osc_create_image_export_task(struct osc_env *e, struct osc_str *out, struct osc_create_image_export_task_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_snapshot_data(args, &data); + r = create_image_export_task_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateSnapshot"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_server_certificate_data(struct osc_update_server_certificate_arg *args, struct osc_str *data) +static int create_image_data(struct osc_env *e, struct osc_create_image_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->architecture) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Architecture\":", args->architecture); + ret += 1; + } + if (args->block_device_mappings) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"BlockDeviceMappings\":[" )); + for (int i = 0; i < args->nb_block_device_mappings; ++i) { + struct block_device_mapping_image *p = &args->block_device_mappings[i]; + if (p != args->block_device_mappings) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(block_device_mapping_image_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->block_device_mappings_str) { + ARG_TO_JSON(BlockDeviceMappings, string, args->block_device_mappings_str); + ret += 1; + } + if (args->description) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Description\":", args->description); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->name) { + if (args->file_location) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Name\":", args->name); + ARG_TO_JSON_STR("\"FileLocation\":", args->file_location); ret += 1; } - if (args->new_name) { + if (args->image_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NewName\":", args->new_name); + ARG_TO_JSON_STR("\"ImageName\":", args->image_name); ret += 1; } - if (args->new_path) { + if (args->is_set_no_reboot) { + ARG_TO_JSON(NoReboot, bool, args->no_reboot); + ret += 1; + } + if (args->product_codes) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"ProductCodes\":[" )); + for (as = args->product_codes; *as; ++as) { + if (as != args->product_codes) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->product_codes_str) { + ARG_TO_JSON(ProductCodes, string, args->product_codes_str); + ret += 1; + } + if (args->root_device_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NewPath\":", args->new_path); + ARG_TO_JSON_STR("\"RootDeviceName\":", args->root_device_name); + ret += 1; + } + if (args->source_image_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SourceImageId\":", args->source_image_id); + ret += 1; + } + if (args->source_region_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SourceRegionName\":", args->source_region_name); + ret += 1; + } + if (args->vm_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VmId\":", args->vm_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateImage"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_server_certificate(struct osc_env *e, struct osc_str *out, struct osc_update_server_certificate_arg *args) +int osc_create_image(struct osc_env *e, struct osc_str *out, struct osc_create_image_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_server_certificate_data(args, &data); + r = create_image_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateServerCertificate"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_route_table_link_data(struct osc_update_route_table_link_arg *args, struct osc_str *data) +static int create_internet_service_data(struct osc_env *e, struct osc_create_internet_service_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->link_route_table_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LinkRouteTableId\":", args->link_route_table_id); - ret += 1; - } - if (args->route_table_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); - ret += 1; - } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateInternetService"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_route_table_link(struct osc_env *e, struct osc_str *out, struct osc_update_route_table_link_arg *args) +int osc_create_internet_service(struct osc_env *e, struct osc_str *out, struct osc_create_internet_service_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_route_table_link_data(args, &data); + r = create_internet_service_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateRouteTableLink"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_route_propagation_data(struct osc_update_route_propagation_arg *args, struct osc_str *data) +static int create_keypair_data(struct osc_env *e, struct osc_create_keypair_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->is_set_enable) { - ARG_TO_JSON(Enable, bool, args->enable); - ret += 1; - } - if (args->route_table_id) { + if (args->keypair_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); + ARG_TO_JSON_STR("\"KeypairName\":", args->keypair_name); ret += 1; } - if (args->virtual_gateway_id) { + if (args->public_key) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VirtualGatewayId\":", args->virtual_gateway_id); + ARG_TO_JSON_STR("\"PublicKey\":", args->public_key); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateKeypair"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_route_propagation(struct osc_env *e, struct osc_str *out, struct osc_update_route_propagation_arg *args) +int osc_create_keypair(struct osc_env *e, struct osc_str *out, struct osc_create_keypair_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_route_propagation_data(args, &data); + r = create_keypair_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateRoutePropagation"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_route_data(struct osc_update_route_arg *args, struct osc_str *data) +static int create_listener_rule_data(struct osc_env *e, struct osc_create_listener_rule_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->destination_ip_range) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DestinationIpRange\":", args->destination_ip_range); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->gateway_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"GatewayId\":", args->gateway_id); - ret += 1; - } - if (args->nat_service_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NatServiceId\":", args->nat_service_id); - ret += 1; - } - if (args->net_peering_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetPeeringId\":", args->net_peering_id); - ret += 1; - } - if (args->nic_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NicId\":", args->nic_id); - ret += 1; + if (args->listener_str) { + ARG_TO_JSON(Listener, string, args->listener_str); + ret += 1; + } else if (args->is_set_listener) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Listener\": { " )); + STRY(load_balancer_light_setter(&args->listener, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } - if (args->route_table_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); - ret += 1; + if (args->listener_rule_str) { + ARG_TO_JSON(ListenerRule, string, args->listener_rule_str); + ret += 1; + } else if (args->is_set_listener_rule) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"ListenerRule\": { " )); + STRY(listener_rule_for_creation_setter(&args->listener_rule, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } - if (args->vm_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmId\":", args->vm_id); - ret += 1; + if (args->vm_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"VmIds\":[" )); + for (as = args->vm_ids; *as; ++as) { + if (as != args->vm_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->vm_ids_str) { + ARG_TO_JSON(VmIds, string, args->vm_ids_str); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateListenerRule"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_route(struct osc_env *e, struct osc_str *out, struct osc_update_route_arg *args) +int osc_create_listener_rule(struct osc_env *e, struct osc_str *out, struct osc_create_listener_rule_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_route_data(args, &data); + r = create_listener_rule_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateRoute"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_nic_data(struct osc_update_nic_arg *args, struct osc_str *data) +static int create_load_balancer_listeners_data(struct osc_env *e, struct osc_create_load_balancer_listeners_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->description) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Description\":", args->description); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->link_nic_str) { - ARG_TO_JSON(LinkNic, string, args->link_nic_str); - ret += 1; - } else if (args->is_set_link_nic) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"LinkNic\": { " )); - STRY(link_nic_to_update_setter(&args->link_nic, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->nic_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NicId\":", args->nic_id); - ret += 1; - } - if (args->security_group_ids) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"SecurityGroupIds\":[" )); - for (as = args->security_group_ids; *as; ++as) { - if (as != args->security_group_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); + if (args->listeners) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Listeners\":[" )); + for (int i = 0; i < args->nb_listeners; ++i) { + struct listener_for_creation *p = &args->listeners[i]; + if (p != args->listeners) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(listener_for_creation_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->security_group_ids_str) { - ARG_TO_JSON(SecurityGroupIds, string, args->security_group_ids_str); + } else + if (args->listeners_str) { + ARG_TO_JSON(Listeners, string, args->listeners_str); ret += 1; } + if (args->load_balancer_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); + ret += 1; + } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateLoadBalancerListeners"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_nic(struct osc_env *e, struct osc_str *out, struct osc_update_nic_arg *args) +int osc_create_load_balancer_listeners(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_listeners_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_nic_data(args, &data); + r = create_load_balancer_listeners_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateNic"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_net_access_point_data(struct osc_update_net_access_point_arg *args, struct osc_str *data) +static int create_load_balancer_policy_data(struct osc_env *e, struct osc_create_load_balancer_policy_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; - osc_str_append_string(data, "{"); - if (args->add_route_table_ids) { - char **as; - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"AddRouteTableIds\":[" )); - for (as = args->add_route_table_ids; *as; ++as) { - if (as != args->add_route_table_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->add_route_table_ids_str) { - ARG_TO_JSON(AddRouteTableIds, string, args->add_route_table_ids_str); - ret += 1; + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->is_set_cookie_expiration_period || args->cookie_expiration_period) { + ARG_TO_JSON(CookieExpirationPeriod, int, args->cookie_expiration_period); + ret += 1; + } + if (args->cookie_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"CookieName\":", args->cookie_name); + ret += 1; } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->net_access_point_id) { + if (args->load_balancer_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetAccessPointId\":", args->net_access_point_id); + ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); ret += 1; } - if (args->remove_route_table_ids) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"RemoveRouteTableIds\":[" )); - for (as = args->remove_route_table_ids; *as; ++as) { - if (as != args->remove_route_table_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->remove_route_table_ids_str) { - ARG_TO_JSON(RemoveRouteTableIds, string, args->remove_route_table_ids_str); - ret += 1; + if (args->policy_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); + ret += 1; + } + if (args->policy_type) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyType\":", args->policy_type); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateLoadBalancerPolicy"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_net_access_point(struct osc_env *e, struct osc_str *out, struct osc_update_net_access_point_arg *args) +int osc_create_load_balancer_policy(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_policy_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_net_access_point_data(args, &data); + r = create_load_balancer_policy_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateNetAccessPoint"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_net_data(struct osc_update_net_arg *args, struct osc_str *data) +static int create_load_balancer_data(struct osc_env *e, struct osc_create_load_balancer_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->dhcp_options_set_id) { + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->listeners) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Listeners\":[" )); + for (int i = 0; i < args->nb_listeners; ++i) { + struct listener_for_creation *p = &args->listeners[i]; + if (p != args->listeners) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(listener_for_creation_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->listeners_str) { + ARG_TO_JSON(Listeners, string, args->listeners_str); + ret += 1; + } + if (args->load_balancer_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DhcpOptionsSetId\":", args->dhcp_options_set_id); + ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); ret += 1; } - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->load_balancer_type) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"LoadBalancerType\":", args->load_balancer_type); ret += 1; } - if (args->net_id) { + if (args->public_ip) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetId\":", args->net_id); + ARG_TO_JSON_STR("\"PublicIp\":", args->public_ip); ret += 1; } + if (args->security_groups) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"SecurityGroups\":[" )); + for (as = args->security_groups; *as; ++as) { + if (as != args->security_groups) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->security_groups_str) { + ARG_TO_JSON(SecurityGroups, string, args->security_groups_str); + ret += 1; + } + if (args->subnets) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Subnets\":[" )); + for (as = args->subnets; *as; ++as) { + if (as != args->subnets) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->subnets_str) { + ARG_TO_JSON(Subnets, string, args->subnets_str); + ret += 1; + } + if (args->subregion_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"SubregionNames\":[" )); + for (as = args->subregion_names; *as; ++as) { + if (as != args->subregion_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->subregion_names_str) { + ARG_TO_JSON(SubregionNames, string, args->subregion_names_str); + ret += 1; + } + if (args->tags) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Tags\":[" )); + for (int i = 0; i < args->nb_tags; ++i) { + struct resource_tag *p = &args->tags[i]; + if (p != args->tags) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(resource_tag_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->tags_str) { + ARG_TO_JSON(Tags, string, args->tags_str); + ret += 1; + } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateLoadBalancer"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_net(struct osc_env *e, struct osc_str *out, struct osc_update_net_arg *args) +int osc_create_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_net_data(args, &data); + r = create_load_balancer_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateNet"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_load_balancer_data(struct osc_update_load_balancer_arg *args, struct osc_str *data) +static int create_load_balancer_tags_data(struct osc_env *e, struct osc_create_load_balancer_tags_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->access_log_str) { - ARG_TO_JSON(AccessLog, string, args->access_log_str); - ret += 1; - } else if (args->is_set_access_log) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"AccessLog\": { " )); - STRY(access_log_setter(&args->access_log, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->health_check_str) { - ARG_TO_JSON(HealthCheck, string, args->health_check_str); - ret += 1; - } else if (args->is_set_health_check) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"HealthCheck\": { " )); - STRY(health_check_setter(&args->health_check, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->load_balancer_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); - ret += 1; - } - if (args->is_set_load_balancer_port || args->load_balancer_port) { - ARG_TO_JSON(LoadBalancerPort, int, args->load_balancer_port); - ret += 1; - } - if (args->policy_names) { + if (args->load_balancer_names) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"PolicyNames\":[" )); - for (as = args->policy_names; *as; ++as) { - if (as != args->policy_names) + STRY(osc_str_append_string(data, "\"LoadBalancerNames\":[" )); + for (as = args->load_balancer_names; *as; ++as) { + if (as != args->load_balancer_names) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->policy_names_str) { - ARG_TO_JSON(PolicyNames, string, args->policy_names_str); + } else if (args->load_balancer_names_str) { + ARG_TO_JSON(LoadBalancerNames, string, args->load_balancer_names_str); ret += 1; } - if (args->public_ip) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PublicIp\":", args->public_ip); - ret += 1; - } - if (args->is_set_secured_cookies) { - ARG_TO_JSON(SecuredCookies, bool, args->secured_cookies); - ret += 1; - } - if (args->security_groups) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"SecurityGroups\":[" )); - for (as = args->security_groups; *as; ++as) { - if (as != args->security_groups) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); + if (args->tags) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Tags\":[" )); + for (int i = 0; i < args->nb_tags; ++i) { + struct resource_tag *p = &args->tags[i]; + if (p != args->tags) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(resource_tag_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->security_groups_str) { - ARG_TO_JSON(SecurityGroups, string, args->security_groups_str); + } else + if (args->tags_str) { + ARG_TO_JSON(Tags, string, args->tags_str); ret += 1; } - if (args->server_certificate_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ServerCertificateId\":", args->server_certificate_id); - ret += 1; - } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateLoadBalancerTags"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_update_load_balancer_arg *args) +int osc_create_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_tags_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_load_balancer_data(args, &data); + r = create_load_balancer_tags_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateLoadBalancer"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_listener_rule_data(struct osc_update_listener_rule_arg *args, struct osc_str *data) +static int create_nat_service_data(struct osc_env *e, struct osc_create_nat_service_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->client_token) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ClientToken\":", args->client_token); ret += 1; } - if (args->host_pattern) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"HostPattern\":", args->host_pattern); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->listener_rule_name) { + if (args->public_ip_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ListenerRuleName\":", args->listener_rule_name); + ARG_TO_JSON_STR("\"PublicIpId\":", args->public_ip_id); ret += 1; } - if (args->path_pattern) { + if (args->subnet_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PathPattern\":", args->path_pattern); + ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateNatService"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_listener_rule(struct osc_env *e, struct osc_str *out, struct osc_update_listener_rule_arg *args) +int osc_create_nat_service(struct osc_env *e, struct osc_str *out, struct osc_create_nat_service_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_listener_rule_data(args, &data); + r = create_nat_service_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateListenerRule"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_image_data(struct osc_update_image_arg *args, struct osc_str *data) +static int create_net_access_point_data(struct osc_env *e, struct osc_create_net_access_point_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->description) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Description\":", args->description); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->image_id) { + if (args->net_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ImageId\":", args->image_id); + ARG_TO_JSON_STR("\"NetId\":", args->net_id); ret += 1; } - if (args->permissions_to_launch_str) { - ARG_TO_JSON(PermissionsToLaunch, string, args->permissions_to_launch_str); + if (args->route_table_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"RouteTableIds\":[" )); + for (as = args->route_table_ids; *as; ++as) { + if (as != args->route_table_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->is_set_permissions_to_launch) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"PermissionsToLaunch\": { " )); - STRY(permissions_on_resource_creation_setter(&args->permissions_to_launch, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + } else if (args->route_table_ids_str) { + ARG_TO_JSON(RouteTableIds, string, args->route_table_ids_str); + ret += 1; + } + if (args->service_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ServiceName\":", args->service_name); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateNetAccessPoint"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_image(struct osc_env *e, struct osc_str *out, struct osc_update_image_arg *args) +int osc_create_net_access_point(struct osc_env *e, struct osc_str *out, struct osc_create_net_access_point_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_image_data(args, &data); + r = create_net_access_point_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateImage"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_flexible_gpu_data(struct osc_update_flexible_gpu_arg *args, struct osc_str *data) +static int create_net_peering_data(struct osc_env *e, struct osc_create_net_peering_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_delete_on_vm_deletion) { - ARG_TO_JSON(DeleteOnVmDeletion, bool, args->delete_on_vm_deletion); + if (args->accepter_net_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"AccepterNetId\":", args->accepter_net_id); + ret += 1; + } + if (args->accepter_owner_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"AccepterOwnerId\":", args->accepter_owner_id); ret += 1; } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->flexible_gpu_id) { + if (args->source_net_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"FlexibleGpuId\":", args->flexible_gpu_id); + ARG_TO_JSON_STR("\"SourceNetId\":", args->source_net_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateNetPeering"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_update_flexible_gpu_arg *args) +int osc_create_net_peering(struct osc_env *e, struct osc_str *out, struct osc_create_net_peering_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_flexible_gpu_data(args, &data); + r = create_net_peering_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateFlexibleGpu"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_direct_link_interface_data(struct osc_update_direct_link_interface_arg *args, struct osc_str *data) +static int create_net_data(struct osc_env *e, struct osc_create_net_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->direct_link_interface_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DirectLinkInterfaceId\":", args->direct_link_interface_id); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->is_set_mtu || args->mtu) { - ARG_TO_JSON(Mtu, int, args->mtu); + if (args->ip_range) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"IpRange\":", args->ip_range); + ret += 1; + } + if (args->tenancy) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Tenancy\":", args->tenancy); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateNet"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_direct_link_interface(struct osc_env *e, struct osc_str *out, struct osc_update_direct_link_interface_arg *args) +int osc_create_net(struct osc_env *e, struct osc_str *out, struct osc_create_net_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_direct_link_interface_data(args, &data); + r = create_net_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateDirectLinkInterface"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_dedicated_group_data(struct osc_update_dedicated_group_arg *args, struct osc_str *data) +static int create_nic_data(struct osc_env *e, struct osc_create_nic_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->dedicated_group_id) { + if (args->description) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DedicatedGroupId\":", args->dedicated_group_id); + ARG_TO_JSON_STR("\"Description\":", args->description); ret += 1; } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->name) { + if (args->private_ips) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"PrivateIps\":[" )); + for (int i = 0; i < args->nb_private_ips; ++i) { + struct private_ip_light *p = &args->private_ips[i]; + if (p != args->private_ips) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(private_ip_light_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->private_ips_str) { + ARG_TO_JSON(PrivateIps, string, args->private_ips_str); + ret += 1; + } + if (args->security_group_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"SecurityGroupIds\":[" )); + for (as = args->security_group_ids; *as; ++as) { + if (as != args->security_group_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->security_group_ids_str) { + ARG_TO_JSON(SecurityGroupIds, string, args->security_group_ids_str); + ret += 1; + } + if (args->subnet_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Name\":", args->name); + ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateNic"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_update_dedicated_group_arg *args) +int osc_create_nic(struct osc_env *e, struct osc_str *out, struct osc_create_nic_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_dedicated_group_data(args, &data); + r = create_nic_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateDedicatedGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_ca_data(struct osc_update_ca_arg *args, struct osc_str *data) +static int create_policy_data(struct osc_env *e, struct osc_create_policy_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->ca_id) { + if (args->description) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"CaId\":", args->ca_id); + ARG_TO_JSON_STR("\"Description\":", args->description); ret += 1; } - if (args->description) { + if (args->document) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Document\":", args->document); + ret += 1; + } + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->path) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Description\":", args->description); + ARG_TO_JSON_STR("\"Path\":", args->path); ret += 1; } - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->policy_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreatePolicy"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_ca(struct osc_env *e, struct osc_str *out, struct osc_update_ca_arg *args) +int osc_create_policy(struct osc_env *e, struct osc_str *out, struct osc_create_policy_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_ca_data(args, &data); + r = create_policy_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateCa"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_api_access_rule_data(struct osc_update_api_access_rule_arg *args, struct osc_str *data) +static int create_policy_version_data(struct osc_env *e, struct osc_create_policy_version_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->api_access_rule_id) { + if (args->document) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ApiAccessRuleId\":", args->api_access_rule_id); + ARG_TO_JSON_STR("\"Document\":", args->document); ret += 1; } - if (args->ca_ids) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"CaIds\":[" )); - for (as = args->ca_ids; *as; ++as) { - if (as != args->ca_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->ca_ids_str) { - ARG_TO_JSON(CaIds, string, args->ca_ids_str); - ret += 1; - } - if (args->cns) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Cns\":[" )); - for (as = args->cns; *as; ++as) { - if (as != args->cns) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->cns_str) { - ARG_TO_JSON(Cns, string, args->cns_str); - ret += 1; - } - if (args->description) { + if (args->policy_orn) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Description\":", args->description); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); ret += 1; } - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->is_set_set_as_default) { + ARG_TO_JSON(SetAsDefault, bool, args->set_as_default); ret += 1; } - if (args->ip_ranges) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"IpRanges\":[" )); - for (as = args->ip_ranges; *as; ++as) { - if (as != args->ip_ranges) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->ip_ranges_str) { - ARG_TO_JSON(IpRanges, string, args->ip_ranges_str); - ret += 1; - } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreatePolicyVersion"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_api_access_rule(struct osc_env *e, struct osc_str *out, struct osc_update_api_access_rule_arg *args) +int osc_create_policy_version(struct osc_env *e, struct osc_str *out, struct osc_create_policy_version_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_api_access_rule_data(args, &data); + r = create_policy_version_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateApiAccessRule"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_api_access_policy_data(struct osc_update_api_access_policy_arg *args, struct osc_str *data) +static int create_product_type_data(struct osc_env *e, struct osc_create_product_type_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->description) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Description\":", args->description); ret += 1; } - if (args->is_set_max_access_key_expiration_seconds || args->max_access_key_expiration_seconds) { - ARG_TO_JSON(MaxAccessKeyExpirationSeconds, int, args->max_access_key_expiration_seconds); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->is_set_require_trusted_env) { - ARG_TO_JSON(RequireTrustedEnv, bool, args->require_trusted_env); + if (args->vendor) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Vendor\":", args->vendor); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateProductType"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_api_access_policy(struct osc_env *e, struct osc_str *out, struct osc_update_api_access_policy_arg *args) +int osc_create_product_type(struct osc_env *e, struct osc_str *out, struct osc_create_product_type_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_api_access_policy_data(args, &data); + r = create_product_type_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateApiAccessPolicy"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_account_data(struct osc_update_account_arg *args, struct osc_str *data) +static int create_public_ip_data(struct osc_env *e, struct osc_create_public_ip_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; - osc_str_append_string(data, "{"); - if (args->additional_emails) { - char **as; - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"AdditionalEmails\":[" )); - for (as = args->additional_emails; *as; ++as) { - if (as != args->additional_emails) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->additional_emails_str) { - ARG_TO_JSON(AdditionalEmails, string, args->additional_emails_str); - ret += 1; - } - if (args->city) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"City\":", args->city); - ret += 1; - } - if (args->company_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"CompanyName\":", args->company_name); - ret += 1; - } - if (args->country) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Country\":", args->country); - ret += 1; - } + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->email) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Email\":", args->email); - ret += 1; - } - if (args->first_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"FirstName\":", args->first_name); - ret += 1; - } - if (args->job_title) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"JobTitle\":", args->job_title); - ret += 1; - } - if (args->last_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LastName\":", args->last_name); - ret += 1; - } - if (args->mobile_number) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"MobileNumber\":", args->mobile_number); - ret += 1; - } - if (args->phone_number) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PhoneNumber\":", args->phone_number); - ret += 1; - } - if (args->state_province) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"StateProvince\":", args->state_province); - ret += 1; - } - if (args->vat_number) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VatNumber\":", args->vat_number); - ret += 1; - } - if (args->zip_code) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ZipCode\":", args->zip_code); - ret += 1; - } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreatePublicIp"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_account(struct osc_env *e, struct osc_str *out, struct osc_update_account_arg *args) +int osc_create_public_ip(struct osc_env *e, struct osc_str *out, struct osc_create_public_ip_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_account_data(args, &data); + r = create_public_ip_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateAccount"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int update_access_key_data(struct osc_update_access_key_arg *args, struct osc_str *data) +static int create_route_data(struct osc_env *e, struct osc_create_route_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->access_key_id) { + if (args->destination_ip_range) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"AccessKeyId\":", args->access_key_id); + ARG_TO_JSON_STR("\"DestinationIpRange\":", args->destination_ip_range); ret += 1; } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->expiration_date) { + if (args->gateway_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ExpirationDate\":", args->expiration_date); + ARG_TO_JSON_STR("\"GatewayId\":", args->gateway_id); ret += 1; } - if (args->state) { + if (args->nat_service_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"State\":", args->state); + ARG_TO_JSON_STR("\"NatServiceId\":", args->nat_service_id); ret += 1; } - if (args->user_name) { + if (args->net_peering_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ARG_TO_JSON_STR("\"NetPeeringId\":", args->net_peering_id); + ret += 1; + } + if (args->nic_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NicId\":", args->nic_id); + ret += 1; + } + if (args->route_table_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); + ret += 1; + } + if (args->vm_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VmId\":", args->vm_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateRoute"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_update_access_key(struct osc_env *e, struct osc_str *out, struct osc_update_access_key_arg *args) +int osc_create_route(struct osc_env *e, struct osc_str *out, struct osc_create_route_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = update_access_key_data(args, &data); + r = create_route_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UpdateAccessKey"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int unlink_volume_data(struct osc_unlink_volume_arg *args, struct osc_str *data) +static int create_route_table_data(struct osc_env *e, struct osc_create_route_table_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->is_set_force_unlink) { - ARG_TO_JSON(ForceUnlink, bool, args->force_unlink); - ret += 1; - } - if (args->volume_id) { + if (args->net_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VolumeId\":", args->volume_id); + ARG_TO_JSON_STR("\"NetId\":", args->net_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateRouteTable"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_unlink_volume(struct osc_env *e, struct osc_str *out, struct osc_unlink_volume_arg *args) +int osc_create_route_table(struct osc_env *e, struct osc_str *out, struct osc_create_route_table_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = unlink_volume_data(args, &data); + r = create_route_table_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UnlinkVolume"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int unlink_virtual_gateway_data(struct osc_unlink_virtual_gateway_arg *args, struct osc_str *data) +static int create_security_group_data(struct osc_env *e, struct osc_create_security_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->description) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Description\":", args->description); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; @@ -18244,4709 +18701,4736 @@ static int unlink_virtual_gateway_data(struct osc_unlink_virtual_gateway_arg *a ARG_TO_JSON_STR("\"NetId\":", args->net_id); ret += 1; } - if (args->virtual_gateway_id) { + if (args->security_group_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VirtualGatewayId\":", args->virtual_gateway_id); + ARG_TO_JSON_STR("\"SecurityGroupName\":", args->security_group_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateSecurityGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_unlink_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_unlink_virtual_gateway_arg *args) +int osc_create_security_group(struct osc_env *e, struct osc_str *out, struct osc_create_security_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = unlink_virtual_gateway_data(args, &data); + r = create_security_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UnlinkVirtualGateway"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int unlink_route_table_data(struct osc_unlink_route_table_arg *args, struct osc_str *data) +static int create_security_group_rule_data(struct osc_env *e, struct osc_create_security_group_rule_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->link_route_table_id) { + if (args->flow) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LinkRouteTableId\":", args->link_route_table_id); + ARG_TO_JSON_STR("\"Flow\":", args->flow); + ret += 1; + } + if (args->is_set_from_port_range || args->from_port_range) { + ARG_TO_JSON(FromPortRange, int, args->from_port_range); + ret += 1; + } + if (args->ip_protocol) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"IpProtocol\":", args->ip_protocol); + ret += 1; + } + if (args->ip_range) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"IpRange\":", args->ip_range); + ret += 1; + } + if (args->rules) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Rules\":[" )); + for (int i = 0; i < args->nb_rules; ++i) { + struct security_group_rule *p = &args->rules[i]; + if (p != args->rules) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(security_group_rule_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->rules_str) { + ARG_TO_JSON(Rules, string, args->rules_str); + ret += 1; + } + if (args->security_group_account_id_to_link) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SecurityGroupAccountIdToLink\":", args->security_group_account_id_to_link); + ret += 1; + } + if (args->security_group_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SecurityGroupId\":", args->security_group_id); + ret += 1; + } + if (args->security_group_name_to_link) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SecurityGroupNameToLink\":", args->security_group_name_to_link); + ret += 1; + } + if (args->is_set_to_port_range || args->to_port_range) { + ARG_TO_JSON(ToPortRange, int, args->to_port_range); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateSecurityGroupRule"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_unlink_route_table(struct osc_env *e, struct osc_str *out, struct osc_unlink_route_table_arg *args) +int osc_create_security_group_rule(struct osc_env *e, struct osc_str *out, struct osc_create_security_group_rule_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = unlink_route_table_data(args, &data); + r = create_security_group_rule_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UnlinkRouteTable"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int unlink_public_ip_data(struct osc_unlink_public_ip_arg *args, struct osc_str *data) +static int create_server_certificate_data(struct osc_env *e, struct osc_create_server_certificate_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->body) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Body\":", args->body); + ret += 1; + } + if (args->chain) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Chain\":", args->chain); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->link_public_ip_id) { + if (args->name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LinkPublicIpId\":", args->link_public_ip_id); + ARG_TO_JSON_STR("\"Name\":", args->name); ret += 1; } - if (args->public_ip) { + if (args->path) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PublicIp\":", args->public_ip); + ARG_TO_JSON_STR("\"Path\":", args->path); + ret += 1; + } + if (args->private_key) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PrivateKey\":", args->private_key); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateServerCertificate"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_unlink_public_ip(struct osc_env *e, struct osc_str *out, struct osc_unlink_public_ip_arg *args) +int osc_create_server_certificate(struct osc_env *e, struct osc_str *out, struct osc_create_server_certificate_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = unlink_public_ip_data(args, &data); + r = create_server_certificate_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UnlinkPublicIp"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int unlink_private_ips_data(struct osc_unlink_private_ips_arg *args, struct osc_str *data) +static int create_snapshot_export_task_data(struct osc_env *e, struct osc_create_snapshot_export_task_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->nic_id) { + if (args->osu_export_str) { + ARG_TO_JSON(OsuExport, string, args->osu_export_str); + ret += 1; + } else if (args->is_set_osu_export) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"OsuExport\": { " )); + STRY(osu_export_to_create_setter(&args->osu_export, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->snapshot_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NicId\":", args->nic_id); + ARG_TO_JSON_STR("\"SnapshotId\":", args->snapshot_id); ret += 1; } - if (args->private_ips) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"PrivateIps\":[" )); - for (as = args->private_ips; *as; ++as) { - if (as != args->private_ips) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->private_ips_str) { - ARG_TO_JSON(PrivateIps, string, args->private_ips_str); - ret += 1; - } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateSnapshotExportTask"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_unlink_private_ips(struct osc_env *e, struct osc_str *out, struct osc_unlink_private_ips_arg *args) +int osc_create_snapshot_export_task(struct osc_env *e, struct osc_str *out, struct osc_create_snapshot_export_task_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = unlink_private_ips_data(args, &data); + r = create_snapshot_export_task_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UnlinkPrivateIps"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int unlink_policy_data(struct osc_unlink_policy_arg *args, struct osc_str *data) +static int create_snapshot_data(struct osc_env *e, struct osc_create_snapshot_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->description) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Description\":", args->description); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->policy_orn) { + if (args->file_location) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + ARG_TO_JSON_STR("\"FileLocation\":", args->file_location); ret += 1; } - if (args->user_name) { + if (args->is_set_snapshot_size || args->snapshot_size) { + ARG_TO_JSON(SnapshotSize, int, args->snapshot_size); + ret += 1; + } + if (args->source_region_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ARG_TO_JSON_STR("\"SourceRegionName\":", args->source_region_name); + ret += 1; + } + if (args->source_snapshot_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SourceSnapshotId\":", args->source_snapshot_id); + ret += 1; + } + if (args->volume_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VolumeId\":", args->volume_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateSnapshot"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_unlink_policy(struct osc_env *e, struct osc_str *out, struct osc_unlink_policy_arg *args) +int osc_create_snapshot(struct osc_env *e, struct osc_str *out, struct osc_create_snapshot_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = unlink_policy_data(args, &data); + r = create_snapshot_data(e, args, &data); if (r < 0) goto out; - - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UnlinkPolicy"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int unlink_nic_data(struct osc_unlink_nic_arg *args, struct osc_str *data) +static int create_subnet_data(struct osc_env *e, struct osc_create_subnet_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->link_nic_id) { + if (args->ip_range) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LinkNicId\":", args->link_nic_id); + ARG_TO_JSON_STR("\"IpRange\":", args->ip_range); + ret += 1; + } + if (args->net_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NetId\":", args->net_id); + ret += 1; + } + if (args->subregion_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SubregionName\":", args->subregion_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateSubnet"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_unlink_nic(struct osc_env *e, struct osc_str *out, struct osc_unlink_nic_arg *args) +int osc_create_subnet(struct osc_env *e, struct osc_str *out, struct osc_create_subnet_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = unlink_nic_data(args, &data); + r = create_subnet_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UnlinkNic"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int unlink_managed_policy_from_user_group_data(struct osc_unlink_managed_policy_from_user_group_arg *args, struct osc_str *data) +static int create_tags_data(struct osc_env *e, struct osc_create_tags_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->policy_orn) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); - ret += 1; + if (args->resource_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"ResourceIds\":[" )); + for (as = args->resource_ids; *as; ++as) { + if (as != args->resource_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->resource_ids_str) { + ARG_TO_JSON(ResourceIds, string, args->resource_ids_str); + ret += 1; } - if (args->user_group_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); - ret += 1; + if (args->tags) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Tags\":[" )); + for (int i = 0; i < args->nb_tags; ++i) { + struct resource_tag *p = &args->tags[i]; + if (p != args->tags) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(resource_tag_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->tags_str) { + ARG_TO_JSON(Tags, string, args->tags_str); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateTags"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_unlink_managed_policy_from_user_group(struct osc_env *e, struct osc_str *out, struct osc_unlink_managed_policy_from_user_group_arg *args) +int osc_create_tags(struct osc_env *e, struct osc_str *out, struct osc_create_tags_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = unlink_managed_policy_from_user_group_data(args, &data); + r = create_tags_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UnlinkManagedPolicyFromUserGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int unlink_load_balancer_backend_machines_data(struct osc_unlink_load_balancer_backend_machines_arg *args, struct osc_str *data) +static int create_user_group_data(struct osc_env *e, struct osc_create_user_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; - osc_str_append_string(data, "{"); - if (args->backend_ips) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"BackendIps\":[" )); - for (as = args->backend_ips; *as; ++as) { - if (as != args->backend_ips) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->backend_ips_str) { - ARG_TO_JSON(BackendIps, string, args->backend_ips_str); - ret += 1; - } - if (args->backend_vm_ids) { - char **as; - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"BackendVmIds\":[" )); - for (as = args->backend_vm_ids; *as; ++as) { - if (as != args->backend_vm_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->backend_vm_ids_str) { - ARG_TO_JSON(BackendVmIds, string, args->backend_vm_ids_str); - ret += 1; - } + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->load_balancer_name) { + if (args->path) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); + ARG_TO_JSON_STR("\"Path\":", args->path); + ret += 1; + } + if (args->user_group_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateUserGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_unlink_load_balancer_backend_machines(struct osc_env *e, struct osc_str *out, struct osc_unlink_load_balancer_backend_machines_arg *args) +int osc_create_user_group(struct osc_env *e, struct osc_str *out, struct osc_create_user_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = unlink_load_balancer_backend_machines_data(args, &data); + r = create_user_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UnlinkLoadBalancerBackendMachines"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int unlink_internet_service_data(struct osc_unlink_internet_service_arg *args, struct osc_str *data) +static int create_user_data(struct osc_env *e, struct osc_create_user_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->internet_service_id) { + if (args->path) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"InternetServiceId\":", args->internet_service_id); + ARG_TO_JSON_STR("\"Path\":", args->path); ret += 1; } - if (args->net_id) { + if (args->user_email) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetId\":", args->net_id); + ARG_TO_JSON_STR("\"UserEmail\":", args->user_email); + ret += 1; + } + if (args->user_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateUser"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_unlink_internet_service(struct osc_env *e, struct osc_str *out, struct osc_unlink_internet_service_arg *args) +int osc_create_user(struct osc_env *e, struct osc_str *out, struct osc_create_user_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = unlink_internet_service_data(args, &data); + r = create_user_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UnlinkInternetService"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int unlink_flexible_gpu_data(struct osc_unlink_flexible_gpu_arg *args, struct osc_str *data) +static int create_virtual_gateway_data(struct osc_env *e, struct osc_create_virtual_gateway_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->connection_type) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ConnectionType\":", args->connection_type); ret += 1; } - if (args->flexible_gpu_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"FlexibleGpuId\":", args->flexible_gpu_id); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateVirtualGateway"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_unlink_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_unlink_flexible_gpu_arg *args) +int osc_create_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_create_virtual_gateway_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = unlink_flexible_gpu_data(args, &data); + r = create_virtual_gateway_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/UnlinkFlexibleGpu"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int stop_vms_data(struct osc_stop_vms_arg *args, struct osc_str *data) +static int create_vm_group_data(struct osc_env *e, struct osc_create_vm_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->description) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Description\":", args->description); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->is_set_force_stop) { - ARG_TO_JSON(ForceStop, bool, args->force_stop); + if (args->positioning_strategy) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PositioningStrategy\":", args->positioning_strategy); ret += 1; } - if (args->vm_ids) { + if (args->security_group_ids) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"VmIds\":[" )); - for (as = args->vm_ids; *as; ++as) { - if (as != args->vm_ids) + STRY(osc_str_append_string(data, "\"SecurityGroupIds\":[" )); + for (as = args->security_group_ids; *as; ++as) { + if (as != args->security_group_ids) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->vm_ids_str) { - ARG_TO_JSON(VmIds, string, args->vm_ids_str); + } else if (args->security_group_ids_str) { + ARG_TO_JSON(SecurityGroupIds, string, args->security_group_ids_str); + ret += 1; + } + if (args->subnet_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); + ret += 1; + } + if (args->tags) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Tags\":[" )); + for (int i = 0; i < args->nb_tags; ++i) { + struct resource_tag *p = &args->tags[i]; + if (p != args->tags) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(resource_tag_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->tags_str) { + ARG_TO_JSON(Tags, string, args->tags_str); ret += 1; } + if (args->is_set_vm_count || args->vm_count) { + ARG_TO_JSON(VmCount, int, args->vm_count); + ret += 1; + } + if (args->vm_group_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VmGroupName\":", args->vm_group_name); + ret += 1; + } + if (args->vm_template_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VmTemplateId\":", args->vm_template_id); + ret += 1; + } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateVmGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_stop_vms(struct osc_env *e, struct osc_str *out, struct osc_stop_vms_arg *args) +int osc_create_vm_group(struct osc_env *e, struct osc_str *out, struct osc_create_vm_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = stop_vms_data(args, &data); + r = create_vm_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/StopVms"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int start_vms_data(struct osc_start_vms_arg *args, struct osc_str *data) +static int create_vm_template_data(struct osc_env *e, struct osc_create_vm_template_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->is_set_cpu_cores || args->cpu_cores) { + ARG_TO_JSON(CpuCores, int, args->cpu_cores); + ret += 1; + } + if (args->cpu_generation) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"CpuGeneration\":", args->cpu_generation); + ret += 1; + } + if (args->cpu_performance) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"CpuPerformance\":", args->cpu_performance); + ret += 1; + } + if (args->description) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Description\":", args->description); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->vm_ids) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"VmIds\":[" )); - for (as = args->vm_ids; *as; ++as) { - if (as != args->vm_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); + if (args->image_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ImageId\":", args->image_id); + ret += 1; + } + if (args->keypair_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"KeypairName\":", args->keypair_name); + ret += 1; + } + if (args->is_set_ram || args->ram) { + ARG_TO_JSON(Ram, int, args->ram); + ret += 1; + } + if (args->tags) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Tags\":[" )); + for (int i = 0; i < args->nb_tags; ++i) { + struct resource_tag *p = &args->tags[i]; + if (p != args->tags) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(resource_tag_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->vm_ids_str) { - ARG_TO_JSON(VmIds, string, args->vm_ids_str); + } else + if (args->tags_str) { + ARG_TO_JSON(Tags, string, args->tags_str); ret += 1; } + if (args->vm_template_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VmTemplateName\":", args->vm_template_name); + ret += 1; + } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateVmTemplate"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_start_vms(struct osc_env *e, struct osc_str *out, struct osc_start_vms_arg *args) +int osc_create_vm_template(struct osc_env *e, struct osc_str *out, struct osc_create_vm_template_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = start_vms_data(args, &data); + r = create_vm_template_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/StartVms"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int set_default_policy_version_data(struct osc_set_default_policy_version_arg *args, struct osc_str *data) +static int create_vms_data(struct osc_env *e, struct osc_create_vms_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->policy_orn) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + if (args->block_device_mappings) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"BlockDeviceMappings\":[" )); + for (int i = 0; i < args->nb_block_device_mappings; ++i) { + struct block_device_mapping_vm_creation *p = &args->block_device_mappings[i]; + if (p != args->block_device_mappings) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(block_device_mapping_vm_creation_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->block_device_mappings_str) { + ARG_TO_JSON(BlockDeviceMappings, string, args->block_device_mappings_str); + ret += 1; + } + if (args->is_set_boot_on_creation) { + ARG_TO_JSON(BootOnCreation, bool, args->boot_on_creation); ret += 1; } - if (args->version_id) { + if (args->is_set_bsu_optimized) { + ARG_TO_JSON(BsuOptimized, bool, args->bsu_optimized); + ret += 1; + } + if (args->client_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VersionId\":", args->version_id); + ARG_TO_JSON_STR("\"ClientToken\":", args->client_token); ret += 1; } - osc_str_append_string(data, "}"); - return !!ret; -} - -int osc_set_default_policy_version(struct osc_env *e, struct osc_str *out, struct osc_set_default_policy_version_arg *args) -{ - CURLcode res = CURLE_OUT_OF_MEMORY; - struct osc_str data; - struct osc_str end_call; - int r; - - osc_init_str(&data); - osc_init_str(&end_call); - r = set_default_policy_version_data(args, &data); - if (r < 0) - goto out; - - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/SetDefaultPolicyVersion"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); - curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); - if (e->flag & OSC_VERBOSE_MODE) { - printf("\n%s\n\n", data.buf); + if (args->is_set_deletion_protection) { + ARG_TO_JSON(DeletionProtection, bool, args->deletion_protection); + ret += 1; } - res = curl_easy_perform(e->c); -out: - osc_deinit_str(&end_call); - osc_deinit_str(&data); - return res; -} -static int scale_up_vm_group_data(struct osc_scale_up_vm_group_arg *args, struct osc_str *data) -{ - int ret = 0; - int count_args = 0; - - if (!args) - return 0; - osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->is_set_vm_addition || args->vm_addition) { - ARG_TO_JSON(VmAddition, int, args->vm_addition); - ret += 1; + if (args->image_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ImageId\":", args->image_id); + ret += 1; + } + if (args->keypair_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"KeypairName\":", args->keypair_name); + ret += 1; + } + if (args->is_set_max_vms_count || args->max_vms_count) { + ARG_TO_JSON(MaxVmsCount, int, args->max_vms_count); + ret += 1; + } + if (args->is_set_min_vms_count || args->min_vms_count) { + ARG_TO_JSON(MinVmsCount, int, args->min_vms_count); + ret += 1; + } + if (args->is_set_nested_virtualization) { + ARG_TO_JSON(NestedVirtualization, bool, args->nested_virtualization); + ret += 1; + } + if (args->nics) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Nics\":[" )); + for (int i = 0; i < args->nb_nics; ++i) { + struct nic_for_vm_creation *p = &args->nics[i]; + if (p != args->nics) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(nic_for_vm_creation_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->nics_str) { + ARG_TO_JSON(Nics, string, args->nics_str); + ret += 1; + } + if (args->performance) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Performance\":", args->performance); + ret += 1; + } + if (args->placement_str) { + ARG_TO_JSON(Placement, string, args->placement_str); + ret += 1; + } else if (args->is_set_placement) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Placement\": { " )); + STRY(placement_setter(&args->placement, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->private_ips) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"PrivateIps\":[" )); + for (as = args->private_ips; *as; ++as) { + if (as != args->private_ips) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->private_ips_str) { + ARG_TO_JSON(PrivateIps, string, args->private_ips_str); + ret += 1; + } + if (args->security_group_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"SecurityGroupIds\":[" )); + for (as = args->security_group_ids; *as; ++as) { + if (as != args->security_group_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->security_group_ids_str) { + ARG_TO_JSON(SecurityGroupIds, string, args->security_group_ids_str); + ret += 1; + } + if (args->security_groups) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"SecurityGroups\":[" )); + for (as = args->security_groups; *as; ++as) { + if (as != args->security_groups) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->security_groups_str) { + ARG_TO_JSON(SecurityGroups, string, args->security_groups_str); + ret += 1; } - if (args->vm_group_id) { + if (args->subnet_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmGroupId\":", args->vm_group_id); + ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); ret += 1; } - osc_str_append_string(data, "}"); - return !!ret; -} - -int osc_scale_up_vm_group(struct osc_env *e, struct osc_str *out, struct osc_scale_up_vm_group_arg *args) -{ - CURLcode res = CURLE_OUT_OF_MEMORY; - struct osc_str data; - struct osc_str end_call; - int r; - - osc_init_str(&data); - osc_init_str(&end_call); - r = scale_up_vm_group_data(args, &data); - if (r < 0) - goto out; - - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ScaleUpVmGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); - curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); - if (e->flag & OSC_VERBOSE_MODE) { - printf("\n%s\n\n", data.buf); - } - res = curl_easy_perform(e->c); -out: - osc_deinit_str(&end_call); - osc_deinit_str(&data); - return res; -} -static int scale_down_vm_group_data(struct osc_scale_down_vm_group_arg *args, struct osc_str *data) -{ - int ret = 0; - int count_args = 0; - - if (!args) - return 0; - osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->user_data) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserData\":", args->user_data); ret += 1; } - if (args->vm_group_id) { + if (args->vm_initiated_shutdown_behavior) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmGroupId\":", args->vm_group_id); + ARG_TO_JSON_STR("\"VmInitiatedShutdownBehavior\":", args->vm_initiated_shutdown_behavior); ret += 1; } - if (args->is_set_vm_subtraction || args->vm_subtraction) { - ARG_TO_JSON(VmSubtraction, int, args->vm_subtraction); + if (args->vm_type) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VmType\":", args->vm_type); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateVms"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_scale_down_vm_group(struct osc_env *e, struct osc_str *out, struct osc_scale_down_vm_group_arg *args) +int osc_create_vms(struct osc_env *e, struct osc_str *out, struct osc_create_vms_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = scale_down_vm_group_data(args, &data); + r = create_vms_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ScaleDownVmGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int remove_user_from_user_group_data(struct osc_remove_user_from_user_group_arg *args, struct osc_str *data) +static int create_volume_data(struct osc_env *e, struct osc_create_volume_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->user_group_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); + if (args->is_set_iops || args->iops) { + ARG_TO_JSON(Iops, int, args->iops); ret += 1; } - if (args->user_group_path) { + if (args->is_set_size || args->size) { + ARG_TO_JSON(Size, int, args->size); + ret += 1; + } + if (args->snapshot_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupPath\":", args->user_group_path); + ARG_TO_JSON_STR("\"SnapshotId\":", args->snapshot_id); ret += 1; } - if (args->user_name) { + if (args->subregion_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ARG_TO_JSON_STR("\"SubregionName\":", args->subregion_name); ret += 1; } - if (args->user_path) { + if (args->volume_type) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserPath\":", args->user_path); + ARG_TO_JSON_STR("\"VolumeType\":", args->volume_type); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateVolume"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_remove_user_from_user_group(struct osc_env *e, struct osc_str *out, struct osc_remove_user_from_user_group_arg *args) +int osc_create_volume(struct osc_env *e, struct osc_str *out, struct osc_create_volume_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = remove_user_from_user_group_data(args, &data); + r = create_volume_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/RemoveUserFromUserGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int reject_net_peering_data(struct osc_reject_net_peering_arg *args, struct osc_str *data) +static int create_vpn_connection_data(struct osc_env *e, struct osc_create_vpn_connection_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->client_gateway_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ClientGatewayId\":", args->client_gateway_id); ret += 1; } - if (args->net_peering_id) { + if (args->connection_type) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetPeeringId\":", args->net_peering_id); + ARG_TO_JSON_STR("\"ConnectionType\":", args->connection_type); ret += 1; } - osc_str_append_string(data, "}"); - return !!ret; -} - -int osc_reject_net_peering(struct osc_env *e, struct osc_str *out, struct osc_reject_net_peering_arg *args) -{ - CURLcode res = CURLE_OUT_OF_MEMORY; - struct osc_str data; - struct osc_str end_call; - int r; - - osc_init_str(&data); - osc_init_str(&end_call); - r = reject_net_peering_data(args, &data); - if (r < 0) - goto out; - - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/RejectNetPeering"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); - curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); - if (e->flag & OSC_VERBOSE_MODE) { - printf("\n%s\n\n", data.buf); - } - res = curl_easy_perform(e->c); -out: - osc_deinit_str(&end_call); - osc_deinit_str(&data); - return res; -} -static int register_vms_in_load_balancer_data(struct osc_register_vms_in_load_balancer_arg *args, struct osc_str *data) -{ - int ret = 0; - int count_args = 0; - - if (!args) - return 0; - osc_str_append_string(data, "{"); - if (args->backend_vm_ids) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"BackendVmIds\":[" )); - for (as = args->backend_vm_ids; *as; ++as) { - if (as != args->backend_vm_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->backend_vm_ids_str) { - ARG_TO_JSON(BackendVmIds, string, args->backend_vm_ids_str); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->load_balancer_name) { + if (args->is_set_static_routes_only) { + ARG_TO_JSON(StaticRoutesOnly, bool, args->static_routes_only); + ret += 1; + } + if (args->virtual_gateway_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); + ARG_TO_JSON_STR("\"VirtualGatewayId\":", args->virtual_gateway_id); ret += 1; } osc_str_append_string(data, "}"); - return !!ret; -} - -int osc_register_vms_in_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_register_vms_in_load_balancer_arg *args) -{ - CURLcode res = CURLE_OUT_OF_MEMORY; - struct osc_str data; - struct osc_str end_call; - int r; - - osc_init_str(&data); - osc_init_str(&end_call); - r = register_vms_in_load_balancer_data(args, &data); - if (r < 0) - goto out; + osc_str_append_string(&end_call, "/api/v1/CreateVpnConnection"); - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/RegisterVmsInLoadBalancer"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); - curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); - if (e->flag & OSC_VERBOSE_MODE) { - printf("\n%s\n\n", data.buf); - } - res = curl_easy_perform(e->c); -out: osc_deinit_str(&end_call); - osc_deinit_str(&data); - return res; -} -static int reboot_vms_data(struct osc_reboot_vms_arg *args, struct osc_str *data) -{ - int ret = 0; - int count_args = 0; - - if (!args) - return 0; - osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->vm_ids) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"VmIds\":[" )); - for (as = args->vm_ids; *as; ++as) { - if (as != args->vm_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->vm_ids_str) { - ARG_TO_JSON(VmIds, string, args->vm_ids_str); - ret += 1; - } - osc_str_append_string(data, "}"); return !!ret; } -int osc_reboot_vms(struct osc_env *e, struct osc_str *out, struct osc_reboot_vms_arg *args) +int osc_create_vpn_connection(struct osc_env *e, struct osc_str *out, struct osc_create_vpn_connection_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = reboot_vms_data(args, &data); + r = create_vpn_connection_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/RebootVms"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_vpn_connections_data(struct osc_read_vpn_connections_arg *args, struct osc_str *data) +static int create_vpn_connection_route_data(struct osc_env *e, struct osc_create_vpn_connection_route_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->destination_ip_range) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"DestinationIpRange\":", args->destination_ip_range); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_vpn_connection_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->vpn_connection_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ARG_TO_JSON_STR("\"VpnConnectionId\":", args->vpn_connection_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/CreateVpnConnectionRoute"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_vpn_connections(struct osc_env *e, struct osc_str *out, struct osc_read_vpn_connections_arg *args) +int osc_create_vpn_connection_route(struct osc_env *e, struct osc_str *out, struct osc_create_vpn_connection_route_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_vpn_connections_data(args, &data); + r = create_vpn_connection_route_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadVpnConnections"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_volumes_data(struct osc_read_volumes_arg *args, struct osc_str *data) +static int delete_access_key_data(struct osc_env *e, struct osc_delete_access_key_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->access_key_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"AccessKeyId\":", args->access_key_id); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_volume_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->user_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteAccessKey"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_volumes(struct osc_env *e, struct osc_str *out, struct osc_read_volumes_arg *args) +int osc_delete_access_key(struct osc_env *e, struct osc_str *out, struct osc_delete_access_key_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_volumes_data(args, &data); + r = delete_access_key_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadVolumes"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_vms_state_data(struct osc_read_vms_state_arg *args, struct osc_str *data) +static int delete_api_access_rule_data(struct osc_env *e, struct osc_delete_api_access_rule_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_all_vms) { - ARG_TO_JSON(AllVms, bool, args->all_vms); + if (args->api_access_rule_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ApiAccessRuleId\":", args->api_access_rule_id); ret += 1; } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_vms_state_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); - ret += 1; - } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteApiAccessRule"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_vms_state(struct osc_env *e, struct osc_str *out, struct osc_read_vms_state_arg *args) +int osc_delete_api_access_rule(struct osc_env *e, struct osc_str *out, struct osc_delete_api_access_rule_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_vms_state_data(args, &data); + r = delete_api_access_rule_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadVmsState"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_vms_health_data(struct osc_read_vms_health_arg *args, struct osc_str *data) +static int delete_ca_data(struct osc_env *e, struct osc_delete_ca_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; - osc_str_append_string(data, "{"); - if (args->backend_vm_ids) { - char **as; - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"BackendVmIds\":[" )); - for (as = args->backend_vm_ids; *as; ++as) { - if (as != args->backend_vm_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->backend_vm_ids_str) { - ARG_TO_JSON(BackendVmIds, string, args->backend_vm_ids_str); - ret += 1; + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->ca_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"CaId\":", args->ca_id); + ret += 1; } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->load_balancer_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); - ret += 1; - } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteCa"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_vms_health(struct osc_env *e, struct osc_str *out, struct osc_read_vms_health_arg *args) +int osc_delete_ca(struct osc_env *e, struct osc_str *out, struct osc_delete_ca_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_vms_health_data(args, &data); + r = delete_ca_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadVmsHealth"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_vms_data(struct osc_read_vms_arg *args, struct osc_str *data) +static int delete_client_gateway_data(struct osc_env *e, struct osc_delete_client_gateway_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_vm_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->client_gateway_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ARG_TO_JSON_STR("\"ClientGatewayId\":", args->client_gateway_id); ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteClientGateway"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_vms(struct osc_env *e, struct osc_str *out, struct osc_read_vms_arg *args) +int osc_delete_client_gateway(struct osc_env *e, struct osc_str *out, struct osc_delete_client_gateway_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_vms_data(args, &data); + r = delete_client_gateway_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadVms"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_vm_types_data(struct osc_read_vm_types_arg *args, struct osc_str *data) +static int delete_dedicated_group_data(struct osc_env *e, struct osc_delete_dedicated_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->dedicated_group_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"DedicatedGroupId\":", args->dedicated_group_id); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_vm_type_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->is_set_force) { + ARG_TO_JSON(Force, bool, args->force); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteDedicatedGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_vm_types(struct osc_env *e, struct osc_str *out, struct osc_read_vm_types_arg *args) +int osc_delete_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_delete_dedicated_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_vm_types_data(args, &data); + r = delete_dedicated_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadVmTypes"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_vm_templates_data(struct osc_read_vm_templates_arg *args, struct osc_str *data) +static int delete_dhcp_options_data(struct osc_env *e, struct osc_delete_dhcp_options_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_vm_template_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + if (args->dhcp_options_set_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"DhcpOptionsSetId\":", args->dhcp_options_set_id); + ret += 1; + } + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteDhcpOptions"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_vm_templates(struct osc_env *e, struct osc_str *out, struct osc_read_vm_templates_arg *args) +int osc_delete_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_delete_dhcp_options_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_vm_templates_data(args, &data); + r = delete_dhcp_options_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadVmTemplates"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_vm_groups_data(struct osc_read_vm_groups_arg *args, struct osc_str *data) +static int delete_direct_link_interface_data(struct osc_env *e, struct osc_delete_direct_link_interface_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->direct_link_interface_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"DirectLinkInterfaceId\":", args->direct_link_interface_id); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_vm_group_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteDirectLinkInterface"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_vm_groups(struct osc_env *e, struct osc_str *out, struct osc_read_vm_groups_arg *args) +int osc_delete_direct_link_interface(struct osc_env *e, struct osc_str *out, struct osc_delete_direct_link_interface_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_vm_groups_data(args, &data); + r = delete_direct_link_interface_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadVmGroups"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_virtual_gateways_data(struct osc_read_virtual_gateways_arg *args, struct osc_str *data) +static int delete_direct_link_data(struct osc_env *e, struct osc_delete_direct_link_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_virtual_gateway_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->direct_link_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ARG_TO_JSON_STR("\"DirectLinkId\":", args->direct_link_id); ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteDirectLink"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_virtual_gateways(struct osc_env *e, struct osc_str *out, struct osc_read_virtual_gateways_arg *args) +int osc_delete_direct_link(struct osc_env *e, struct osc_str *out, struct osc_delete_direct_link_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_virtual_gateways_data(args, &data); + r = delete_direct_link_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadVirtualGateways"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_users_data(struct osc_read_users_arg *args, struct osc_str *data) +static int delete_export_task_data(struct osc_env *e, struct osc_delete_export_task_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_users_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->is_set_first_item || args->first_item) { - ARG_TO_JSON(FirstItem, int, args->first_item); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->export_task_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ExportTaskId\":", args->export_task_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteExportTask"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_users(struct osc_env *e, struct osc_str *out, struct osc_read_users_arg *args) +int osc_delete_export_task(struct osc_env *e, struct osc_str *out, struct osc_delete_export_task_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_users_data(args, &data); + r = delete_export_task_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadUsers"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_user_groups_per_user_data(struct osc_read_user_groups_per_user_arg *args, struct osc_str *data) +static int delete_flexible_gpu_data(struct osc_env *e, struct osc_delete_flexible_gpu_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->user_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserName\":", args->user_name); - ret += 1; - } - if (args->user_path) { + if (args->flexible_gpu_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserPath\":", args->user_path); + ARG_TO_JSON_STR("\"FlexibleGpuId\":", args->flexible_gpu_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteFlexibleGpu"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_user_groups_per_user(struct osc_env *e, struct osc_str *out, struct osc_read_user_groups_per_user_arg *args) +int osc_delete_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_delete_flexible_gpu_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_user_groups_per_user_data(args, &data); + r = delete_flexible_gpu_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadUserGroupsPerUser"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_user_groups_data(struct osc_read_user_groups_arg *args, struct osc_str *data) +static int delete_image_data(struct osc_env *e, struct osc_delete_image_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_user_group_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->is_set_first_item || args->first_item) { - ARG_TO_JSON(FirstItem, int, args->first_item); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->image_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ImageId\":", args->image_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteImage"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_user_groups(struct osc_env *e, struct osc_str *out, struct osc_read_user_groups_arg *args) +int osc_delete_image(struct osc_env *e, struct osc_str *out, struct osc_delete_image_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_user_groups_data(args, &data); + r = delete_image_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadUserGroups"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_user_group_policy_data(struct osc_read_user_group_policy_arg *args, struct osc_str *data) +static int delete_internet_service_data(struct osc_env *e, struct osc_delete_internet_service_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->policy_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); - ret += 1; - } - if (args->user_group_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); - ret += 1; - } - if (args->user_group_path) { + if (args->internet_service_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupPath\":", args->user_group_path); + ARG_TO_JSON_STR("\"InternetServiceId\":", args->internet_service_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteInternetService"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_user_group_policy(struct osc_env *e, struct osc_str *out, struct osc_read_user_group_policy_arg *args) +int osc_delete_internet_service(struct osc_env *e, struct osc_str *out, struct osc_delete_internet_service_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_user_group_policy_data(args, &data); + r = delete_internet_service_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadUserGroupPolicy"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_user_group_policies_data(struct osc_read_user_group_policies_arg *args, struct osc_str *data) +static int delete_keypair_data(struct osc_env *e, struct osc_delete_keypair_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->is_set_first_item || args->first_item) { - ARG_TO_JSON(FirstItem, int, args->first_item); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); - ret += 1; - } - if (args->user_group_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); - ret += 1; - } - if (args->user_group_path) { + if (args->keypair_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupPath\":", args->user_group_path); + ARG_TO_JSON_STR("\"KeypairName\":", args->keypair_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteKeypair"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_user_group_policies(struct osc_env *e, struct osc_str *out, struct osc_read_user_group_policies_arg *args) +int osc_delete_keypair(struct osc_env *e, struct osc_str *out, struct osc_delete_keypair_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_user_group_policies_data(args, &data); + r = delete_keypair_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadUserGroupPolicies"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_user_group_data(struct osc_read_user_group_arg *args, struct osc_str *data) +static int delete_listener_rule_data(struct osc_env *e, struct osc_delete_listener_rule_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; - osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->path) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Path\":", args->path); + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->user_group_name) { + if (args->listener_rule_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); + ARG_TO_JSON_STR("\"ListenerRuleName\":", args->listener_rule_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteListenerRule"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_user_group(struct osc_env *e, struct osc_str *out, struct osc_read_user_group_arg *args) +int osc_delete_listener_rule(struct osc_env *e, struct osc_str *out, struct osc_delete_listener_rule_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_user_group_data(args, &data); + r = delete_listener_rule_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadUserGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_unit_price_data(struct osc_read_unit_price_arg *args, struct osc_str *data) +static int delete_load_balancer_listeners_data(struct osc_env *e, struct osc_delete_load_balancer_listeners_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->operation) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Operation\":", args->operation); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->service) { + if (args->load_balancer_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Service\":", args->service); + ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); ret += 1; } - if (args->type) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Type\":", args->type); - ret += 1; + if (args->load_balancer_ports) { + int *ip; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"LoadBalancerPorts\":[" )); + for (ip = args->load_balancer_ports; *ip > 0; ++ip) { + if (ip != args->load_balancer_ports) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_int(data, *ip)); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->load_balancer_ports_str) { + ARG_TO_JSON(LoadBalancerPorts, string, args->load_balancer_ports_str); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteLoadBalancerListeners"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_unit_price(struct osc_env *e, struct osc_str *out, struct osc_read_unit_price_arg *args) +int osc_delete_load_balancer_listeners(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_listeners_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_unit_price_data(args, &data); + r = delete_load_balancer_listeners_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadUnitPrice"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_tags_data(struct osc_read_tags_arg *args, struct osc_str *data) +static int delete_load_balancer_policy_data(struct osc_env *e, struct osc_delete_load_balancer_policy_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_tag_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->load_balancer_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->policy_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteLoadBalancerPolicy"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_tags(struct osc_env *e, struct osc_str *out, struct osc_read_tags_arg *args) +int osc_delete_load_balancer_policy(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_policy_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_tags_data(args, &data); + r = delete_load_balancer_policy_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadTags"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_subregions_data(struct osc_read_subregions_arg *args, struct osc_str *data) +static int delete_load_balancer_data(struct osc_env *e, struct osc_delete_load_balancer_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_subregion_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->load_balancer_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteLoadBalancer"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_subregions(struct osc_env *e, struct osc_str *out, struct osc_read_subregions_arg *args) +int osc_delete_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_subregions_data(args, &data); + r = delete_load_balancer_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadSubregions"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_subnets_data(struct osc_read_subnets_arg *args, struct osc_str *data) +static int delete_load_balancer_tags_data(struct osc_env *e, struct osc_delete_load_balancer_tags_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); + if (args->load_balancer_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"LoadBalancerNames\":[" )); + for (as = args->load_balancer_names; *as; ++as) { + if (as != args->load_balancer_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->load_balancer_names_str) { + ARG_TO_JSON(LoadBalancerNames, string, args->load_balancer_names_str); ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_subnet_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); - ret += 1; + if (args->tags) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Tags\":[" )); + for (int i = 0; i < args->nb_tags; ++i) { + struct resource_load_balancer_tag *p = &args->tags[i]; + if (p != args->tags) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(resource_load_balancer_tag_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->tags_str) { + ARG_TO_JSON(Tags, string, args->tags_str); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteLoadBalancerTags"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_subnets(struct osc_env *e, struct osc_str *out, struct osc_read_subnets_arg *args) +int osc_delete_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_tags_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_subnets_data(args, &data); + r = delete_load_balancer_tags_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadSubnets"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_snapshots_data(struct osc_read_snapshots_arg *args, struct osc_str *data) +static int delete_nat_service_data(struct osc_env *e, struct osc_delete_nat_service_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_snapshot_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->nat_service_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ARG_TO_JSON_STR("\"NatServiceId\":", args->nat_service_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteNatService"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_snapshots(struct osc_env *e, struct osc_str *out, struct osc_read_snapshots_arg *args) +int osc_delete_nat_service(struct osc_env *e, struct osc_str *out, struct osc_delete_nat_service_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_snapshots_data(args, &data); + r = delete_nat_service_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadSnapshots"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_snapshot_export_tasks_data(struct osc_read_snapshot_export_tasks_arg *args, struct osc_str *data) +static int delete_net_access_point_data(struct osc_env *e, struct osc_delete_net_access_point_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_export_task_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->net_access_point_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ARG_TO_JSON_STR("\"NetAccessPointId\":", args->net_access_point_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteNetAccessPoint"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_snapshot_export_tasks(struct osc_env *e, struct osc_str *out, struct osc_read_snapshot_export_tasks_arg *args) +int osc_delete_net_access_point(struct osc_env *e, struct osc_str *out, struct osc_delete_net_access_point_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_snapshot_export_tasks_data(args, &data); + r = delete_net_access_point_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadSnapshotExportTasks"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_server_certificates_data(struct osc_read_server_certificates_arg *args, struct osc_str *data) +static int delete_net_peering_data(struct osc_env *e, struct osc_delete_net_peering_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_server_certificate_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + if (args->net_peering_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NetPeeringId\":", args->net_peering_id); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteNetPeering"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_server_certificates(struct osc_env *e, struct osc_str *out, struct osc_read_server_certificates_arg *args) +int osc_delete_net_peering(struct osc_env *e, struct osc_str *out, struct osc_delete_net_peering_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_server_certificates_data(args, &data); + r = delete_net_peering_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadServerCertificates"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_security_groups_data(struct osc_read_security_groups_arg *args, struct osc_str *data) +static int delete_net_data(struct osc_env *e, struct osc_delete_net_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_security_group_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->net_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ARG_TO_JSON_STR("\"NetId\":", args->net_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteNet"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_security_groups(struct osc_env *e, struct osc_str *out, struct osc_read_security_groups_arg *args) +int osc_delete_net(struct osc_env *e, struct osc_str *out, struct osc_delete_net_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_security_groups_data(args, &data); + r = delete_net_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadSecurityGroups"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_secret_access_key_data(struct osc_read_secret_access_key_arg *args, struct osc_str *data) +static int delete_nic_data(struct osc_env *e, struct osc_delete_nic_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->access_key_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"AccessKeyId\":", args->access_key_id); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } + if (args->nic_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NicId\":", args->nic_id); + ret += 1; + } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteNic"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_secret_access_key(struct osc_env *e, struct osc_str *out, struct osc_read_secret_access_key_arg *args) +int osc_delete_nic(struct osc_env *e, struct osc_str *out, struct osc_delete_nic_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_secret_access_key_data(args, &data); + r = delete_nic_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadSecretAccessKey"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_route_tables_data(struct osc_read_route_tables_arg *args, struct osc_str *data) +static int delete_policy_data(struct osc_env *e, struct osc_delete_policy_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_route_table_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->policy_orn) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeletePolicy"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_route_tables(struct osc_env *e, struct osc_str *out, struct osc_read_route_tables_arg *args) +int osc_delete_policy(struct osc_env *e, struct osc_str *out, struct osc_delete_policy_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_route_tables_data(args, &data); + r = delete_policy_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadRouteTables"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_regions_data(struct osc_read_regions_arg *args, struct osc_str *data) +static int delete_policy_version_data(struct osc_env *e, struct osc_delete_policy_version_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->policy_orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + ret += 1; + } + if (args->version_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VersionId\":", args->version_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeletePolicyVersion"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_regions(struct osc_env *e, struct osc_str *out, struct osc_read_regions_arg *args) +int osc_delete_policy_version(struct osc_env *e, struct osc_str *out, struct osc_delete_policy_version_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_regions_data(args, &data); + r = delete_policy_version_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadRegions"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_quotas_data(struct osc_read_quotas_arg *args, struct osc_str *data) +static int delete_public_ip_data(struct osc_env *e, struct osc_delete_public_ip_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_quota_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->public_ip) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ARG_TO_JSON_STR("\"PublicIp\":", args->public_ip); ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->public_ip_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PublicIpId\":", args->public_ip_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeletePublicIp"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_quotas(struct osc_env *e, struct osc_str *out, struct osc_read_quotas_arg *args) +int osc_delete_public_ip(struct osc_env *e, struct osc_str *out, struct osc_delete_public_ip_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_quotas_data(args, &data); + r = delete_public_ip_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadQuotas"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_public_ips_data(struct osc_read_public_ips_arg *args, struct osc_str *data) +static int delete_route_data(struct osc_env *e, struct osc_delete_route_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->destination_ip_range) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"DestinationIpRange\":", args->destination_ip_range); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_public_ip_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->route_table_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteRoute"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_public_ips(struct osc_env *e, struct osc_str *out, struct osc_read_public_ips_arg *args) +int osc_delete_route(struct osc_env *e, struct osc_str *out, struct osc_delete_route_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_public_ips_data(args, &data); + r = delete_route_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadPublicIps"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_public_ip_ranges_data(struct osc_read_public_ip_ranges_arg *args, struct osc_str *data) +static int delete_route_table_data(struct osc_env *e, struct osc_delete_route_table_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->next_page_token) { + if (args->route_table_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteRouteTable"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_public_ip_ranges(struct osc_env *e, struct osc_str *out, struct osc_read_public_ip_ranges_arg *args) +int osc_delete_route_table(struct osc_env *e, struct osc_str *out, struct osc_delete_route_table_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_public_ip_ranges_data(args, &data); + r = delete_route_table_data(e, args, &data); if (r < 0) - goto out; - - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadPublicIpRanges"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + goto out; + + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_public_catalog_data(struct osc_read_public_catalog_arg *args, struct osc_str *data) +static int delete_security_group_data(struct osc_env *e, struct osc_delete_security_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } + if (args->security_group_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SecurityGroupId\":", args->security_group_id); + ret += 1; + } + if (args->security_group_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SecurityGroupName\":", args->security_group_name); + ret += 1; + } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteSecurityGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_public_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_public_catalog_arg *args) +int osc_delete_security_group(struct osc_env *e, struct osc_str *out, struct osc_delete_security_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_public_catalog_data(args, &data); + r = delete_security_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadPublicCatalog"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_product_types_data(struct osc_read_product_types_arg *args, struct osc_str *data) +static int delete_security_group_rule_data(struct osc_env *e, struct osc_delete_security_group_rule_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); + if (args->flow) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Flow\":", args->flow); + ret += 1; + } + if (args->is_set_from_port_range || args->from_port_range) { + ARG_TO_JSON(FromPortRange, int, args->from_port_range); + ret += 1; + } + if (args->ip_protocol) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"IpProtocol\":", args->ip_protocol); + ret += 1; + } + if (args->ip_range) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"IpRange\":", args->ip_range); + ret += 1; + } + if (args->rules) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Rules\":[" )); + for (int i = 0; i < args->nb_rules; ++i) { + struct security_group_rule *p = &args->rules[i]; + if (p != args->rules) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(security_group_rule_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->rules_str) { + ARG_TO_JSON(Rules, string, args->rules_str); ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_product_type_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; } - if (args->next_page_token) { + if (args->security_group_account_id_to_unlink) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ARG_TO_JSON_STR("\"SecurityGroupAccountIdToUnlink\":", args->security_group_account_id_to_unlink); ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->security_group_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SecurityGroupId\":", args->security_group_id); + ret += 1; + } + if (args->security_group_name_to_unlink) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SecurityGroupNameToUnlink\":", args->security_group_name_to_unlink); + ret += 1; + } + if (args->is_set_to_port_range || args->to_port_range) { + ARG_TO_JSON(ToPortRange, int, args->to_port_range); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteSecurityGroupRule"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_product_types(struct osc_env *e, struct osc_str *out, struct osc_read_product_types_arg *args) +int osc_delete_security_group_rule(struct osc_env *e, struct osc_str *out, struct osc_delete_security_group_rule_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_product_types_data(args, &data); + r = delete_security_group_rule_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadProductTypes"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_policy_versions_data(struct osc_read_policy_versions_arg *args, struct osc_str *data) +static int delete_server_certificate_data(struct osc_env *e, struct osc_delete_server_certificate_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_first_item || args->first_item) { - ARG_TO_JSON(FirstItem, int, args->first_item); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->policy_orn) { + if (args->name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ARG_TO_JSON_STR("\"Name\":", args->name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteServerCertificate"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_policy_versions(struct osc_env *e, struct osc_str *out, struct osc_read_policy_versions_arg *args) +int osc_delete_server_certificate(struct osc_env *e, struct osc_str *out, struct osc_delete_server_certificate_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_policy_versions_data(args, &data); + r = delete_server_certificate_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadPolicyVersions"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_policy_version_data(struct osc_read_policy_version_arg *args, struct osc_str *data) +static int delete_snapshot_data(struct osc_env *e, struct osc_delete_snapshot_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->policy_orn) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->version_id) { + if (args->snapshot_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VersionId\":", args->version_id); + ARG_TO_JSON_STR("\"SnapshotId\":", args->snapshot_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteSnapshot"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_policy_version(struct osc_env *e, struct osc_str *out, struct osc_read_policy_version_arg *args) +int osc_delete_snapshot(struct osc_env *e, struct osc_str *out, struct osc_delete_snapshot_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_policy_version_data(args, &data); + r = delete_snapshot_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadPolicyVersion"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_policy_data(struct osc_read_policy_arg *args, struct osc_str *data) +static int delete_subnet_data(struct osc_env *e, struct osc_delete_subnet_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->policy_orn) { + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->subnet_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteSubnet"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_policy(struct osc_env *e, struct osc_str *out, struct osc_read_policy_arg *args) +int osc_delete_subnet(struct osc_env *e, struct osc_str *out, struct osc_delete_subnet_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_policy_data(args, &data); + r = delete_subnet_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadPolicy"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_policies_data(struct osc_read_policies_arg *args, struct osc_str *data) +static int delete_tags_data(struct osc_env *e, struct osc_delete_tags_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); + if (args->resource_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"ResourceIds\":[" )); + for (as = args->resource_ids; *as; ++as) { + if (as != args->resource_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->resource_ids_str) { + ARG_TO_JSON(ResourceIds, string, args->resource_ids_str); ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(read_policies_filters_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->is_set_first_item || args->first_item) { - ARG_TO_JSON(FirstItem, int, args->first_item); - ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); - ret += 1; + if (args->tags) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Tags\":[" )); + for (int i = 0; i < args->nb_tags; ++i) { + struct resource_tag *p = &args->tags[i]; + if (p != args->tags) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(resource_tag_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->tags_str) { + ARG_TO_JSON(Tags, string, args->tags_str); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteTags"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_policies(struct osc_env *e, struct osc_str *out, struct osc_read_policies_arg *args) +int osc_delete_tags(struct osc_env *e, struct osc_str *out, struct osc_delete_tags_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_policies_data(args, &data); + r = delete_tags_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadPolicies"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_nics_data(struct osc_read_nics_arg *args, struct osc_str *data) +static int delete_user_group_policy_data(struct osc_env *e, struct osc_delete_user_group_policy_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_nic_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + if (args->policy_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); + ret += 1; + } + if (args->user_group_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); + ret += 1; + } + if (args->user_group_path) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserGroupPath\":", args->user_group_path); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteUserGroupPolicy"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_nics(struct osc_env *e, struct osc_str *out, struct osc_read_nics_arg *args) +int osc_delete_user_group_policy(struct osc_env *e, struct osc_str *out, struct osc_delete_user_group_policy_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_nics_data(args, &data); + r = delete_user_group_policy_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadNics"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_nets_data(struct osc_read_nets_arg *args, struct osc_str *data) +static int delete_user_group_data(struct osc_env *e, struct osc_delete_user_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_net_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + if (args->is_set_force) { + ARG_TO_JSON(Force, bool, args->force); + ret += 1; } - if (args->next_page_token) { + if (args->path) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ARG_TO_JSON_STR("\"Path\":", args->path); ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->user_group_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteUserGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_nets(struct osc_env *e, struct osc_str *out, struct osc_read_nets_arg *args) +int osc_delete_user_group(struct osc_env *e, struct osc_str *out, struct osc_delete_user_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_nets_data(args, &data); + r = delete_user_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadNets"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_net_peerings_data(struct osc_read_net_peerings_arg *args, struct osc_str *data) +static int delete_user_data(struct osc_env *e, struct osc_delete_user_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_net_peering_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->user_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteUser"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_net_peerings(struct osc_env *e, struct osc_str *out, struct osc_read_net_peerings_arg *args) +int osc_delete_user(struct osc_env *e, struct osc_str *out, struct osc_delete_user_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_net_peerings_data(args, &data); + r = delete_user_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadNetPeerings"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_net_access_points_data(struct osc_read_net_access_points_arg *args, struct osc_str *data) +static int delete_virtual_gateway_data(struct osc_env *e, struct osc_delete_virtual_gateway_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_net_access_point_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->virtual_gateway_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ARG_TO_JSON_STR("\"VirtualGatewayId\":", args->virtual_gateway_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteVirtualGateway"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_net_access_points(struct osc_env *e, struct osc_str *out, struct osc_read_net_access_points_arg *args) +int osc_delete_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_delete_virtual_gateway_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_net_access_points_data(args, &data); + r = delete_virtual_gateway_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadNetAccessPoints"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_net_access_point_services_data(struct osc_read_net_access_point_services_arg *args, struct osc_str *data) +static int delete_vm_group_data(struct osc_env *e, struct osc_delete_vm_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_service_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->vm_group_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ARG_TO_JSON_STR("\"VmGroupId\":", args->vm_group_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteVmGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_net_access_point_services(struct osc_env *e, struct osc_str *out, struct osc_read_net_access_point_services_arg *args) +int osc_delete_vm_group(struct osc_env *e, struct osc_str *out, struct osc_delete_vm_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_net_access_point_services_data(args, &data); + r = delete_vm_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadNetAccessPointServices"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_nat_services_data(struct osc_read_nat_services_arg *args, struct osc_str *data) +static int delete_vm_template_data(struct osc_env *e, struct osc_delete_vm_template_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_nat_service_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->vm_template_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ARG_TO_JSON_STR("\"VmTemplateId\":", args->vm_template_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteVmTemplate"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_nat_services(struct osc_env *e, struct osc_str *out, struct osc_read_nat_services_arg *args) +int osc_delete_vm_template(struct osc_env *e, struct osc_str *out, struct osc_delete_vm_template_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_nat_services_data(args, &data); + r = delete_vm_template_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadNatServices"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_managed_policies_linked_to_user_group_data(struct osc_read_managed_policies_linked_to_user_group_arg *args, struct osc_str *data) +static int delete_vms_data(struct osc_env *e, struct osc_delete_vms_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); + if (args->vm_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"VmIds\":[" )); + for (as = args->vm_ids; *as; ++as) { + if (as != args->vm_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->vm_ids_str) { + ARG_TO_JSON(VmIds, string, args->vm_ids_str); ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_user_group_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->is_set_first_item || args->first_item) { - ARG_TO_JSON(FirstItem, int, args->first_item); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); - ret += 1; - } - if (args->user_group_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); - ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteVms"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_managed_policies_linked_to_user_group(struct osc_env *e, struct osc_str *out, struct osc_read_managed_policies_linked_to_user_group_arg *args) +int osc_delete_vms(struct osc_env *e, struct osc_str *out, struct osc_delete_vms_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_managed_policies_linked_to_user_group_data(args, &data); + r = delete_vms_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadManagedPoliciesLinkedToUserGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_locations_data(struct osc_read_locations_arg *args, struct osc_str *data) +static int delete_volume_data(struct osc_env *e, struct osc_delete_volume_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->next_page_token) { + if (args->volume_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ARG_TO_JSON_STR("\"VolumeId\":", args->volume_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteVolume"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_locations(struct osc_env *e, struct osc_str *out, struct osc_read_locations_arg *args) +int osc_delete_volume(struct osc_env *e, struct osc_str *out, struct osc_delete_volume_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_locations_data(args, &data); + r = delete_volume_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadLocations"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_load_balancers_data(struct osc_read_load_balancers_arg *args, struct osc_str *data) +static int delete_vpn_connection_data(struct osc_env *e, struct osc_delete_vpn_connection_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_load_balancer_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + if (args->vpn_connection_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VpnConnectionId\":", args->vpn_connection_id); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteVpnConnection"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_load_balancers(struct osc_env *e, struct osc_str *out, struct osc_read_load_balancers_arg *args) +int osc_delete_vpn_connection(struct osc_env *e, struct osc_str *out, struct osc_delete_vpn_connection_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_load_balancers_data(args, &data); + r = delete_vpn_connection_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadLoadBalancers"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_load_balancer_tags_data(struct osc_read_load_balancer_tags_arg *args, struct osc_str *data) +static int delete_vpn_connection_route_data(struct osc_env *e, struct osc_delete_vpn_connection_route_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->destination_ip_range) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"DestinationIpRange\":", args->destination_ip_range); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->load_balancer_names) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"LoadBalancerNames\":[" )); - for (as = args->load_balancer_names; *as; ++as) { - if (as != args->load_balancer_names) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->load_balancer_names_str) { - ARG_TO_JSON(LoadBalancerNames, string, args->load_balancer_names_str); - ret += 1; + if (args->vpn_connection_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VpnConnectionId\":", args->vpn_connection_id); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeleteVpnConnectionRoute"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct osc_read_load_balancer_tags_arg *args) +int osc_delete_vpn_connection_route(struct osc_env *e, struct osc_str *out, struct osc_delete_vpn_connection_route_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_load_balancer_tags_data(args, &data); + r = delete_vpn_connection_route_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadLoadBalancerTags"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_listener_rules_data(struct osc_read_listener_rules_arg *args, struct osc_str *data) +static int deregister_vms_in_load_balancer_data(struct osc_env *e, struct osc_deregister_vms_in_load_balancer_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->backend_vm_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"BackendVmIds\":[" )); + for (as = args->backend_vm_ids; *as; ++as) { + if (as != args->backend_vm_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->backend_vm_ids_str) { + ARG_TO_JSON(BackendVmIds, string, args->backend_vm_ids_str); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_listener_rule_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + if (args->load_balancer_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/DeregisterVmsInLoadBalancer"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_listener_rules(struct osc_env *e, struct osc_str *out, struct osc_read_listener_rules_arg *args) +int osc_deregister_vms_in_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_deregister_vms_in_load_balancer_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_listener_rules_data(args, &data); + r = deregister_vms_in_load_balancer_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadListenerRules"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_linked_policies_data(struct osc_read_linked_policies_arg *args, struct osc_str *data) +static int link_flexible_gpu_data(struct osc_env *e, struct osc_link_flexible_gpu_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(read_linked_policies_filters_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->is_set_first_item || args->first_item) { - ARG_TO_JSON(FirstItem, int, args->first_item); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->flexible_gpu_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"FlexibleGpuId\":", args->flexible_gpu_id); ret += 1; } - if (args->user_name) { + if (args->vm_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ARG_TO_JSON_STR("\"VmId\":", args->vm_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/LinkFlexibleGpu"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_linked_policies(struct osc_env *e, struct osc_str *out, struct osc_read_linked_policies_arg *args) +int osc_link_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_link_flexible_gpu_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_linked_policies_data(args, &data); + r = link_flexible_gpu_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadLinkedPolicies"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_keypairs_data(struct osc_read_keypairs_arg *args, struct osc_str *data) +static int link_internet_service_data(struct osc_env *e, struct osc_link_internet_service_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_keypair_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->internet_service_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ARG_TO_JSON_STR("\"InternetServiceId\":", args->internet_service_id); ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->net_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NetId\":", args->net_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/LinkInternetService"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_keypairs(struct osc_env *e, struct osc_str *out, struct osc_read_keypairs_arg *args) +int osc_link_internet_service(struct osc_env *e, struct osc_str *out, struct osc_link_internet_service_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_keypairs_data(args, &data); + r = link_internet_service_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadKeypairs"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_internet_services_data(struct osc_read_internet_services_arg *args, struct osc_str *data) +static int link_load_balancer_backend_machines_data(struct osc_env *e, struct osc_link_load_balancer_backend_machines_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); + if (args->backend_ips) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"BackendIps\":[" )); + for (as = args->backend_ips; *as; ++as) { + if (as != args->backend_ips) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->backend_ips_str) { + ARG_TO_JSON(BackendIps, string, args->backend_ips_str); ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_internet_service_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; } - if (args->next_page_token) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + if (args->backend_vm_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"BackendVmIds\":[" )); + for (as = args->backend_vm_ids; *as; ++as) { + if (as != args->backend_vm_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->backend_vm_ids_str) { + ARG_TO_JSON(BackendVmIds, string, args->backend_vm_ids_str); + ret += 1; + } + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->load_balancer_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/LinkLoadBalancerBackendMachines"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_internet_services(struct osc_env *e, struct osc_str *out, struct osc_read_internet_services_arg *args) +int osc_link_load_balancer_backend_machines(struct osc_env *e, struct osc_str *out, struct osc_link_load_balancer_backend_machines_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_internet_services_data(args, &data); + r = link_load_balancer_backend_machines_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadInternetServices"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_images_data(struct osc_read_images_arg *args, struct osc_str *data) +static int link_managed_policy_to_user_group_data(struct osc_env *e, struct osc_link_managed_policy_to_user_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_image_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->policy_orn) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->user_group_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/LinkManagedPolicyToUserGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_images(struct osc_env *e, struct osc_str *out, struct osc_read_images_arg *args) +int osc_link_managed_policy_to_user_group(struct osc_env *e, struct osc_str *out, struct osc_link_managed_policy_to_user_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_images_data(args, &data); + r = link_managed_policy_to_user_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadImages"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_image_export_tasks_data(struct osc_read_image_export_tasks_arg *args, struct osc_str *data) +static int link_nic_data(struct osc_env *e, struct osc_link_nic_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->is_set_device_number || args->device_number) { + ARG_TO_JSON(DeviceNumber, int, args->device_number); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_export_task_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->nic_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ARG_TO_JSON_STR("\"NicId\":", args->nic_id); ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->vm_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VmId\":", args->vm_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/LinkNic"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_image_export_tasks(struct osc_env *e, struct osc_str *out, struct osc_read_image_export_tasks_arg *args) +int osc_link_nic(struct osc_env *e, struct osc_str *out, struct osc_link_nic_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_image_export_tasks_data(args, &data); + r = link_nic_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadImageExportTasks"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_flexible_gpus_data(struct osc_read_flexible_gpus_arg *args, struct osc_str *data) +static int link_policy_data(struct osc_env *e, struct osc_link_policy_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_flexible_gpu_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + if (args->policy_orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + ret += 1; + } + if (args->user_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/LinkPolicy"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_flexible_gpus(struct osc_env *e, struct osc_str *out, struct osc_read_flexible_gpus_arg *args) +int osc_link_policy(struct osc_env *e, struct osc_str *out, struct osc_link_policy_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_flexible_gpus_data(args, &data); + r = link_policy_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadFlexibleGpus"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_flexible_gpu_catalog_data(struct osc_read_flexible_gpu_catalog_arg *args, struct osc_str *data) +static int link_private_ips_data(struct osc_env *e, struct osc_link_private_ips_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->is_set_allow_relink) { + ARG_TO_JSON(AllowRelink, bool, args->allow_relink); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - osc_str_append_string(data, "}"); - return !!ret; -} - -int osc_read_flexible_gpu_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_flexible_gpu_catalog_arg *args) -{ - CURLcode res = CURLE_OUT_OF_MEMORY; - struct osc_str data; - struct osc_str end_call; - int r; - - osc_init_str(&data); - osc_init_str(&end_call); - r = read_flexible_gpu_catalog_data(args, &data); - if (r < 0) - goto out; - - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadFlexibleGpuCatalog"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); - curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); - if (e->flag & OSC_VERBOSE_MODE) { - printf("\n%s\n\n", data.buf); + if (args->nic_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NicId\":", args->nic_id); + ret += 1; } - res = curl_easy_perform(e->c); -out: - osc_deinit_str(&end_call); - osc_deinit_str(&data); - return res; -} -static int read_entities_linked_to_policy_data(struct osc_read_entities_linked_to_policy_arg *args, struct osc_str *data) -{ - int ret = 0; - int count_args = 0; - - if (!args) - return 0; - osc_str_append_string(data, "{"); - if (args->entities_type) { + if (args->private_ips) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"EntitiesType\":[" )); - for (as = args->entities_type; *as; ++as) { - if (as != args->entities_type) + STRY(osc_str_append_string(data, "\"PrivateIps\":[" )); + for (as = args->private_ips; *as; ++as) { + if (as != args->private_ips) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->entities_type_str) { - ARG_TO_JSON(EntitiesType, string, args->entities_type_str); + } else if (args->private_ips_str) { + ARG_TO_JSON(PrivateIps, string, args->private_ips_str); ret += 1; } - if (args->is_set_first_item || args->first_item) { - ARG_TO_JSON(FirstItem, int, args->first_item); - ret += 1; - } - if (args->policy_orn) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->is_set_secondary_private_ip_count || args->secondary_private_ip_count) { + ARG_TO_JSON(SecondaryPrivateIpCount, int, args->secondary_private_ip_count); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/LinkPrivateIps"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_entities_linked_to_policy(struct osc_env *e, struct osc_str *out, struct osc_read_entities_linked_to_policy_arg *args) +int osc_link_private_ips(struct osc_env *e, struct osc_str *out, struct osc_link_private_ips_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_entities_linked_to_policy_data(args, &data); + r = link_private_ips_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadEntitiesLinkedToPolicy"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_direct_links_data(struct osc_read_direct_links_arg *args, struct osc_str *data) +static int link_public_ip_data(struct osc_env *e, struct osc_link_public_ip_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->is_set_allow_relink) { + ARG_TO_JSON(AllowRelink, bool, args->allow_relink); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_direct_link_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + if (args->nic_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NicId\":", args->nic_id); + ret += 1; } - if (args->next_page_token) { + if (args->private_ip) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ARG_TO_JSON_STR("\"PrivateIp\":", args->private_ip); ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->public_ip) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PublicIp\":", args->public_ip); + ret += 1; + } + if (args->public_ip_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PublicIpId\":", args->public_ip_id); + ret += 1; + } + if (args->vm_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VmId\":", args->vm_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/LinkPublicIp"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_direct_links(struct osc_env *e, struct osc_str *out, struct osc_read_direct_links_arg *args) +int osc_link_public_ip(struct osc_env *e, struct osc_str *out, struct osc_link_public_ip_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_direct_links_data(args, &data); + r = link_public_ip_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadDirectLinks"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_direct_link_interfaces_data(struct osc_read_direct_link_interfaces_arg *args, struct osc_str *data) +static int link_route_table_data(struct osc_env *e, struct osc_link_route_table_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_direct_link_interface_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->route_table_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->subnet_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/LinkRouteTable"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_direct_link_interfaces(struct osc_env *e, struct osc_str *out, struct osc_read_direct_link_interfaces_arg *args) +int osc_link_route_table(struct osc_env *e, struct osc_str *out, struct osc_link_route_table_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_direct_link_interfaces_data(args, &data); + r = link_route_table_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadDirectLinkInterfaces"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_dhcp_options_data(struct osc_read_dhcp_options_arg *args, struct osc_str *data) +static int link_virtual_gateway_data(struct osc_env *e, struct osc_link_virtual_gateway_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_dhcp_options_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->net_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ARG_TO_JSON_STR("\"NetId\":", args->net_id); ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->virtual_gateway_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VirtualGatewayId\":", args->virtual_gateway_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/LinkVirtualGateway"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_read_dhcp_options_arg *args) +int osc_link_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_link_virtual_gateway_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_dhcp_options_data(args, &data); + r = link_virtual_gateway_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadDhcpOptions"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_dedicated_groups_data(struct osc_read_dedicated_groups_arg *args, struct osc_str *data) +static int link_volume_data(struct osc_env *e, struct osc_link_volume_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->device_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"DeviceName\":", args->device_name); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_dedicated_group_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { + if (args->vm_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ARG_TO_JSON_STR("\"VmId\":", args->vm_id); ret += 1; } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + if (args->volume_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VolumeId\":", args->volume_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/LinkVolume"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_dedicated_groups(struct osc_env *e, struct osc_str *out, struct osc_read_dedicated_groups_arg *args) +int osc_link_volume(struct osc_env *e, struct osc_str *out, struct osc_link_volume_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_dedicated_groups_data(args, &data); + r = link_volume_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadDedicatedGroups"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_consumption_account_data(struct osc_read_consumption_account_arg *args, struct osc_str *data) +static int put_user_group_policy_data(struct osc_env *e, struct osc_put_user_group_policy_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->from_date) { + if (args->policy_document) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"FromDate\":", args->from_date); + ARG_TO_JSON_STR("\"PolicyDocument\":", args->policy_document); ret += 1; } - if (args->is_set_overall) { - ARG_TO_JSON(Overall, bool, args->overall); + if (args->policy_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); ret += 1; } - if (args->is_set_show_price) { - ARG_TO_JSON(ShowPrice, bool, args->show_price); + if (args->user_group_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); ret += 1; } - if (args->to_date) { + if (args->user_group_path) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ToDate\":", args->to_date); + ARG_TO_JSON_STR("\"UserGroupPath\":", args->user_group_path); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/PutUserGroupPolicy"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_consumption_account(struct osc_env *e, struct osc_str *out, struct osc_read_consumption_account_arg *args) +int osc_put_user_group_policy(struct osc_env *e, struct osc_str *out, struct osc_put_user_group_policy_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_consumption_account_data(args, &data); + r = put_user_group_policy_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadConsumptionAccount"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_console_output_data(struct osc_read_console_output_arg *args, struct osc_str *data) +static int read_access_keys_data(struct osc_env *e, struct osc_read_access_keys_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->vm_id) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_access_keys_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->user_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmId\":", args->vm_id); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadAccessKeys"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_console_output(struct osc_env *e, struct osc_str *out, struct osc_read_console_output_arg *args) +int osc_read_access_keys(struct osc_env *e, struct osc_str *out, struct osc_read_access_keys_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_console_output_data(args, &data); + r = read_access_keys_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadConsoleOutput"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_client_gateways_data(struct osc_read_client_gateways_arg *args, struct osc_str *data) +static int read_accounts_data(struct osc_env *e, struct osc_read_accounts_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_client_gateway_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->next_page_token) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); - ret += 1; - } - if (args->is_set_results_per_page || args->results_per_page) { - ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); - ret += 1; - } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadAccounts"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_client_gateways(struct osc_env *e, struct osc_str *out, struct osc_read_client_gateways_arg *args) +int osc_read_accounts(struct osc_env *e, struct osc_str *out, struct osc_read_accounts_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_client_gateways_data(args, &data); + r = read_accounts_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadClientGateways"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_catalogs_data(struct osc_read_catalogs_arg *args, struct osc_str *data) +static int read_admin_password_data(struct osc_env *e, struct osc_read_admin_password_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_catalogs_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + if (args->vm_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VmId\":", args->vm_id); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadAdminPassword"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_catalogs(struct osc_env *e, struct osc_str *out, struct osc_read_catalogs_arg *args) +int osc_read_admin_password(struct osc_env *e, struct osc_str *out, struct osc_read_admin_password_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_catalogs_data(args, &data); + r = read_admin_password_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadCatalogs"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_catalog_data(struct osc_read_catalog_arg *args, struct osc_str *data) +static int read_api_access_policy_data(struct osc_env *e, struct osc_read_api_access_policy_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadApiAccessPolicy"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_catalog_arg *args) +int osc_read_api_access_policy(struct osc_env *e, struct osc_str *out, struct osc_read_api_access_policy_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_catalog_data(args, &data); + r = read_api_access_policy_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadCatalog"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_cas_data(struct osc_read_cas_arg *args, struct osc_str *data) +static int read_api_access_rules_data(struct osc_env *e, struct osc_read_api_access_rules_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); @@ -22958,48 +23442,51 @@ static int read_cas_data(struct osc_read_cas_arg *args, struct osc_str *data) } else if (args->is_set_filters) { TRY_APPEND_COL(count_args, data); STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_ca_setter(&args->filters, data) < 0); + STRY(filters_api_access_rule_setter(&args->filters, data) < 0); STRY(osc_str_append_string(data, "}" )); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadApiAccessRules"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_cas(struct osc_env *e, struct osc_str *out, struct osc_read_cas_arg *args) +int osc_read_api_access_rules(struct osc_env *e, struct osc_str *out, struct osc_read_api_access_rules_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_cas_data(args, &data); + r = read_api_access_rules_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadCas"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_api_logs_data(struct osc_read_api_logs_arg *args, struct osc_str *data) +static int read_api_logs_data(struct osc_env *e, struct osc_read_api_logs_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); @@ -23035,6 +23522,10 @@ static int read_api_logs_data(struct osc_read_api_logs_arg *args, struct osc_st ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadApiLogs"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } @@ -23042,36 +23533,35 @@ int osc_read_api_logs(struct osc_env *e, struct osc_str *out, struct osc_read_ap { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_api_logs_data(args, &data); + r = read_api_logs_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadApiLogs"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_api_access_rules_data(struct osc_read_api_access_rules_arg *args, struct osc_str *data) +static int read_cas_data(struct osc_env *e, struct osc_read_cas_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); @@ -23083,182 +23573,97 @@ static int read_api_access_rules_data(struct osc_read_api_access_rules_arg *arg } else if (args->is_set_filters) { TRY_APPEND_COL(count_args, data); STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_api_access_rule_setter(&args->filters, data) < 0); + STRY(filters_ca_setter(&args->filters, data) < 0); STRY(osc_str_append_string(data, "}" )); ret += 1; } osc_str_append_string(data, "}"); - return !!ret; -} - -int osc_read_api_access_rules(struct osc_env *e, struct osc_str *out, struct osc_read_api_access_rules_arg *args) -{ - CURLcode res = CURLE_OUT_OF_MEMORY; - struct osc_str data; - struct osc_str end_call; - int r; - - osc_init_str(&data); - osc_init_str(&end_call); - r = read_api_access_rules_data(args, &data); - if (r < 0) - goto out; + osc_str_append_string(&end_call, "/api/v1/ReadCas"); - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadApiAccessRules"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); - curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); - if (e->flag & OSC_VERBOSE_MODE) { - printf("\n%s\n\n", data.buf); - } - res = curl_easy_perform(e->c); -out: osc_deinit_str(&end_call); - osc_deinit_str(&data); - return res; -} -static int read_api_access_policy_data(struct osc_read_api_access_policy_arg *args, struct osc_str *data) -{ - int ret = 0; - int count_args = 0; - - if (!args) - return 0; - osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - osc_str_append_string(data, "}"); return !!ret; } -int osc_read_api_access_policy(struct osc_env *e, struct osc_str *out, struct osc_read_api_access_policy_arg *args) +int osc_read_cas(struct osc_env *e, struct osc_str *out, struct osc_read_cas_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_api_access_policy_data(args, &data); + r = read_cas_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadApiAccessPolicy"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_admin_password_data(struct osc_read_admin_password_arg *args, struct osc_str *data) +static int read_catalog_data(struct osc_env *e, struct osc_read_catalog_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; - osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->vm_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmId\":", args->vm_id); - ret += 1; - } - osc_str_append_string(data, "}"); - return !!ret; -} -int osc_read_admin_password(struct osc_env *e, struct osc_str *out, struct osc_read_admin_password_arg *args) -{ - CURLcode res = CURLE_OUT_OF_MEMORY; - struct osc_str data; - struct osc_str end_call; - int r; - - osc_init_str(&data); osc_init_str(&end_call); - r = read_admin_password_data(args, &data); - if (r < 0) - goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadAdminPassword"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); - curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); - if (e->flag & OSC_VERBOSE_MODE) { - printf("\n%s\n\n", data.buf); - } - res = curl_easy_perform(e->c); -out: - osc_deinit_str(&end_call); - osc_deinit_str(&data); - return res; -} -static int read_accounts_data(struct osc_read_accounts_arg *args, struct osc_str *data) -{ - int ret = 0; - int count_args = 0; - - if (!args) - return 0; osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadCatalog"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_accounts(struct osc_env *e, struct osc_str *out, struct osc_read_accounts_arg *args) +int osc_read_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_catalog_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_accounts_data(args, &data); + r = read_catalog_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadAccounts"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int read_access_keys_data(struct osc_read_access_keys_arg *args, struct osc_str *data) +static int read_catalogs_data(struct osc_env *e, struct osc_read_catalogs_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); @@ -23270,537 +23675,510 @@ static int read_access_keys_data(struct osc_read_access_keys_arg *args, struct } else if (args->is_set_filters) { TRY_APPEND_COL(count_args, data); STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_access_keys_setter(&args->filters, data) < 0); + STRY(filters_catalogs_setter(&args->filters, data) < 0); STRY(osc_str_append_string(data, "}" )); ret += 1; } - if (args->user_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserName\":", args->user_name); - ret += 1; - } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadCatalogs"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_read_access_keys(struct osc_env *e, struct osc_str *out, struct osc_read_access_keys_arg *args) +int osc_read_catalogs(struct osc_env *e, struct osc_str *out, struct osc_read_catalogs_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = read_access_keys_data(args, &data); + r = read_catalogs_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadAccessKeys"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int put_user_group_policy_data(struct osc_put_user_group_policy_arg *args, struct osc_str *data) +static int read_client_gateways_data(struct osc_env *e, struct osc_read_client_gateways_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->policy_document) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyDocument\":", args->policy_document); - ret += 1; - } - if (args->policy_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); - ret += 1; + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_client_gateway_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } - if (args->user_group_name) { + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); ret += 1; } - if (args->user_group_path) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupPath\":", args->user_group_path); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); - return !!ret; -} - -int osc_put_user_group_policy(struct osc_env *e, struct osc_str *out, struct osc_put_user_group_policy_arg *args) -{ - CURLcode res = CURLE_OUT_OF_MEMORY; - struct osc_str data; - struct osc_str end_call; - int r; - - osc_init_str(&data); - osc_init_str(&end_call); - r = put_user_group_policy_data(args, &data); - if (r < 0) - goto out; + osc_str_append_string(&end_call, "/api/v1/ReadClientGateways"); - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/PutUserGroupPolicy"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); - curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); - if (e->flag & OSC_VERBOSE_MODE) { - printf("\n%s\n\n", data.buf); - } - res = curl_easy_perform(e->c); -out: osc_deinit_str(&end_call); - osc_deinit_str(&data); - return res; -} -static int link_volume_data(struct osc_link_volume_arg *args, struct osc_str *data) -{ - int ret = 0; - int count_args = 0; - - if (!args) - return 0; - osc_str_append_string(data, "{"); - if (args->device_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DeviceName\":", args->device_name); - ret += 1; - } - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->vm_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmId\":", args->vm_id); - ret += 1; - } - if (args->volume_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VolumeId\":", args->volume_id); - ret += 1; - } - osc_str_append_string(data, "}"); return !!ret; } -int osc_link_volume(struct osc_env *e, struct osc_str *out, struct osc_link_volume_arg *args) +int osc_read_client_gateways(struct osc_env *e, struct osc_str *out, struct osc_read_client_gateways_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = link_volume_data(args, &data); + r = read_client_gateways_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/LinkVolume"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int link_virtual_gateway_data(struct osc_link_virtual_gateway_arg *args, struct osc_str *data) +static int read_console_output_data(struct osc_env *e, struct osc_read_console_output_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->net_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetId\":", args->net_id); - ret += 1; - } - if (args->virtual_gateway_id) { + if (args->vm_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VirtualGatewayId\":", args->virtual_gateway_id); + ARG_TO_JSON_STR("\"VmId\":", args->vm_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadConsoleOutput"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_link_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_link_virtual_gateway_arg *args) +int osc_read_console_output(struct osc_env *e, struct osc_str *out, struct osc_read_console_output_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = link_virtual_gateway_data(args, &data); + r = read_console_output_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/LinkVirtualGateway"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int link_route_table_data(struct osc_link_route_table_arg *args, struct osc_str *data) +static int read_consumption_account_data(struct osc_env *e, struct osc_read_consumption_account_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->route_table_id) { + if (args->from_date) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); + ARG_TO_JSON_STR("\"FromDate\":", args->from_date); ret += 1; } - if (args->subnet_id) { + if (args->is_set_overall) { + ARG_TO_JSON(Overall, bool, args->overall); + ret += 1; + } + if (args->is_set_show_price) { + ARG_TO_JSON(ShowPrice, bool, args->show_price); + ret += 1; + } + if (args->to_date) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); + ARG_TO_JSON_STR("\"ToDate\":", args->to_date); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadConsumptionAccount"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_link_route_table(struct osc_env *e, struct osc_str *out, struct osc_link_route_table_arg *args) +int osc_read_consumption_account(struct osc_env *e, struct osc_str *out, struct osc_read_consumption_account_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = link_route_table_data(args, &data); + r = read_consumption_account_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/LinkRouteTable"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int link_public_ip_data(struct osc_link_public_ip_arg *args, struct osc_str *data) +static int read_dedicated_groups_data(struct osc_env *e, struct osc_read_dedicated_groups_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_allow_relink) { - ARG_TO_JSON(AllowRelink, bool, args->allow_relink); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->nic_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NicId\":", args->nic_id); - ret += 1; - } - if (args->private_ip) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PrivateIp\":", args->private_ip); - ret += 1; - } - if (args->public_ip) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PublicIp\":", args->public_ip); - ret += 1; + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_dedicated_group_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } - if (args->public_ip_id) { + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PublicIpId\":", args->public_ip_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); ret += 1; } - if (args->vm_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmId\":", args->vm_id); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadDedicatedGroups"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_link_public_ip(struct osc_env *e, struct osc_str *out, struct osc_link_public_ip_arg *args) +int osc_read_dedicated_groups(struct osc_env *e, struct osc_str *out, struct osc_read_dedicated_groups_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = link_public_ip_data(args, &data); + r = read_dedicated_groups_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/LinkPublicIp"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int link_private_ips_data(struct osc_link_private_ips_arg *args, struct osc_str *data) +static int read_dhcp_options_data(struct osc_env *e, struct osc_read_dhcp_options_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_allow_relink) { - ARG_TO_JSON(AllowRelink, bool, args->allow_relink); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->nic_id) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_dhcp_options_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NicId\":", args->nic_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); ret += 1; } - if (args->private_ips) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"PrivateIps\":[" )); - for (as = args->private_ips; *as; ++as) { - if (as != args->private_ips) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->private_ips_str) { - ARG_TO_JSON(PrivateIps, string, args->private_ips_str); - ret += 1; - } - if (args->is_set_secondary_private_ip_count || args->secondary_private_ip_count) { - ARG_TO_JSON(SecondaryPrivateIpCount, int, args->secondary_private_ip_count); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadDhcpOptions"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_link_private_ips(struct osc_env *e, struct osc_str *out, struct osc_link_private_ips_arg *args) +int osc_read_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_read_dhcp_options_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = link_private_ips_data(args, &data); + r = read_dhcp_options_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/LinkPrivateIps"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int link_policy_data(struct osc_link_policy_arg *args, struct osc_str *data) +static int read_direct_link_interfaces_data(struct osc_env *e, struct osc_read_direct_link_interfaces_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->policy_orn) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_direct_link_interface_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); ret += 1; } - if (args->user_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserName\":", args->user_name); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadDirectLinkInterfaces"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_link_policy(struct osc_env *e, struct osc_str *out, struct osc_link_policy_arg *args) +int osc_read_direct_link_interfaces(struct osc_env *e, struct osc_str *out, struct osc_read_direct_link_interfaces_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = link_policy_data(args, &data); + r = read_direct_link_interfaces_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/LinkPolicy"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int link_nic_data(struct osc_link_nic_arg *args, struct osc_str *data) +static int read_direct_links_data(struct osc_env *e, struct osc_read_direct_links_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_device_number || args->device_number) { - ARG_TO_JSON(DeviceNumber, int, args->device_number); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->nic_id) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_direct_link_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NicId\":", args->nic_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); ret += 1; } - if (args->vm_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmId\":", args->vm_id); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadDirectLinks"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_link_nic(struct osc_env *e, struct osc_str *out, struct osc_link_nic_arg *args) +int osc_read_direct_links(struct osc_env *e, struct osc_str *out, struct osc_read_direct_links_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = link_nic_data(args, &data); + r = read_direct_links_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/LinkNic"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int link_managed_policy_to_user_group_data(struct osc_link_managed_policy_to_user_group_arg *args, struct osc_str *data) +static int read_entities_linked_to_policy_data(struct osc_env *e, struct osc_read_entities_linked_to_policy_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->entities_type) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"EntitiesType\":[" )); + for (as = args->entities_type; *as; ++as) { + if (as != args->entities_type) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->entities_type_str) { + ARG_TO_JSON(EntitiesType, string, args->entities_type_str); + ret += 1; + } + if (args->is_set_first_item || args->first_item) { + ARG_TO_JSON(FirstItem, int, args->first_item); ret += 1; } if (args->policy_orn) { @@ -23808,5109 +24186,5408 @@ static int link_managed_policy_to_user_group_data(struct osc_link_managed_polic ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); ret += 1; } - if (args->user_group_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadEntitiesLinkedToPolicy"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_link_managed_policy_to_user_group(struct osc_env *e, struct osc_str *out, struct osc_link_managed_policy_to_user_group_arg *args) +int osc_read_entities_linked_to_policy(struct osc_env *e, struct osc_str *out, struct osc_read_entities_linked_to_policy_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = link_managed_policy_to_user_group_data(args, &data); + r = read_entities_linked_to_policy_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/LinkManagedPolicyToUserGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int link_load_balancer_backend_machines_data(struct osc_link_load_balancer_backend_machines_arg *args, struct osc_str *data) +static int read_flexible_gpu_catalog_data(struct osc_env *e, struct osc_read_flexible_gpu_catalog_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; - osc_str_append_string(data, "{"); - if (args->backend_ips) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"BackendIps\":[" )); - for (as = args->backend_ips; *as; ++as) { - if (as != args->backend_ips) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->backend_ips_str) { - ARG_TO_JSON(BackendIps, string, args->backend_ips_str); - ret += 1; - } - if (args->backend_vm_ids) { - char **as; - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"BackendVmIds\":[" )); - for (as = args->backend_vm_ids; *as; ++as) { - if (as != args->backend_vm_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->backend_vm_ids_str) { - ARG_TO_JSON(BackendVmIds, string, args->backend_vm_ids_str); - ret += 1; - } + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->load_balancer_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); - ret += 1; - } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadFlexibleGpuCatalog"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_link_load_balancer_backend_machines(struct osc_env *e, struct osc_str *out, struct osc_link_load_balancer_backend_machines_arg *args) +int osc_read_flexible_gpu_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_flexible_gpu_catalog_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = link_load_balancer_backend_machines_data(args, &data); + r = read_flexible_gpu_catalog_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/LinkLoadBalancerBackendMachines"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int link_internet_service_data(struct osc_link_internet_service_arg *args, struct osc_str *data) +static int read_flexible_gpus_data(struct osc_env *e, struct osc_read_flexible_gpus_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->internet_service_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"InternetServiceId\":", args->internet_service_id); - ret += 1; - } - if (args->net_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetId\":", args->net_id); - ret += 1; + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_flexible_gpu_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadFlexibleGpus"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_link_internet_service(struct osc_env *e, struct osc_str *out, struct osc_link_internet_service_arg *args) +int osc_read_flexible_gpus(struct osc_env *e, struct osc_str *out, struct osc_read_flexible_gpus_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = link_internet_service_data(args, &data); + r = read_flexible_gpus_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/LinkInternetService"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int link_flexible_gpu_data(struct osc_link_flexible_gpu_arg *args, struct osc_str *data) +static int read_image_export_tasks_data(struct osc_env *e, struct osc_read_image_export_tasks_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->flexible_gpu_id) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_export_task_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"FlexibleGpuId\":", args->flexible_gpu_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); ret += 1; } - if (args->vm_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmId\":", args->vm_id); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadImageExportTasks"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_link_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_link_flexible_gpu_arg *args) +int osc_read_image_export_tasks(struct osc_env *e, struct osc_str *out, struct osc_read_image_export_tasks_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = link_flexible_gpu_data(args, &data); + r = read_image_export_tasks_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/LinkFlexibleGpu"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int deregister_vms_in_load_balancer_data(struct osc_deregister_vms_in_load_balancer_arg *args, struct osc_str *data) +static int read_images_data(struct osc_env *e, struct osc_read_images_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; - osc_str_append_string(data, "{"); - if (args->backend_vm_ids) { - char **as; - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"BackendVmIds\":[" )); - for (as = args->backend_vm_ids; *as; ++as) { - if (as != args->backend_vm_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->backend_vm_ids_str) { - ARG_TO_JSON(BackendVmIds, string, args->backend_vm_ids_str); - ret += 1; - } + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->load_balancer_name) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_image_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadImages"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_deregister_vms_in_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_deregister_vms_in_load_balancer_arg *args) +int osc_read_images(struct osc_env *e, struct osc_str *out, struct osc_read_images_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = deregister_vms_in_load_balancer_data(args, &data); + r = read_images_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeregisterVmsInLoadBalancer"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_vpn_connection_route_data(struct osc_delete_vpn_connection_route_arg *args, struct osc_str *data) +static int read_internet_services_data(struct osc_env *e, struct osc_read_internet_services_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->destination_ip_range) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DestinationIpRange\":", args->destination_ip_range); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->vpn_connection_id) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_internet_service_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VpnConnectionId\":", args->vpn_connection_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadInternetServices"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_vpn_connection_route(struct osc_env *e, struct osc_str *out, struct osc_delete_vpn_connection_route_arg *args) +int osc_read_internet_services(struct osc_env *e, struct osc_str *out, struct osc_read_internet_services_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_vpn_connection_route_data(args, &data); + r = read_internet_services_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteVpnConnectionRoute"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_vpn_connection_data(struct osc_delete_vpn_connection_arg *args, struct osc_str *data) +static int read_keypairs_data(struct osc_env *e, struct osc_read_keypairs_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->vpn_connection_id) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_keypair_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VpnConnectionId\":", args->vpn_connection_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadKeypairs"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_vpn_connection(struct osc_env *e, struct osc_str *out, struct osc_delete_vpn_connection_arg *args) +int osc_read_keypairs(struct osc_env *e, struct osc_str *out, struct osc_read_keypairs_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_vpn_connection_data(args, &data); + r = read_keypairs_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteVpnConnection"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_volume_data(struct osc_delete_volume_arg *args, struct osc_str *data) +static int read_linked_policies_data(struct osc_env *e, struct osc_read_linked_policies_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->volume_id) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(read_linked_policies_filters_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->is_set_first_item || args->first_item) { + ARG_TO_JSON(FirstItem, int, args->first_item); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } + if (args->user_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VolumeId\":", args->volume_id); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadLinkedPolicies"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_volume(struct osc_env *e, struct osc_str *out, struct osc_delete_volume_arg *args) +int osc_read_linked_policies(struct osc_env *e, struct osc_str *out, struct osc_read_linked_policies_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_volume_data(args, &data); + r = read_linked_policies_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteVolume"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_vms_data(struct osc_delete_vms_arg *args, struct osc_str *data) +static int read_listener_rules_data(struct osc_env *e, struct osc_read_listener_rules_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->vm_ids) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"VmIds\":[" )); - for (as = args->vm_ids; *as; ++as) { - if (as != args->vm_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->vm_ids_str) { - ARG_TO_JSON(VmIds, string, args->vm_ids_str); + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_listener_rule_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadListenerRules"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_vms(struct osc_env *e, struct osc_str *out, struct osc_delete_vms_arg *args) +int osc_read_listener_rules(struct osc_env *e, struct osc_str *out, struct osc_read_listener_rules_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_vms_data(args, &data); + r = read_listener_rules_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteVms"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_vm_template_data(struct osc_delete_vm_template_arg *args, struct osc_str *data) +static int read_load_balancer_tags_data(struct osc_env *e, struct osc_read_load_balancer_tags_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->vm_template_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmTemplateId\":", args->vm_template_id); - ret += 1; + if (args->load_balancer_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"LoadBalancerNames\":[" )); + for (as = args->load_balancer_names; *as; ++as) { + if (as != args->load_balancer_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->load_balancer_names_str) { + ARG_TO_JSON(LoadBalancerNames, string, args->load_balancer_names_str); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadLoadBalancerTags"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_vm_template(struct osc_env *e, struct osc_str *out, struct osc_delete_vm_template_arg *args) +int osc_read_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct osc_read_load_balancer_tags_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_vm_template_data(args, &data); + r = read_load_balancer_tags_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteVmTemplate"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_vm_group_data(struct osc_delete_vm_group_arg *args, struct osc_str *data) +static int read_load_balancers_data(struct osc_env *e, struct osc_read_load_balancers_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->vm_group_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmGroupId\":", args->vm_group_id); - ret += 1; + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_load_balancer_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadLoadBalancers"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_vm_group(struct osc_env *e, struct osc_str *out, struct osc_delete_vm_group_arg *args) +int osc_read_load_balancers(struct osc_env *e, struct osc_str *out, struct osc_read_load_balancers_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_vm_group_data(args, &data); + r = read_load_balancers_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteVmGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_virtual_gateway_data(struct osc_delete_virtual_gateway_arg *args, struct osc_str *data) +static int read_locations_data(struct osc_env *e, struct osc_read_locations_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->virtual_gateway_id) { + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VirtualGatewayId\":", args->virtual_gateway_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadLocations"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_delete_virtual_gateway_arg *args) +int osc_read_locations(struct osc_env *e, struct osc_str *out, struct osc_read_locations_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_virtual_gateway_data(args, &data); + r = read_locations_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteVirtualGateway"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_user_group_policy_data(struct osc_delete_user_group_policy_arg *args, struct osc_str *data) +static int read_managed_policies_linked_to_user_group_data(struct osc_env *e, struct osc_read_managed_policies_linked_to_user_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->policy_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_user_group_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->is_set_first_item || args->first_item) { + ARG_TO_JSON(FirstItem, int, args->first_item); ret += 1; } - if (args->user_group_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } - if (args->user_group_path) { + if (args->user_group_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupPath\":", args->user_group_path); + ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadManagedPoliciesLinkedToUserGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_user_group_policy(struct osc_env *e, struct osc_str *out, struct osc_delete_user_group_policy_arg *args) +int osc_read_managed_policies_linked_to_user_group(struct osc_env *e, struct osc_str *out, struct osc_read_managed_policies_linked_to_user_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_user_group_policy_data(args, &data); + r = read_managed_policies_linked_to_user_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteUserGroupPolicy"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_user_group_data(struct osc_delete_user_group_arg *args, struct osc_str *data) +static int read_nat_services_data(struct osc_env *e, struct osc_read_nat_services_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->is_set_force) { - ARG_TO_JSON(Force, bool, args->force); - ret += 1; + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_nat_service_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } - if (args->path) { + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Path\":", args->path); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); ret += 1; } - if (args->user_group_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadNatServices"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_user_group(struct osc_env *e, struct osc_str *out, struct osc_delete_user_group_arg *args) +int osc_read_nat_services(struct osc_env *e, struct osc_str *out, struct osc_read_nat_services_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_user_group_data(args, &data); + r = read_nat_services_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteUserGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_user_data(struct osc_delete_user_arg *args, struct osc_str *data) +static int read_net_access_point_services_data(struct osc_env *e, struct osc_read_net_access_point_services_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->user_name) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_service_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadNetAccessPointServices"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_user(struct osc_env *e, struct osc_str *out, struct osc_delete_user_arg *args) +int osc_read_net_access_point_services(struct osc_env *e, struct osc_str *out, struct osc_read_net_access_point_services_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_user_data(args, &data); + r = read_net_access_point_services_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteUser"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_tags_data(struct osc_delete_tags_arg *args, struct osc_str *data) +static int read_net_access_points_data(struct osc_env *e, struct osc_read_net_access_points_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->resource_ids) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"ResourceIds\":[" )); - for (as = args->resource_ids; *as; ++as) { - if (as != args->resource_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->resource_ids_str) { - ARG_TO_JSON(ResourceIds, string, args->resource_ids_str); + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_net_access_point_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } - if (args->tags) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Tags\":[" )); - for (int i = 0; i < args->nb_tags; ++i) { - struct resource_tag *p = &args->tags[i]; - if (p != args->tags) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(resource_tag_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->tags_str) { - ARG_TO_JSON(Tags, string, args->tags_str); - ret += 1; + if (args->next_page_token) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadNetAccessPoints"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_tags(struct osc_env *e, struct osc_str *out, struct osc_delete_tags_arg *args) +int osc_read_net_access_points(struct osc_env *e, struct osc_str *out, struct osc_read_net_access_points_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_tags_data(args, &data); + r = read_net_access_points_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteTags"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_subnet_data(struct osc_delete_subnet_arg *args, struct osc_str *data) +static int read_net_peerings_data(struct osc_env *e, struct osc_read_net_peerings_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->subnet_id) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_net_peering_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadNetPeerings"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_subnet(struct osc_env *e, struct osc_str *out, struct osc_delete_subnet_arg *args) +int osc_read_net_peerings(struct osc_env *e, struct osc_str *out, struct osc_read_net_peerings_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_subnet_data(args, &data); + r = read_net_peerings_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteSubnet"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_snapshot_data(struct osc_delete_snapshot_arg *args, struct osc_str *data) +static int read_nets_data(struct osc_env *e, struct osc_read_nets_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->snapshot_id) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_net_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SnapshotId\":", args->snapshot_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadNets"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_snapshot(struct osc_env *e, struct osc_str *out, struct osc_delete_snapshot_arg *args) +int osc_read_nets(struct osc_env *e, struct osc_str *out, struct osc_read_nets_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_snapshot_data(args, &data); + r = read_nets_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteSnapshot"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_server_certificate_data(struct osc_delete_server_certificate_arg *args, struct osc_str *data) +static int read_nics_data(struct osc_env *e, struct osc_read_nics_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Name\":", args->name); - ret += 1; + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_nic_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadNics"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_server_certificate(struct osc_env *e, struct osc_str *out, struct osc_delete_server_certificate_arg *args) +int osc_read_nics(struct osc_env *e, struct osc_str *out, struct osc_read_nics_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_server_certificate_data(args, &data); + r = read_nics_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteServerCertificate"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_security_group_rule_data(struct osc_delete_security_group_rule_arg *args, struct osc_str *data) +static int read_policies_data(struct osc_env *e, struct osc_read_policies_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->flow) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Flow\":", args->flow); - ret += 1; - } - if (args->is_set_from_port_range || args->from_port_range) { - ARG_TO_JSON(FromPortRange, int, args->from_port_range); - ret += 1; - } - if (args->ip_protocol) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"IpProtocol\":", args->ip_protocol); - ret += 1; - } - if (args->ip_range) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"IpRange\":", args->ip_range); - ret += 1; - } - if (args->rules) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Rules\":[" )); - for (int i = 0; i < args->nb_rules; ++i) { - struct security_group_rule *p = &args->rules[i]; - if (p != args->rules) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(security_group_rule_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->rules_str) { - ARG_TO_JSON(Rules, string, args->rules_str); + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(read_policies_filters_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } - if (args->security_group_account_id_to_unlink) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SecurityGroupAccountIdToUnlink\":", args->security_group_account_id_to_unlink); - ret += 1; - } - if (args->security_group_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SecurityGroupId\":", args->security_group_id); - ret += 1; - } - if (args->security_group_name_to_unlink) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SecurityGroupNameToUnlink\":", args->security_group_name_to_unlink); + if (args->is_set_first_item || args->first_item) { + ARG_TO_JSON(FirstItem, int, args->first_item); ret += 1; } - if (args->is_set_to_port_range || args->to_port_range) { - ARG_TO_JSON(ToPortRange, int, args->to_port_range); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadPolicies"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_security_group_rule(struct osc_env *e, struct osc_str *out, struct osc_delete_security_group_rule_arg *args) +int osc_read_policies(struct osc_env *e, struct osc_str *out, struct osc_read_policies_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_security_group_rule_data(args, &data); + r = read_policies_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteSecurityGroupRule"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_security_group_data(struct osc_delete_security_group_arg *args, struct osc_str *data) +static int read_policy_data(struct osc_env *e, struct osc_read_policy_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->security_group_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SecurityGroupId\":", args->security_group_id); - ret += 1; - } - if (args->security_group_name) { + if (args->policy_orn) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SecurityGroupName\":", args->security_group_name); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadPolicy"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_security_group(struct osc_env *e, struct osc_str *out, struct osc_delete_security_group_arg *args) +int osc_read_policy(struct osc_env *e, struct osc_str *out, struct osc_read_policy_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_security_group_data(args, &data); + r = read_policy_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteSecurityGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_route_table_data(struct osc_delete_route_table_arg *args, struct osc_str *data) +static int read_policy_version_data(struct osc_env *e, struct osc_read_policy_version_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->policy_orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); ret += 1; } - if (args->route_table_id) { + if (args->version_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); + ARG_TO_JSON_STR("\"VersionId\":", args->version_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadPolicyVersion"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_route_table(struct osc_env *e, struct osc_str *out, struct osc_delete_route_table_arg *args) +int osc_read_policy_version(struct osc_env *e, struct osc_str *out, struct osc_read_policy_version_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_route_table_data(args, &data); + r = read_policy_version_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteRouteTable"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_route_data(struct osc_delete_route_arg *args, struct osc_str *data) +static int read_policy_versions_data(struct osc_env *e, struct osc_read_policy_versions_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->destination_ip_range) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DestinationIpRange\":", args->destination_ip_range); + if (args->is_set_first_item || args->first_item) { + ARG_TO_JSON(FirstItem, int, args->first_item); ret += 1; } - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->policy_orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); ret += 1; } - if (args->route_table_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadPolicyVersions"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_route(struct osc_env *e, struct osc_str *out, struct osc_delete_route_arg *args) +int osc_read_policy_versions(struct osc_env *e, struct osc_str *out, struct osc_read_policy_versions_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_route_data(args, &data); + r = read_policy_versions_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteRoute"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_public_ip_data(struct osc_delete_public_ip_arg *args, struct osc_str *data) +static int read_product_types_data(struct osc_env *e, struct osc_read_product_types_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->public_ip) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_product_type_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PublicIp\":", args->public_ip); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); ret += 1; } - if (args->public_ip_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PublicIpId\":", args->public_ip_id); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadProductTypes"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_public_ip(struct osc_env *e, struct osc_str *out, struct osc_delete_public_ip_arg *args) +int osc_read_product_types(struct osc_env *e, struct osc_str *out, struct osc_read_product_types_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_public_ip_data(args, &data); + r = read_product_types_data(e, args, &data); if (r < 0) goto out; + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&data); + return res; +} +static int read_public_catalog_data(struct osc_env *e, struct osc_read_public_catalog_arg *args, struct osc_str *data) +{ + struct osc_str end_call; + int ret = 0; + int count_args = 0; + + (void)count_args; /* if use only query/header and path, this is unused */ + if (!args) + return 0; + + osc_init_str(&end_call); osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeletePublicIp"); + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadPublicCatalog"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + osc_deinit_str(&end_call); + return !!ret; +} + +int osc_read_public_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_public_catalog_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + int r; + + osc_init_str(&data); + r = read_public_catalog_data(e, args, &data); + if (r < 0) + goto out; + + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_policy_version_data(struct osc_delete_policy_version_arg *args, struct osc_str *data) +static int read_public_ip_ranges_data(struct osc_env *e, struct osc_read_public_ip_ranges_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->policy_orn) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->version_id) { + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VersionId\":", args->version_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadPublicIpRanges"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_policy_version(struct osc_env *e, struct osc_str *out, struct osc_delete_policy_version_arg *args) +int osc_read_public_ip_ranges(struct osc_env *e, struct osc_str *out, struct osc_read_public_ip_ranges_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_policy_version_data(args, &data); + r = read_public_ip_ranges_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeletePolicyVersion"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_policy_data(struct osc_delete_policy_arg *args, struct osc_str *data) +static int read_public_ips_data(struct osc_env *e, struct osc_read_public_ips_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->policy_orn) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_public_ip_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadPublicIps"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_policy(struct osc_env *e, struct osc_str *out, struct osc_delete_policy_arg *args) +int osc_read_public_ips(struct osc_env *e, struct osc_str *out, struct osc_read_public_ips_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_policy_data(args, &data); + r = read_public_ips_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeletePolicy"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_nic_data(struct osc_delete_nic_arg *args, struct osc_str *data) +static int read_quotas_data(struct osc_env *e, struct osc_read_quotas_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->nic_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NicId\":", args->nic_id); + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_quota_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadQuotas"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_nic(struct osc_env *e, struct osc_str *out, struct osc_delete_nic_arg *args) +int osc_read_quotas(struct osc_env *e, struct osc_str *out, struct osc_read_quotas_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_nic_data(args, &data); + r = read_quotas_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteNic"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_net_peering_data(struct osc_delete_net_peering_arg *args, struct osc_str *data) +static int read_regions_data(struct osc_env *e, struct osc_read_regions_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->net_peering_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetPeeringId\":", args->net_peering_id); - ret += 1; - } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadRegions"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_net_peering(struct osc_env *e, struct osc_str *out, struct osc_delete_net_peering_arg *args) +int osc_read_regions(struct osc_env *e, struct osc_str *out, struct osc_read_regions_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_net_peering_data(args, &data); + r = read_regions_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteNetPeering"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_net_access_point_data(struct osc_delete_net_access_point_arg *args, struct osc_str *data) +static int read_route_tables_data(struct osc_env *e, struct osc_read_route_tables_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->net_access_point_id) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_route_table_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetAccessPointId\":", args->net_access_point_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadRouteTables"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_net_access_point(struct osc_env *e, struct osc_str *out, struct osc_delete_net_access_point_arg *args) +int osc_read_route_tables(struct osc_env *e, struct osc_str *out, struct osc_read_route_tables_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_net_access_point_data(args, &data); + r = read_route_tables_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteNetAccessPoint"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_net_data(struct osc_delete_net_arg *args, struct osc_str *data) +static int read_secret_access_key_data(struct osc_env *e, struct osc_read_secret_access_key_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->access_key_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"AccessKeyId\":", args->access_key_id); ret += 1; } - if (args->net_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetId\":", args->net_id); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadSecretAccessKey"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_net(struct osc_env *e, struct osc_str *out, struct osc_delete_net_arg *args) +int osc_read_secret_access_key(struct osc_env *e, struct osc_str *out, struct osc_read_secret_access_key_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_net_data(args, &data); + r = read_secret_access_key_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteNet"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_nat_service_data(struct osc_delete_nat_service_arg *args, struct osc_str *data) +static int read_security_groups_data(struct osc_env *e, struct osc_read_security_groups_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->nat_service_id) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_security_group_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NatServiceId\":", args->nat_service_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadSecurityGroups"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_nat_service(struct osc_env *e, struct osc_str *out, struct osc_delete_nat_service_arg *args) +int osc_read_security_groups(struct osc_env *e, struct osc_str *out, struct osc_read_security_groups_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_nat_service_data(args, &data); + r = read_security_groups_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteNatService"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_load_balancer_tags_data(struct osc_delete_load_balancer_tags_arg *args, struct osc_str *data) +static int read_server_certificates_data(struct osc_env *e, struct osc_read_server_certificates_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->load_balancer_names) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"LoadBalancerNames\":[" )); - for (as = args->load_balancer_names; *as; ++as) { - if (as != args->load_balancer_names) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->load_balancer_names_str) { - ARG_TO_JSON(LoadBalancerNames, string, args->load_balancer_names_str); - ret += 1; - } - if (args->tags) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Tags\":[" )); - for (int i = 0; i < args->nb_tags; ++i) { - struct resource_load_balancer_tag *p = &args->tags[i]; - if (p != args->tags) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(resource_load_balancer_tag_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->tags_str) { - ARG_TO_JSON(Tags, string, args->tags_str); + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_server_certificate_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadServerCertificates"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_tags_arg *args) +int osc_read_server_certificates(struct osc_env *e, struct osc_str *out, struct osc_read_server_certificates_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_load_balancer_tags_data(args, &data); + r = read_server_certificates_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteLoadBalancerTags"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_load_balancer_policy_data(struct osc_delete_load_balancer_policy_arg *args, struct osc_str *data) +static int read_snapshot_export_tasks_data(struct osc_env *e, struct osc_read_snapshot_export_tasks_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->load_balancer_name) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_export_task_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); ret += 1; } - if (args->policy_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadSnapshotExportTasks"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_load_balancer_policy(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_policy_arg *args) +int osc_read_snapshot_export_tasks(struct osc_env *e, struct osc_str *out, struct osc_read_snapshot_export_tasks_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_load_balancer_policy_data(args, &data); + r = read_snapshot_export_tasks_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteLoadBalancerPolicy"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_load_balancer_listeners_data(struct osc_delete_load_balancer_listeners_arg *args, struct osc_str *data) +static int read_snapshots_data(struct osc_env *e, struct osc_read_snapshots_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->load_balancer_name) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_snapshot_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); ret += 1; } - if (args->load_balancer_ports) { - int *ip; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"LoadBalancerPorts\":[" )); - for (ip = args->load_balancer_ports; *ip > 0; ++ip) { - if (ip != args->load_balancer_ports) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_int(data, *ip)); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->load_balancer_ports_str) { - ARG_TO_JSON(LoadBalancerPorts, string, args->load_balancer_ports_str); - ret += 1; + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadSnapshots"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_load_balancer_listeners(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_listeners_arg *args) +int osc_read_snapshots(struct osc_env *e, struct osc_str *out, struct osc_read_snapshots_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_load_balancer_listeners_data(args, &data); + r = read_snapshots_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteLoadBalancerListeners"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_load_balancer_data(struct osc_delete_load_balancer_arg *args, struct osc_str *data) +static int read_subnets_data(struct osc_env *e, struct osc_read_subnets_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->load_balancer_name) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_subnet_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadSubnets"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_arg *args) +int osc_read_subnets(struct osc_env *e, struct osc_str *out, struct osc_read_subnets_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_load_balancer_data(args, &data); + r = read_subnets_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteLoadBalancer"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_listener_rule_data(struct osc_delete_listener_rule_arg *args, struct osc_str *data) +static int read_subregions_data(struct osc_env *e, struct osc_read_subregions_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->listener_rule_name) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_subregion_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ListenerRuleName\":", args->listener_rule_name); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadSubregions"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_listener_rule(struct osc_env *e, struct osc_str *out, struct osc_delete_listener_rule_arg *args) +int osc_read_subregions(struct osc_env *e, struct osc_str *out, struct osc_read_subregions_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_listener_rule_data(args, &data); + r = read_subregions_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteListenerRule"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_keypair_data(struct osc_delete_keypair_arg *args, struct osc_str *data) +static int read_tags_data(struct osc_env *e, struct osc_read_tags_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->keypair_name) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_tag_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"KeypairName\":", args->keypair_name); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadTags"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_keypair(struct osc_env *e, struct osc_str *out, struct osc_delete_keypair_arg *args) +int osc_read_tags(struct osc_env *e, struct osc_str *out, struct osc_read_tags_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_keypair_data(args, &data); + r = read_tags_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteKeypair"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_internet_service_data(struct osc_delete_internet_service_arg *args, struct osc_str *data) +static int read_unit_price_data(struct osc_env *e, struct osc_read_unit_price_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->operation) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Operation\":", args->operation); ret += 1; } - if (args->internet_service_id) { + if (args->service) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"InternetServiceId\":", args->internet_service_id); + ARG_TO_JSON_STR("\"Service\":", args->service); + ret += 1; + } + if (args->type) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Type\":", args->type); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadUnitPrice"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_internet_service(struct osc_env *e, struct osc_str *out, struct osc_delete_internet_service_arg *args) +int osc_read_unit_price(struct osc_env *e, struct osc_str *out, struct osc_read_unit_price_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_internet_service_data(args, &data); + r = read_unit_price_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteInternetService"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_image_data(struct osc_delete_image_arg *args, struct osc_str *data) +static int read_user_group_policies_data(struct osc_env *e, struct osc_read_user_group_policies_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->image_id) { + if (args->is_set_first_item || args->first_item) { + ARG_TO_JSON(FirstItem, int, args->first_item); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } + if (args->user_group_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ImageId\":", args->image_id); + ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); + ret += 1; + } + if (args->user_group_path) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserGroupPath\":", args->user_group_path); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadUserGroupPolicies"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_image(struct osc_env *e, struct osc_str *out, struct osc_delete_image_arg *args) +int osc_read_user_group_policies(struct osc_env *e, struct osc_str *out, struct osc_read_user_group_policies_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_image_data(args, &data); + r = read_user_group_policies_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteImage"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_flexible_gpu_data(struct osc_delete_flexible_gpu_arg *args, struct osc_str *data) +static int read_user_group_policy_data(struct osc_env *e, struct osc_read_user_group_policy_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->flexible_gpu_id) { + if (args->policy_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"FlexibleGpuId\":", args->flexible_gpu_id); + ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); + ret += 1; + } + if (args->user_group_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); + ret += 1; + } + if (args->user_group_path) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserGroupPath\":", args->user_group_path); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadUserGroupPolicy"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_delete_flexible_gpu_arg *args) +int osc_read_user_group_policy(struct osc_env *e, struct osc_str *out, struct osc_read_user_group_policy_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_flexible_gpu_data(args, &data); + r = read_user_group_policy_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteFlexibleGpu"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_export_task_data(struct osc_delete_export_task_arg *args, struct osc_str *data) +static int read_user_group_data(struct osc_env *e, struct osc_read_user_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->export_task_id) { + if (args->path) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ExportTaskId\":", args->export_task_id); + ARG_TO_JSON_STR("\"Path\":", args->path); + ret += 1; + } + if (args->user_group_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadUserGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_export_task(struct osc_env *e, struct osc_str *out, struct osc_delete_export_task_arg *args) +int osc_read_user_group(struct osc_env *e, struct osc_str *out, struct osc_read_user_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_export_task_data(args, &data); + r = read_user_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteExportTask"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_direct_link_interface_data(struct osc_delete_direct_link_interface_arg *args, struct osc_str *data) +static int read_user_groups_per_user_data(struct osc_env *e, struct osc_read_user_groups_per_user_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->direct_link_interface_id) { + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->user_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DirectLinkInterfaceId\":", args->direct_link_interface_id); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); ret += 1; } - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->user_path) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserPath\":", args->user_path); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadUserGroupsPerUser"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_direct_link_interface(struct osc_env *e, struct osc_str *out, struct osc_delete_direct_link_interface_arg *args) +int osc_read_user_groups_per_user(struct osc_env *e, struct osc_str *out, struct osc_read_user_groups_per_user_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_direct_link_interface_data(args, &data); + r = read_user_groups_per_user_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteDirectLinkInterface"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_direct_link_data(struct osc_delete_direct_link_arg *args, struct osc_str *data) +static int read_user_groups_data(struct osc_env *e, struct osc_read_user_groups_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->direct_link_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DirectLinkId\":", args->direct_link_id); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_user_group_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->is_set_first_item || args->first_item) { + ARG_TO_JSON(FirstItem, int, args->first_item); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadUserGroups"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_direct_link(struct osc_env *e, struct osc_str *out, struct osc_delete_direct_link_arg *args) +int osc_read_user_groups(struct osc_env *e, struct osc_str *out, struct osc_read_user_groups_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_direct_link_data(args, &data); + r = read_user_groups_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteDirectLink"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_dhcp_options_data(struct osc_delete_dhcp_options_arg *args, struct osc_str *data) +static int read_users_data(struct osc_env *e, struct osc_read_users_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->dhcp_options_set_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DhcpOptionsSetId\":", args->dhcp_options_set_id); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_users_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->is_set_first_item || args->first_item) { + ARG_TO_JSON(FirstItem, int, args->first_item); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadUsers"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_delete_dhcp_options_arg *args) +int osc_read_users(struct osc_env *e, struct osc_str *out, struct osc_read_users_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_dhcp_options_data(args, &data); + r = read_users_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteDhcpOptions"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_dedicated_group_data(struct osc_delete_dedicated_group_arg *args, struct osc_str *data) +static int read_virtual_gateways_data(struct osc_env *e, struct osc_read_virtual_gateways_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->dedicated_group_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DedicatedGroupId\":", args->dedicated_group_id); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->is_set_force) { - ARG_TO_JSON(Force, bool, args->force); + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_virtual_gateway_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadVirtualGateways"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_delete_dedicated_group_arg *args) +int osc_read_virtual_gateways(struct osc_env *e, struct osc_str *out, struct osc_read_virtual_gateways_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_dedicated_group_data(args, &data); + r = read_virtual_gateways_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteDedicatedGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_client_gateway_data(struct osc_delete_client_gateway_arg *args, struct osc_str *data) +static int read_vm_groups_data(struct osc_env *e, struct osc_read_vm_groups_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->client_gateway_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ClientGatewayId\":", args->client_gateway_id); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_vm_group_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadVmGroups"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_client_gateway(struct osc_env *e, struct osc_str *out, struct osc_delete_client_gateway_arg *args) +int osc_read_vm_groups(struct osc_env *e, struct osc_str *out, struct osc_read_vm_groups_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_client_gateway_data(args, &data); + r = read_vm_groups_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteClientGateway"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_ca_data(struct osc_delete_ca_arg *args, struct osc_str *data) +static int read_vm_templates_data(struct osc_env *e, struct osc_read_vm_templates_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->ca_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"CaId\":", args->ca_id); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_vm_template_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadVmTemplates"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_ca(struct osc_env *e, struct osc_str *out, struct osc_delete_ca_arg *args) +int osc_read_vm_templates(struct osc_env *e, struct osc_str *out, struct osc_read_vm_templates_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_ca_data(args, &data); + r = read_vm_templates_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteCa"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_api_access_rule_data(struct osc_delete_api_access_rule_arg *args, struct osc_str *data) +static int read_vm_types_data(struct osc_env *e, struct osc_read_vm_types_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->api_access_rule_id) { + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_vm_type_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ApiAccessRuleId\":", args->api_access_rule_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); ret += 1; } - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadVmTypes"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_api_access_rule(struct osc_env *e, struct osc_str *out, struct osc_delete_api_access_rule_arg *args) +int osc_read_vm_types(struct osc_env *e, struct osc_str *out, struct osc_read_vm_types_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_api_access_rule_data(args, &data); + r = read_vm_types_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteApiAccessRule"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int delete_access_key_data(struct osc_delete_access_key_arg *args, struct osc_str *data) +static int read_vms_health_data(struct osc_env *e, struct osc_read_vms_health_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->access_key_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"AccessKeyId\":", args->access_key_id); - ret += 1; + if (args->backend_vm_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"BackendVmIds\":[" )); + for (as = args->backend_vm_ids; *as; ++as) { + if (as != args->backend_vm_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->backend_vm_ids_str) { + ARG_TO_JSON(BackendVmIds, string, args->backend_vm_ids_str); + ret += 1; } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->user_name) { + if (args->load_balancer_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadVmsHealth"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_delete_access_key(struct osc_env *e, struct osc_str *out, struct osc_delete_access_key_arg *args) +int osc_read_vms_health(struct osc_env *e, struct osc_str *out, struct osc_read_vms_health_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = delete_access_key_data(args, &data); + r = read_vms_health_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteAccessKey"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_vpn_connection_route_data(struct osc_create_vpn_connection_route_arg *args, struct osc_str *data) +static int read_vms_data(struct osc_env *e, struct osc_read_vms_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->destination_ip_range) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DestinationIpRange\":", args->destination_ip_range); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->vpn_connection_id) { + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_vm_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VpnConnectionId\":", args->vpn_connection_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadVms"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_vpn_connection_route(struct osc_env *e, struct osc_str *out, struct osc_create_vpn_connection_route_arg *args) +int osc_read_vms(struct osc_env *e, struct osc_str *out, struct osc_read_vms_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_vpn_connection_route_data(args, &data); + r = read_vms_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateVpnConnectionRoute"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_vpn_connection_data(struct osc_create_vpn_connection_arg *args, struct osc_str *data) +static int read_vms_state_data(struct osc_env *e, struct osc_read_vms_state_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->client_gateway_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ClientGatewayId\":", args->client_gateway_id); - ret += 1; - } - if (args->connection_type) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ConnectionType\":", args->connection_type); + if (args->is_set_all_vms) { + ARG_TO_JSON(AllVms, bool, args->all_vms); ret += 1; } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->is_set_static_routes_only) { - ARG_TO_JSON(StaticRoutesOnly, bool, args->static_routes_only); - ret += 1; + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_vms_state_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } - if (args->virtual_gateway_id) { + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VirtualGatewayId\":", args->virtual_gateway_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadVmsState"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_vpn_connection(struct osc_env *e, struct osc_str *out, struct osc_create_vpn_connection_arg *args) +int osc_read_vms_state(struct osc_env *e, struct osc_str *out, struct osc_read_vms_state_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_vpn_connection_data(args, &data); + r = read_vms_state_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateVpnConnection"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_volume_data(struct osc_create_volume_arg *args, struct osc_str *data) +static int read_volumes_data(struct osc_env *e, struct osc_read_volumes_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->is_set_iops || args->iops) { - ARG_TO_JSON(Iops, int, args->iops); - ret += 1; - } - if (args->is_set_size || args->size) { - ARG_TO_JSON(Size, int, args->size); - ret += 1; - } - if (args->snapshot_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SnapshotId\":", args->snapshot_id); - ret += 1; + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_volume_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } - if (args->subregion_name) { + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SubregionName\":", args->subregion_name); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); ret += 1; } - if (args->volume_type) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VolumeType\":", args->volume_type); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadVolumes"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_volume(struct osc_env *e, struct osc_str *out, struct osc_create_volume_arg *args) +int osc_read_volumes(struct osc_env *e, struct osc_str *out, struct osc_read_volumes_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_volume_data(args, &data); + r = read_volumes_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateVolume"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_vms_data(struct osc_create_vms_arg *args, struct osc_str *data) +static int read_vpn_connections_data(struct osc_env *e, struct osc_read_vpn_connections_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->block_device_mappings) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"BlockDeviceMappings\":[" )); - for (int i = 0; i < args->nb_block_device_mappings; ++i) { - struct block_device_mapping_vm_creation *p = &args->block_device_mappings[i]; - if (p != args->block_device_mappings) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(block_device_mapping_vm_creation_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->block_device_mappings_str) { - ARG_TO_JSON(BlockDeviceMappings, string, args->block_device_mappings_str); - ret += 1; - } - if (args->is_set_boot_on_creation) { - ARG_TO_JSON(BootOnCreation, bool, args->boot_on_creation); - ret += 1; - } - if (args->is_set_bsu_optimized) { - ARG_TO_JSON(BsuOptimized, bool, args->bsu_optimized); - ret += 1; - } - if (args->client_token) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ClientToken\":", args->client_token); - ret += 1; - } - if (args->is_set_deletion_protection) { - ARG_TO_JSON(DeletionProtection, bool, args->deletion_protection); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->image_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ImageId\":", args->image_id); - ret += 1; + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_vpn_connection_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } - if (args->keypair_name) { + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"KeypairName\":", args->keypair_name); - ret += 1; - } - if (args->is_set_max_vms_count || args->max_vms_count) { - ARG_TO_JSON(MaxVmsCount, int, args->max_vms_count); - ret += 1; - } - if (args->is_set_min_vms_count || args->min_vms_count) { - ARG_TO_JSON(MinVmsCount, int, args->min_vms_count); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); ret += 1; } - if (args->is_set_nested_virtualization) { - ARG_TO_JSON(NestedVirtualization, bool, args->nested_virtualization); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } - if (args->nics) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Nics\":[" )); - for (int i = 0; i < args->nb_nics; ++i) { - struct nic_for_vm_creation *p = &args->nics[i]; - if (p != args->nics) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(nic_for_vm_creation_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->nics_str) { - ARG_TO_JSON(Nics, string, args->nics_str); - ret += 1; + osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ReadVpnConnections"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); + return !!ret; +} + +int osc_read_vpn_connections(struct osc_env *e, struct osc_str *out, struct osc_read_vpn_connections_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + int r; + + osc_init_str(&data); + r = read_vpn_connections_data(e, args, &data); + if (r < 0) + goto out; + + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); } - if (args->performance) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Performance\":", args->performance); + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&data); + return res; +} +static int reboot_vms_data(struct osc_env *e, struct osc_reboot_vms_arg *args, struct osc_str *data) +{ + struct osc_str end_call; + int ret = 0; + int count_args = 0; + + (void)count_args; /* if use only query/header and path, this is unused */ + if (!args) + return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->placement_str) { - ARG_TO_JSON(Placement, string, args->placement_str); - ret += 1; - } else if (args->is_set_placement) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Placement\": { " )); - STRY(placement_setter(&args->placement, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } - if (args->private_ips) { + if (args->vm_ids) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"PrivateIps\":[" )); - for (as = args->private_ips; *as; ++as) { - if (as != args->private_ips) + STRY(osc_str_append_string(data, "\"VmIds\":[" )); + for (as = args->vm_ids; *as; ++as) { + if (as != args->vm_ids) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->private_ips_str) { - ARG_TO_JSON(PrivateIps, string, args->private_ips_str); + } else if (args->vm_ids_str) { + ARG_TO_JSON(VmIds, string, args->vm_ids_str); ret += 1; } - if (args->security_group_ids) { - char **as; + osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/RebootVms"); - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"SecurityGroupIds\":[" )); - for (as = args->security_group_ids; *as; ++as) { - if (as != args->security_group_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->security_group_ids_str) { - ARG_TO_JSON(SecurityGroupIds, string, args->security_group_ids_str); - ret += 1; + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); + return !!ret; +} + +int osc_reboot_vms(struct osc_env *e, struct osc_str *out, struct osc_reboot_vms_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + int r; + + osc_init_str(&data); + r = reboot_vms_data(e, args, &data); + if (r < 0) + goto out; + + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); } - if (args->security_groups) { + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&data); + return res; +} +static int register_vms_in_load_balancer_data(struct osc_env *e, struct osc_register_vms_in_load_balancer_arg *args, struct osc_str *data) +{ + struct osc_str end_call; + int ret = 0; + int count_args = 0; + + (void)count_args; /* if use only query/header and path, this is unused */ + if (!args) + return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->backend_vm_ids) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"SecurityGroups\":[" )); - for (as = args->security_groups; *as; ++as) { - if (as != args->security_groups) + STRY(osc_str_append_string(data, "\"BackendVmIds\":[" )); + for (as = args->backend_vm_ids; *as; ++as) { + if (as != args->backend_vm_ids) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->security_groups_str) { - ARG_TO_JSON(SecurityGroups, string, args->security_groups_str); + } else if (args->backend_vm_ids_str) { + ARG_TO_JSON(BackendVmIds, string, args->backend_vm_ids_str); ret += 1; } - if (args->subnet_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); - ret += 1; - } - if (args->user_data) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserData\":", args->user_data); - ret += 1; - } - if (args->vm_initiated_shutdown_behavior) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmInitiatedShutdownBehavior\":", args->vm_initiated_shutdown_behavior); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->vm_type) { + if (args->load_balancer_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmType\":", args->vm_type); + ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/RegisterVmsInLoadBalancer"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_vms(struct osc_env *e, struct osc_str *out, struct osc_create_vms_arg *args) +int osc_register_vms_in_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_register_vms_in_load_balancer_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_vms_data(args, &data); + r = register_vms_in_load_balancer_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateVms"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_vm_template_data(struct osc_create_vm_template_arg *args, struct osc_str *data) +static int reject_net_peering_data(struct osc_env *e, struct osc_reject_net_peering_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_cpu_cores || args->cpu_cores) { - ARG_TO_JSON(CpuCores, int, args->cpu_cores); - ret += 1; - } - if (args->cpu_generation) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"CpuGeneration\":", args->cpu_generation); - ret += 1; - } - if (args->cpu_performance) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"CpuPerformance\":", args->cpu_performance); - ret += 1; - } - if (args->description) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Description\":", args->description); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->image_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ImageId\":", args->image_id); - ret += 1; - } - if (args->keypair_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"KeypairName\":", args->keypair_name); - ret += 1; - } - if (args->is_set_ram || args->ram) { - ARG_TO_JSON(Ram, int, args->ram); - ret += 1; - } - if (args->tags) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Tags\":[" )); - for (int i = 0; i < args->nb_tags; ++i) { - struct resource_tag *p = &args->tags[i]; - if (p != args->tags) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(resource_tag_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->tags_str) { - ARG_TO_JSON(Tags, string, args->tags_str); - ret += 1; - } - if (args->vm_template_name) { + if (args->net_peering_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmTemplateName\":", args->vm_template_name); + ARG_TO_JSON_STR("\"NetPeeringId\":", args->net_peering_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/RejectNetPeering"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_vm_template(struct osc_env *e, struct osc_str *out, struct osc_create_vm_template_arg *args) +int osc_reject_net_peering(struct osc_env *e, struct osc_str *out, struct osc_reject_net_peering_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_vm_template_data(args, &data); + r = reject_net_peering_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateVmTemplate"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_vm_group_data(struct osc_create_vm_group_arg *args, struct osc_str *data) +static int remove_user_from_user_group_data(struct osc_env *e, struct osc_remove_user_from_user_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->description) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Description\":", args->description); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->positioning_strategy) { + if (args->user_group_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PositioningStrategy\":", args->positioning_strategy); + ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); ret += 1; } - if (args->security_group_ids) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"SecurityGroupIds\":[" )); - for (as = args->security_group_ids; *as; ++as) { - if (as != args->security_group_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->security_group_ids_str) { - ARG_TO_JSON(SecurityGroupIds, string, args->security_group_ids_str); - ret += 1; - } - if (args->subnet_id) { + if (args->user_group_path) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); - ret += 1; - } - if (args->tags) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Tags\":[" )); - for (int i = 0; i < args->nb_tags; ++i) { - struct resource_tag *p = &args->tags[i]; - if (p != args->tags) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(resource_tag_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->tags_str) { - ARG_TO_JSON(Tags, string, args->tags_str); - ret += 1; - } - if (args->is_set_vm_count || args->vm_count) { - ARG_TO_JSON(VmCount, int, args->vm_count); + ARG_TO_JSON_STR("\"UserGroupPath\":", args->user_group_path); ret += 1; } - if (args->vm_group_name) { + if (args->user_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmGroupName\":", args->vm_group_name); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); ret += 1; } - if (args->vm_template_id) { + if (args->user_path) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmTemplateId\":", args->vm_template_id); + ARG_TO_JSON_STR("\"UserPath\":", args->user_path); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/RemoveUserFromUserGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_vm_group(struct osc_env *e, struct osc_str *out, struct osc_create_vm_group_arg *args) +int osc_remove_user_from_user_group(struct osc_env *e, struct osc_str *out, struct osc_remove_user_from_user_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_vm_group_data(args, &data); + r = remove_user_from_user_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateVmGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_virtual_gateway_data(struct osc_create_virtual_gateway_arg *args, struct osc_str *data) +static int scale_down_vm_group_data(struct osc_env *e, struct osc_scale_down_vm_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->connection_type) { + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->vm_group_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ConnectionType\":", args->connection_type); + ARG_TO_JSON_STR("\"VmGroupId\":", args->vm_group_id); ret += 1; } - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->is_set_vm_subtraction || args->vm_subtraction) { + ARG_TO_JSON(VmSubtraction, int, args->vm_subtraction); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ScaleDownVmGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_create_virtual_gateway_arg *args) +int osc_scale_down_vm_group(struct osc_env *e, struct osc_str *out, struct osc_scale_down_vm_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_virtual_gateway_data(args, &data); + r = scale_down_vm_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateVirtualGateway"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_user_group_data(struct osc_create_user_group_arg *args, struct osc_str *data) +static int scale_up_vm_group_data(struct osc_env *e, struct osc_scale_up_vm_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->path) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Path\":", args->path); + if (args->is_set_vm_addition || args->vm_addition) { + ARG_TO_JSON(VmAddition, int, args->vm_addition); ret += 1; } - if (args->user_group_name) { + if (args->vm_group_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); + ARG_TO_JSON_STR("\"VmGroupId\":", args->vm_group_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/ScaleUpVmGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_user_group(struct osc_env *e, struct osc_str *out, struct osc_create_user_group_arg *args) +int osc_scale_up_vm_group(struct osc_env *e, struct osc_str *out, struct osc_scale_up_vm_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_user_group_data(args, &data); + r = scale_up_vm_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateUserGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_user_data(struct osc_create_user_arg *args, struct osc_str *data) +static int set_default_policy_version_data(struct osc_env *e, struct osc_set_default_policy_version_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->path) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Path\":", args->path); - ret += 1; - } - if (args->user_email) { + if (args->policy_orn) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserEmail\":", args->user_email); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); ret += 1; } - if (args->user_name) { + if (args->version_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ARG_TO_JSON_STR("\"VersionId\":", args->version_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/SetDefaultPolicyVersion"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_user(struct osc_env *e, struct osc_str *out, struct osc_create_user_arg *args) +int osc_set_default_policy_version(struct osc_env *e, struct osc_str *out, struct osc_set_default_policy_version_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_user_data(args, &data); + r = set_default_policy_version_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateUser"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_tags_data(struct osc_create_tags_arg *args, struct osc_str *data) +static int start_vms_data(struct osc_env *e, struct osc_start_vms_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->resource_ids) { + if (args->vm_ids) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"ResourceIds\":[" )); - for (as = args->resource_ids; *as; ++as) { - if (as != args->resource_ids) + STRY(osc_str_append_string(data, "\"VmIds\":[" )); + for (as = args->vm_ids; *as; ++as) { + if (as != args->vm_ids) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->resource_ids_str) { - ARG_TO_JSON(ResourceIds, string, args->resource_ids_str); + } else if (args->vm_ids_str) { + ARG_TO_JSON(VmIds, string, args->vm_ids_str); ret += 1; } - if (args->tags) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Tags\":[" )); - for (int i = 0; i < args->nb_tags; ++i) { - struct resource_tag *p = &args->tags[i]; - if (p != args->tags) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(resource_tag_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); + osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/StartVms"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); + return !!ret; +} + +int osc_start_vms(struct osc_env *e, struct osc_str *out, struct osc_start_vms_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + int r; + + osc_init_str(&data); + r = start_vms_data(e, args, &data); + if (r < 0) + goto out; + + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&data); + return res; +} +static int stop_vms_data(struct osc_env *e, struct osc_stop_vms_arg *args, struct osc_str *data) +{ + struct osc_str end_call; + int ret = 0; + int count_args = 0; + + (void)count_args; /* if use only query/header and path, this is unused */ + if (!args) + return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->is_set_force_stop) { + ARG_TO_JSON(ForceStop, bool, args->force_stop); + ret += 1; + } + if (args->vm_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"VmIds\":[" )); + for (as = args->vm_ids; *as; ++as) { + if (as != args->vm_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else - if (args->tags_str) { - ARG_TO_JSON(Tags, string, args->tags_str); + } else if (args->vm_ids_str) { + ARG_TO_JSON(VmIds, string, args->vm_ids_str); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/StopVms"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_tags(struct osc_env *e, struct osc_str *out, struct osc_create_tags_arg *args) +int osc_stop_vms(struct osc_env *e, struct osc_str *out, struct osc_stop_vms_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_tags_data(args, &data); + r = stop_vms_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateTags"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_subnet_data(struct osc_create_subnet_arg *args, struct osc_str *data) +static int unlink_flexible_gpu_data(struct osc_env *e, struct osc_unlink_flexible_gpu_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->ip_range) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"IpRange\":", args->ip_range); - ret += 1; - } - if (args->net_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetId\":", args->net_id); - ret += 1; - } - if (args->subregion_name) { + if (args->flexible_gpu_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SubregionName\":", args->subregion_name); + ARG_TO_JSON_STR("\"FlexibleGpuId\":", args->flexible_gpu_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UnlinkFlexibleGpu"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_subnet(struct osc_env *e, struct osc_str *out, struct osc_create_subnet_arg *args) +int osc_unlink_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_unlink_flexible_gpu_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_subnet_data(args, &data); + r = unlink_flexible_gpu_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateSubnet"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_snapshot_export_task_data(struct osc_create_snapshot_export_task_arg *args, struct osc_str *data) +static int unlink_internet_service_data(struct osc_env *e, struct osc_unlink_internet_service_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->osu_export_str) { - ARG_TO_JSON(OsuExport, string, args->osu_export_str); - ret += 1; - } else if (args->is_set_osu_export) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"OsuExport\": { " )); - STRY(osu_export_to_create_setter(&args->osu_export, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + if (args->internet_service_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"InternetServiceId\":", args->internet_service_id); + ret += 1; } - if (args->snapshot_id) { + if (args->net_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SnapshotId\":", args->snapshot_id); + ARG_TO_JSON_STR("\"NetId\":", args->net_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UnlinkInternetService"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_snapshot_export_task(struct osc_env *e, struct osc_str *out, struct osc_create_snapshot_export_task_arg *args) +int osc_unlink_internet_service(struct osc_env *e, struct osc_str *out, struct osc_unlink_internet_service_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_snapshot_export_task_data(args, &data); + r = unlink_internet_service_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateSnapshotExportTask"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_snapshot_data(struct osc_create_snapshot_arg *args, struct osc_str *data) +static int unlink_load_balancer_backend_machines_data(struct osc_env *e, struct osc_unlink_load_balancer_backend_machines_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->description) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Description\":", args->description); - ret += 1; + if (args->backend_ips) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"BackendIps\":[" )); + for (as = args->backend_ips; *as; ++as) { + if (as != args->backend_ips) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->backend_ips_str) { + ARG_TO_JSON(BackendIps, string, args->backend_ips_str); + ret += 1; + } + if (args->backend_vm_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"BackendVmIds\":[" )); + for (as = args->backend_vm_ids; *as; ++as) { + if (as != args->backend_vm_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->backend_vm_ids_str) { + ARG_TO_JSON(BackendVmIds, string, args->backend_vm_ids_str); + ret += 1; } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->file_location) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"FileLocation\":", args->file_location); - ret += 1; - } - if (args->is_set_snapshot_size || args->snapshot_size) { - ARG_TO_JSON(SnapshotSize, int, args->snapshot_size); - ret += 1; - } - if (args->source_region_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SourceRegionName\":", args->source_region_name); - ret += 1; - } - if (args->source_snapshot_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SourceSnapshotId\":", args->source_snapshot_id); - ret += 1; - } - if (args->volume_id) { + if (args->load_balancer_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VolumeId\":", args->volume_id); + ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UnlinkLoadBalancerBackendMachines"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_snapshot(struct osc_env *e, struct osc_str *out, struct osc_create_snapshot_arg *args) +int osc_unlink_load_balancer_backend_machines(struct osc_env *e, struct osc_str *out, struct osc_unlink_load_balancer_backend_machines_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_snapshot_data(args, &data); + r = unlink_load_balancer_backend_machines_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateSnapshot"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_server_certificate_data(struct osc_create_server_certificate_arg *args, struct osc_str *data) +static int unlink_managed_policy_from_user_group_data(struct osc_env *e, struct osc_unlink_managed_policy_from_user_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->body) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Body\":", args->body); - ret += 1; - } - if (args->chain) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Chain\":", args->chain); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Name\":", args->name); - ret += 1; - } - if (args->path) { + if (args->policy_orn) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Path\":", args->path); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); ret += 1; } - if (args->private_key) { + if (args->user_group_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PrivateKey\":", args->private_key); + ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UnlinkManagedPolicyFromUserGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_server_certificate(struct osc_env *e, struct osc_str *out, struct osc_create_server_certificate_arg *args) +int osc_unlink_managed_policy_from_user_group(struct osc_env *e, struct osc_str *out, struct osc_unlink_managed_policy_from_user_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_server_certificate_data(args, &data); + r = unlink_managed_policy_from_user_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateServerCertificate"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_security_group_rule_data(struct osc_create_security_group_rule_arg *args, struct osc_str *data) +static int unlink_nic_data(struct osc_env *e, struct osc_unlink_nic_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->flow) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Flow\":", args->flow); - ret += 1; - } - if (args->is_set_from_port_range || args->from_port_range) { - ARG_TO_JSON(FromPortRange, int, args->from_port_range); - ret += 1; - } - if (args->ip_protocol) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"IpProtocol\":", args->ip_protocol); - ret += 1; - } - if (args->ip_range) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"IpRange\":", args->ip_range); - ret += 1; - } - if (args->rules) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Rules\":[" )); - for (int i = 0; i < args->nb_rules; ++i) { - struct security_group_rule *p = &args->rules[i]; - if (p != args->rules) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(security_group_rule_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->rules_str) { - ARG_TO_JSON(Rules, string, args->rules_str); - ret += 1; - } - if (args->security_group_account_id_to_link) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SecurityGroupAccountIdToLink\":", args->security_group_account_id_to_link); - ret += 1; - } - if (args->security_group_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SecurityGroupId\":", args->security_group_id); - ret += 1; - } - if (args->security_group_name_to_link) { + if (args->link_nic_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SecurityGroupNameToLink\":", args->security_group_name_to_link); - ret += 1; - } - if (args->is_set_to_port_range || args->to_port_range) { - ARG_TO_JSON(ToPortRange, int, args->to_port_range); + ARG_TO_JSON_STR("\"LinkNicId\":", args->link_nic_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UnlinkNic"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_security_group_rule(struct osc_env *e, struct osc_str *out, struct osc_create_security_group_rule_arg *args) +int osc_unlink_nic(struct osc_env *e, struct osc_str *out, struct osc_unlink_nic_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_security_group_rule_data(args, &data); + r = unlink_nic_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateSecurityGroupRule"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_security_group_data(struct osc_create_security_group_arg *args, struct osc_str *data) +static int unlink_policy_data(struct osc_env *e, struct osc_unlink_policy_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->description) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Description\":", args->description); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->net_id) { + if (args->policy_orn) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetId\":", args->net_id); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); ret += 1; } - if (args->security_group_name) { + if (args->user_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SecurityGroupName\":", args->security_group_name); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UnlinkPolicy"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_security_group(struct osc_env *e, struct osc_str *out, struct osc_create_security_group_arg *args) +int osc_unlink_policy(struct osc_env *e, struct osc_str *out, struct osc_unlink_policy_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_security_group_data(args, &data); + r = unlink_policy_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateSecurityGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_route_table_data(struct osc_create_route_table_arg *args, struct osc_str *data) +static int unlink_private_ips_data(struct osc_env *e, struct osc_unlink_private_ips_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->net_id) { + if (args->nic_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetId\":", args->net_id); + ARG_TO_JSON_STR("\"NicId\":", args->nic_id); ret += 1; } + if (args->private_ips) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"PrivateIps\":[" )); + for (as = args->private_ips; *as; ++as) { + if (as != args->private_ips) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->private_ips_str) { + ARG_TO_JSON(PrivateIps, string, args->private_ips_str); + ret += 1; + } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UnlinkPrivateIps"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_route_table(struct osc_env *e, struct osc_str *out, struct osc_create_route_table_arg *args) +int osc_unlink_private_ips(struct osc_env *e, struct osc_str *out, struct osc_unlink_private_ips_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_route_table_data(args, &data); + r = unlink_private_ips_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateRouteTable"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_route_data(struct osc_create_route_arg *args, struct osc_str *data) +static int unlink_public_ip_data(struct osc_env *e, struct osc_unlink_public_ip_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->destination_ip_range) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DestinationIpRange\":", args->destination_ip_range); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->gateway_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"GatewayId\":", args->gateway_id); - ret += 1; - } - if (args->nat_service_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NatServiceId\":", args->nat_service_id); - ret += 1; - } - if (args->net_peering_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetPeeringId\":", args->net_peering_id); - ret += 1; - } - if (args->nic_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NicId\":", args->nic_id); - ret += 1; - } - if (args->route_table_id) { + if (args->link_public_ip_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); + ARG_TO_JSON_STR("\"LinkPublicIpId\":", args->link_public_ip_id); ret += 1; } - if (args->vm_id) { + if (args->public_ip) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmId\":", args->vm_id); + ARG_TO_JSON_STR("\"PublicIp\":", args->public_ip); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UnlinkPublicIp"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_route(struct osc_env *e, struct osc_str *out, struct osc_create_route_arg *args) +int osc_unlink_public_ip(struct osc_env *e, struct osc_str *out, struct osc_unlink_public_ip_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_route_data(args, &data); + r = unlink_public_ip_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateRoute"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_public_ip_data(struct osc_create_public_ip_arg *args, struct osc_str *data) +static int unlink_route_table_data(struct osc_env *e, struct osc_unlink_route_table_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } + if (args->link_route_table_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"LinkRouteTableId\":", args->link_route_table_id); + ret += 1; + } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UnlinkRouteTable"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_public_ip(struct osc_env *e, struct osc_str *out, struct osc_create_public_ip_arg *args) +int osc_unlink_route_table(struct osc_env *e, struct osc_str *out, struct osc_unlink_route_table_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_public_ip_data(args, &data); + r = unlink_route_table_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreatePublicIp"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_product_type_data(struct osc_create_product_type_arg *args, struct osc_str *data) +static int unlink_virtual_gateway_data(struct osc_env *e, struct osc_unlink_virtual_gateway_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->description) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Description\":", args->description); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->vendor) { + if (args->net_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Vendor\":", args->vendor); + ARG_TO_JSON_STR("\"NetId\":", args->net_id); + ret += 1; + } + if (args->virtual_gateway_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VirtualGatewayId\":", args->virtual_gateway_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UnlinkVirtualGateway"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_product_type(struct osc_env *e, struct osc_str *out, struct osc_create_product_type_arg *args) +int osc_unlink_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_unlink_virtual_gateway_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_product_type_data(args, &data); + r = unlink_virtual_gateway_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateProductType"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_policy_version_data(struct osc_create_policy_version_arg *args, struct osc_str *data) +static int unlink_volume_data(struct osc_env *e, struct osc_unlink_volume_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->document) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Document\":", args->document); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->policy_orn) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + if (args->is_set_force_unlink) { + ARG_TO_JSON(ForceUnlink, bool, args->force_unlink); ret += 1; } - if (args->is_set_set_as_default) { - ARG_TO_JSON(SetAsDefault, bool, args->set_as_default); + if (args->volume_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VolumeId\":", args->volume_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UnlinkVolume"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_policy_version(struct osc_env *e, struct osc_str *out, struct osc_create_policy_version_arg *args) +int osc_unlink_volume(struct osc_env *e, struct osc_str *out, struct osc_unlink_volume_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_policy_version_data(args, &data); + r = unlink_volume_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreatePolicyVersion"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_policy_data(struct osc_create_policy_arg *args, struct osc_str *data) +static int update_access_key_data(struct osc_env *e, struct osc_update_access_key_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->description) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Description\":", args->description); - ret += 1; - } - if (args->document) { + if (args->access_key_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Document\":", args->document); + ARG_TO_JSON_STR("\"AccessKeyId\":", args->access_key_id); ret += 1; } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->path) { + if (args->expiration_date) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Path\":", args->path); + ARG_TO_JSON_STR("\"ExpirationDate\":", args->expiration_date); ret += 1; } - if (args->policy_name) { + if (args->state) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); + ARG_TO_JSON_STR("\"State\":", args->state); + ret += 1; + } + if (args->user_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateAccessKey"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_policy(struct osc_env *e, struct osc_str *out, struct osc_create_policy_arg *args) +int osc_update_access_key(struct osc_env *e, struct osc_str *out, struct osc_update_access_key_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_policy_data(args, &data); + r = update_access_key_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreatePolicy"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_nic_data(struct osc_create_nic_arg *args, struct osc_str *data) +static int update_account_data(struct osc_env *e, struct osc_update_account_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->description) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Description\":", args->description); - ret += 1; - } - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->private_ips) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"PrivateIps\":[" )); - for (int i = 0; i < args->nb_private_ips; ++i) { - struct private_ip_light *p = &args->private_ips[i]; - if (p != args->private_ips) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(private_ip_light_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->private_ips_str) { - ARG_TO_JSON(PrivateIps, string, args->private_ips_str); - ret += 1; - } - if (args->security_group_ids) { + if (args->additional_emails) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"SecurityGroupIds\":[" )); - for (as = args->security_group_ids; *as; ++as) { - if (as != args->security_group_ids) + STRY(osc_str_append_string(data, "\"AdditionalEmails\":[" )); + for (as = args->additional_emails; *as; ++as) { + if (as != args->additional_emails) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->security_group_ids_str) { - ARG_TO_JSON(SecurityGroupIds, string, args->security_group_ids_str); + } else if (args->additional_emails_str) { + ARG_TO_JSON(AdditionalEmails, string, args->additional_emails_str); ret += 1; } - if (args->subnet_id) { + if (args->city) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"City\":", args->city); + ret += 1; + } + if (args->company_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"CompanyName\":", args->company_name); + ret += 1; + } + if (args->country) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Country\":", args->country); + ret += 1; + } + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->email) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Email\":", args->email); + ret += 1; + } + if (args->first_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"FirstName\":", args->first_name); + ret += 1; + } + if (args->job_title) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"JobTitle\":", args->job_title); + ret += 1; + } + if (args->last_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"LastName\":", args->last_name); + ret += 1; + } + if (args->mobile_number) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"MobileNumber\":", args->mobile_number); + ret += 1; + } + if (args->phone_number) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); + ARG_TO_JSON_STR("\"PhoneNumber\":", args->phone_number); + ret += 1; + } + if (args->state_province) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"StateProvince\":", args->state_province); + ret += 1; + } + if (args->vat_number) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VatNumber\":", args->vat_number); + ret += 1; + } + if (args->zip_code) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ZipCode\":", args->zip_code); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateAccount"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_nic(struct osc_env *e, struct osc_str *out, struct osc_create_nic_arg *args) +int osc_update_account(struct osc_env *e, struct osc_str *out, struct osc_update_account_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_nic_data(args, &data); + r = update_account_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateNic"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_net_peering_data(struct osc_create_net_peering_arg *args, struct osc_str *data) +static int update_api_access_policy_data(struct osc_env *e, struct osc_update_api_access_policy_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->accepter_net_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"AccepterNetId\":", args->accepter_net_id); - ret += 1; - } - if (args->accepter_owner_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"AccepterOwnerId\":", args->accepter_owner_id); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->source_net_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SourceNetId\":", args->source_net_id); + if (args->is_set_max_access_key_expiration_seconds || args->max_access_key_expiration_seconds) { + ARG_TO_JSON(MaxAccessKeyExpirationSeconds, int, args->max_access_key_expiration_seconds); + ret += 1; + } + if (args->is_set_require_trusted_env) { + ARG_TO_JSON(RequireTrustedEnv, bool, args->require_trusted_env); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateApiAccessPolicy"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_net_peering(struct osc_env *e, struct osc_str *out, struct osc_create_net_peering_arg *args) +int osc_update_api_access_policy(struct osc_env *e, struct osc_str *out, struct osc_update_api_access_policy_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_net_peering_data(args, &data); + r = update_api_access_policy_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateNetPeering"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_net_access_point_data(struct osc_create_net_access_point_arg *args, struct osc_str *data) +static int update_api_access_rule_data(struct osc_env *e, struct osc_update_api_access_rule_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->net_id) { + if (args->api_access_rule_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetId\":", args->net_id); + ARG_TO_JSON_STR("\"ApiAccessRuleId\":", args->api_access_rule_id); ret += 1; } - if (args->route_table_ids) { + if (args->ca_ids) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"RouteTableIds\":[" )); - for (as = args->route_table_ids; *as; ++as) { - if (as != args->route_table_ids) + STRY(osc_str_append_string(data, "\"CaIds\":[" )); + for (as = args->ca_ids; *as; ++as) { + if (as != args->ca_ids) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->route_table_ids_str) { - ARG_TO_JSON(RouteTableIds, string, args->route_table_ids_str); + } else if (args->ca_ids_str) { + ARG_TO_JSON(CaIds, string, args->ca_ids_str); ret += 1; } - if (args->service_name) { + if (args->cns) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Cns\":[" )); + for (as = args->cns; *as; ++as) { + if (as != args->cns) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->cns_str) { + ARG_TO_JSON(Cns, string, args->cns_str); + ret += 1; + } + if (args->description) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ServiceName\":", args->service_name); + ARG_TO_JSON_STR("\"Description\":", args->description); ret += 1; } - osc_str_append_string(data, "}"); - return !!ret; -} - -int osc_create_net_access_point(struct osc_env *e, struct osc_str *out, struct osc_create_net_access_point_arg *args) -{ - CURLcode res = CURLE_OUT_OF_MEMORY; - struct osc_str data; - struct osc_str end_call; - int r; - - osc_init_str(&data); - osc_init_str(&end_call); - r = create_net_access_point_data(args, &data); - if (r < 0) - goto out; - - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateNetAccessPoint"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); - curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); - if (e->flag & OSC_VERBOSE_MODE) { - printf("\n%s\n\n", data.buf); - } - res = curl_easy_perform(e->c); -out: - osc_deinit_str(&end_call); - osc_deinit_str(&data); - return res; -} -static int create_net_data(struct osc_create_net_arg *args, struct osc_str *data) -{ - int ret = 0; - int count_args = 0; - - if (!args) - return 0; - osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->ip_range) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"IpRange\":", args->ip_range); - ret += 1; - } - if (args->tenancy) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Tenancy\":", args->tenancy); - ret += 1; + if (args->ip_ranges) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"IpRanges\":[" )); + for (as = args->ip_ranges; *as; ++as) { + if (as != args->ip_ranges) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->ip_ranges_str) { + ARG_TO_JSON(IpRanges, string, args->ip_ranges_str); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateApiAccessRule"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_net(struct osc_env *e, struct osc_str *out, struct osc_create_net_arg *args) +int osc_update_api_access_rule(struct osc_env *e, struct osc_str *out, struct osc_update_api_access_rule_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_net_data(args, &data); + r = update_api_access_rule_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateNet"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_nat_service_data(struct osc_create_nat_service_arg *args, struct osc_str *data) +static int update_ca_data(struct osc_env *e, struct osc_update_ca_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->client_token) { + if (args->ca_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ClientToken\":", args->client_token); - ret += 1; - } - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + ARG_TO_JSON_STR("\"CaId\":", args->ca_id); ret += 1; } - if (args->public_ip_id) { + if (args->description) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PublicIpId\":", args->public_ip_id); + ARG_TO_JSON_STR("\"Description\":", args->description); ret += 1; } - if (args->subnet_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateCa"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_nat_service(struct osc_env *e, struct osc_str *out, struct osc_create_nat_service_arg *args) +int osc_update_ca(struct osc_env *e, struct osc_str *out, struct osc_update_ca_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_nat_service_data(args, &data); + r = update_ca_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateNatService"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_load_balancer_tags_data(struct osc_create_load_balancer_tags_arg *args, struct osc_str *data) +static int update_dedicated_group_data(struct osc_env *e, struct osc_update_dedicated_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; - osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->load_balancer_names) { - char **as; - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"LoadBalancerNames\":[" )); - for (as = args->load_balancer_names; *as; ++as) { - if (as != args->load_balancer_names) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->load_balancer_names_str) { - ARG_TO_JSON(LoadBalancerNames, string, args->load_balancer_names_str); - ret += 1; - } - if (args->tags) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Tags\":[" )); - for (int i = 0; i < args->nb_tags; ++i) { - struct resource_tag *p = &args->tags[i]; - if (p != args->tags) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(resource_tag_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->tags_str) { - ARG_TO_JSON(Tags, string, args->tags_str); - ret += 1; + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->dedicated_group_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"DedicatedGroupId\":", args->dedicated_group_id); + ret += 1; + } + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Name\":", args->name); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateDedicatedGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_tags_arg *args) +int osc_update_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_update_dedicated_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_load_balancer_tags_data(args, &data); + r = update_dedicated_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateLoadBalancerTags"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_load_balancer_policy_data(struct osc_create_load_balancer_policy_arg *args, struct osc_str *data) +static int update_direct_link_interface_data(struct osc_env *e, struct osc_update_direct_link_interface_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_cookie_expiration_period || args->cookie_expiration_period) { - ARG_TO_JSON(CookieExpirationPeriod, int, args->cookie_expiration_period); - ret += 1; - } - if (args->cookie_name) { + if (args->direct_link_interface_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"CookieName\":", args->cookie_name); + ARG_TO_JSON_STR("\"DirectLinkInterfaceId\":", args->direct_link_interface_id); ret += 1; } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->load_balancer_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); - ret += 1; - } - if (args->policy_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); - ret += 1; - } - if (args->policy_type) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PolicyType\":", args->policy_type); + if (args->is_set_mtu || args->mtu) { + ARG_TO_JSON(Mtu, int, args->mtu); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateDirectLinkInterface"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_load_balancer_policy(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_policy_arg *args) +int osc_update_direct_link_interface(struct osc_env *e, struct osc_str *out, struct osc_update_direct_link_interface_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_load_balancer_policy_data(args, &data); + r = update_direct_link_interface_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateLoadBalancerPolicy"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_load_balancer_listeners_data(struct osc_create_load_balancer_listeners_arg *args, struct osc_str *data) +static int update_flexible_gpu_data(struct osc_env *e, struct osc_update_flexible_gpu_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->is_set_delete_on_vm_deletion) { + ARG_TO_JSON(DeleteOnVmDeletion, bool, args->delete_on_vm_deletion); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->listeners) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Listeners\":[" )); - for (int i = 0; i < args->nb_listeners; ++i) { - struct listener_for_creation *p = &args->listeners[i]; - if (p != args->listeners) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(listener_for_creation_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->listeners_str) { - ARG_TO_JSON(Listeners, string, args->listeners_str); - ret += 1; - } - if (args->load_balancer_name) { + if (args->flexible_gpu_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); + ARG_TO_JSON_STR("\"FlexibleGpuId\":", args->flexible_gpu_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateFlexibleGpu"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_load_balancer_listeners(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_listeners_arg *args) +int osc_update_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_update_flexible_gpu_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_load_balancer_listeners_data(args, &data); + r = update_flexible_gpu_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateLoadBalancerListeners"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_load_balancer_data(struct osc_create_load_balancer_arg *args, struct osc_str *data) +static int update_image_data(struct osc_env *e, struct osc_update_image_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->listeners) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Listeners\":[" )); - for (int i = 0; i < args->nb_listeners; ++i) { - struct listener_for_creation *p = &args->listeners[i]; - if (p != args->listeners) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(listener_for_creation_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->listeners_str) { - ARG_TO_JSON(Listeners, string, args->listeners_str); - ret += 1; - } - if (args->load_balancer_name) { + if (args->description) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); + ARG_TO_JSON_STR("\"Description\":", args->description); ret += 1; } - if (args->load_balancer_type) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LoadBalancerType\":", args->load_balancer_type); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->public_ip) { + if (args->image_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PublicIp\":", args->public_ip); + ARG_TO_JSON_STR("\"ImageId\":", args->image_id); ret += 1; } - if (args->security_groups) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"SecurityGroups\":[" )); - for (as = args->security_groups; *as; ++as) { - if (as != args->security_groups) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->security_groups_str) { - ARG_TO_JSON(SecurityGroups, string, args->security_groups_str); - ret += 1; - } - if (args->subnets) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Subnets\":[" )); - for (as = args->subnets; *as; ++as) { - if (as != args->subnets) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->subnets_str) { - ARG_TO_JSON(Subnets, string, args->subnets_str); - ret += 1; - } - if (args->subregion_names) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"SubregionNames\":[" )); - for (as = args->subregion_names; *as; ++as) { - if (as != args->subregion_names) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->subregion_names_str) { - ARG_TO_JSON(SubregionNames, string, args->subregion_names_str); - ret += 1; - } - if (args->tags) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Tags\":[" )); - for (int i = 0; i < args->nb_tags; ++i) { - struct resource_tag *p = &args->tags[i]; - if (p != args->tags) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(resource_tag_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->tags_str) { - ARG_TO_JSON(Tags, string, args->tags_str); + if (args->permissions_to_launch_str) { + ARG_TO_JSON(PermissionsToLaunch, string, args->permissions_to_launch_str); ret += 1; + } else if (args->is_set_permissions_to_launch) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"PermissionsToLaunch\": { " )); + STRY(permissions_on_resource_creation_setter(&args->permissions_to_launch, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateImage"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_arg *args) +int osc_update_image(struct osc_env *e, struct osc_str *out, struct osc_update_image_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_load_balancer_data(args, &data); + r = update_image_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateLoadBalancer"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_listener_rule_data(struct osc_create_listener_rule_arg *args, struct osc_str *data) +static int update_listener_rule_data(struct osc_env *e, struct osc_update_listener_rule_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->listener_str) { - ARG_TO_JSON(Listener, string, args->listener_str); - ret += 1; - } else if (args->is_set_listener) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Listener\": { " )); - STRY(load_balancer_light_setter(&args->listener, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + if (args->host_pattern) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"HostPattern\":", args->host_pattern); + ret += 1; } - if (args->listener_rule_str) { - ARG_TO_JSON(ListenerRule, string, args->listener_rule_str); - ret += 1; - } else if (args->is_set_listener_rule) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"ListenerRule\": { " )); - STRY(listener_rule_for_creation_setter(&args->listener_rule, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + if (args->listener_rule_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ListenerRuleName\":", args->listener_rule_name); + ret += 1; } - if (args->vm_ids) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"VmIds\":[" )); - for (as = args->vm_ids; *as; ++as) { - if (as != args->vm_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->vm_ids_str) { - ARG_TO_JSON(VmIds, string, args->vm_ids_str); - ret += 1; + if (args->path_pattern) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PathPattern\":", args->path_pattern); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateListenerRule"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_listener_rule(struct osc_env *e, struct osc_str *out, struct osc_create_listener_rule_arg *args) +int osc_update_listener_rule(struct osc_env *e, struct osc_str *out, struct osc_update_listener_rule_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_listener_rule_data(args, &data); + r = update_listener_rule_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateListenerRule"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_keypair_data(struct osc_create_keypair_arg *args, struct osc_str *data) +static int update_load_balancer_data(struct osc_env *e, struct osc_update_load_balancer_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->access_log_str) { + ARG_TO_JSON(AccessLog, string, args->access_log_str); + ret += 1; + } else if (args->is_set_access_log) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"AccessLog\": { " )); + STRY(access_log_setter(&args->access_log, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->keypair_name) { + if (args->health_check_str) { + ARG_TO_JSON(HealthCheck, string, args->health_check_str); + ret += 1; + } else if (args->is_set_health_check) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"HealthCheck\": { " )); + STRY(health_check_setter(&args->health_check, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->load_balancer_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"KeypairName\":", args->keypair_name); + ARG_TO_JSON_STR("\"LoadBalancerName\":", args->load_balancer_name); ret += 1; } - if (args->public_key) { + if (args->is_set_load_balancer_port || args->load_balancer_port) { + ARG_TO_JSON(LoadBalancerPort, int, args->load_balancer_port); + ret += 1; + } + if (args->policy_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"PolicyNames\":[" )); + for (as = args->policy_names; *as; ++as) { + if (as != args->policy_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->policy_names_str) { + ARG_TO_JSON(PolicyNames, string, args->policy_names_str); + ret += 1; + } + if (args->public_ip) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PublicKey\":", args->public_key); + ARG_TO_JSON_STR("\"PublicIp\":", args->public_ip); + ret += 1; + } + if (args->is_set_secured_cookies) { + ARG_TO_JSON(SecuredCookies, bool, args->secured_cookies); + ret += 1; + } + if (args->security_groups) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"SecurityGroups\":[" )); + for (as = args->security_groups; *as; ++as) { + if (as != args->security_groups) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->security_groups_str) { + ARG_TO_JSON(SecurityGroups, string, args->security_groups_str); + ret += 1; + } + if (args->server_certificate_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ServerCertificateId\":", args->server_certificate_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateLoadBalancer"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_keypair(struct osc_env *e, struct osc_str *out, struct osc_create_keypair_arg *args) +int osc_update_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_update_load_balancer_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_keypair_data(args, &data); + r = update_load_balancer_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateKeypair"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_internet_service_data(struct osc_create_internet_service_arg *args, struct osc_str *data) +static int update_net_access_point_data(struct osc_env *e, struct osc_update_net_access_point_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->add_route_table_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"AddRouteTableIds\":[" )); + for (as = args->add_route_table_ids; *as; ++as) { + if (as != args->add_route_table_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->add_route_table_ids_str) { + ARG_TO_JSON(AddRouteTableIds, string, args->add_route_table_ids_str); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } + if (args->net_access_point_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NetAccessPointId\":", args->net_access_point_id); + ret += 1; + } + if (args->remove_route_table_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"RemoveRouteTableIds\":[" )); + for (as = args->remove_route_table_ids; *as; ++as) { + if (as != args->remove_route_table_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->remove_route_table_ids_str) { + ARG_TO_JSON(RemoveRouteTableIds, string, args->remove_route_table_ids_str); + ret += 1; + } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateNetAccessPoint"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_internet_service(struct osc_env *e, struct osc_str *out, struct osc_create_internet_service_arg *args) +int osc_update_net_access_point(struct osc_env *e, struct osc_str *out, struct osc_update_net_access_point_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_internet_service_data(args, &data); + r = update_net_access_point_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateInternetService"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_image_export_task_data(struct osc_create_image_export_task_arg *args, struct osc_str *data) +static int update_net_data(struct osc_env *e, struct osc_update_net_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->dhcp_options_set_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"DhcpOptionsSetId\":", args->dhcp_options_set_id); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->image_id) { + if (args->net_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ImageId\":", args->image_id); + ARG_TO_JSON_STR("\"NetId\":", args->net_id); ret += 1; } - if (args->osu_export_str) { - ARG_TO_JSON(OsuExport, string, args->osu_export_str); - ret += 1; - } else if (args->is_set_osu_export) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"OsuExport\": { " )); - STRY(osu_export_to_create_setter(&args->osu_export, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateNet"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_image_export_task(struct osc_env *e, struct osc_str *out, struct osc_create_image_export_task_arg *args) +int osc_update_net(struct osc_env *e, struct osc_str *out, struct osc_update_net_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_image_export_task_data(args, &data); + r = update_net_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateImageExportTask"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_image_data(struct osc_create_image_arg *args, struct osc_str *data) +static int update_nic_data(struct osc_env *e, struct osc_update_nic_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->architecture) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Architecture\":", args->architecture); - ret += 1; - } - if (args->block_device_mappings) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"BlockDeviceMappings\":[" )); - for (int i = 0; i < args->nb_block_device_mappings; ++i) { - struct block_device_mapping_image *p = &args->block_device_mappings[i]; - if (p != args->block_device_mappings) - STRY(osc_str_append_string(data, "," )); - STRY(osc_str_append_string(data, "{ " )); - STRY(block_device_mapping_image_setter(p, data) < 0); - STRY(osc_str_append_string(data, "}" )); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else - if (args->block_device_mappings_str) { - ARG_TO_JSON(BlockDeviceMappings, string, args->block_device_mappings_str); - ret += 1; - } if (args->description) { TRY_APPEND_COL(count_args, data); ARG_TO_JSON_STR("\"Description\":", args->description); @@ -28920,962 +29597,993 @@ static int create_image_data(struct osc_create_image_arg *args, struct osc_str ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->file_location) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"FileLocation\":", args->file_location); - ret += 1; - } - if (args->image_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ImageName\":", args->image_name); - ret += 1; + if (args->link_nic_str) { + ARG_TO_JSON(LinkNic, string, args->link_nic_str); + ret += 1; + } else if (args->is_set_link_nic) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"LinkNic\": { " )); + STRY(link_nic_to_update_setter(&args->link_nic, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } - if (args->is_set_no_reboot) { - ARG_TO_JSON(NoReboot, bool, args->no_reboot); + if (args->nic_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NicId\":", args->nic_id); ret += 1; } - if (args->product_codes) { + if (args->security_group_ids) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"ProductCodes\":[" )); - for (as = args->product_codes; *as; ++as) { - if (as != args->product_codes) + STRY(osc_str_append_string(data, "\"SecurityGroupIds\":[" )); + for (as = args->security_group_ids; *as; ++as) { + if (as != args->security_group_ids) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->product_codes_str) { - ARG_TO_JSON(ProductCodes, string, args->product_codes_str); + } else if (args->security_group_ids_str) { + ARG_TO_JSON(SecurityGroupIds, string, args->security_group_ids_str); ret += 1; } - if (args->root_device_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"RootDeviceName\":", args->root_device_name); - ret += 1; - } - if (args->source_image_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SourceImageId\":", args->source_image_id); - ret += 1; - } - if (args->source_region_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SourceRegionName\":", args->source_region_name); - ret += 1; - } - if (args->vm_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmId\":", args->vm_id); - ret += 1; - } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateNic"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_image(struct osc_env *e, struct osc_str *out, struct osc_create_image_arg *args) +int osc_update_nic(struct osc_env *e, struct osc_str *out, struct osc_update_nic_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_image_data(args, &data); + r = update_nic_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateImage"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_flexible_gpu_data(struct osc_create_flexible_gpu_arg *args, struct osc_str *data) +static int update_route_propagation_data(struct osc_env *e, struct osc_update_route_propagation_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_delete_on_vm_deletion) { - ARG_TO_JSON(DeleteOnVmDeletion, bool, args->delete_on_vm_deletion); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->generation) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Generation\":", args->generation); + if (args->is_set_enable) { + ARG_TO_JSON(Enable, bool, args->enable); ret += 1; } - if (args->model_name) { + if (args->route_table_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ModelName\":", args->model_name); + ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); ret += 1; } - if (args->subregion_name) { + if (args->virtual_gateway_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SubregionName\":", args->subregion_name); + ARG_TO_JSON_STR("\"VirtualGatewayId\":", args->virtual_gateway_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateRoutePropagation"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_create_flexible_gpu_arg *args) +int osc_update_route_propagation(struct osc_env *e, struct osc_str *out, struct osc_update_route_propagation_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_flexible_gpu_data(args, &data); + r = update_route_propagation_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateFlexibleGpu"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_direct_link_interface_data(struct osc_create_direct_link_interface_arg *args, struct osc_str *data) +static int update_route_data(struct osc_env *e, struct osc_update_route_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->direct_link_id) { + if (args->destination_ip_range) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DirectLinkId\":", args->direct_link_id); + ARG_TO_JSON_STR("\"DestinationIpRange\":", args->destination_ip_range); ret += 1; } - if (args->direct_link_interface_str) { - ARG_TO_JSON(DirectLinkInterface, string, args->direct_link_interface_str); - ret += 1; - } else if (args->is_set_direct_link_interface) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"DirectLinkInterface\": { " )); - STRY(direct_link_interface_setter(&args->direct_link_interface, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } + if (args->gateway_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"GatewayId\":", args->gateway_id); + ret += 1; + } + if (args->nat_service_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NatServiceId\":", args->nat_service_id); + ret += 1; + } + if (args->net_peering_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NetPeeringId\":", args->net_peering_id); + ret += 1; + } + if (args->nic_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NicId\":", args->nic_id); + ret += 1; + } + if (args->route_table_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); + ret += 1; + } + if (args->vm_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VmId\":", args->vm_id); + ret += 1; + } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateRoute"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_direct_link_interface(struct osc_env *e, struct osc_str *out, struct osc_create_direct_link_interface_arg *args) +int osc_update_route(struct osc_env *e, struct osc_str *out, struct osc_update_route_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_direct_link_interface_data(args, &data); + r = update_route_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateDirectLinkInterface"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_direct_link_data(struct osc_create_direct_link_arg *args, struct osc_str *data) +static int update_route_table_link_data(struct osc_env *e, struct osc_update_route_table_link_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->bandwidth) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Bandwidth\":", args->bandwidth); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->direct_link_name) { + if (args->link_route_table_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DirectLinkName\":", args->direct_link_name); - ret += 1; - } - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + ARG_TO_JSON_STR("\"LinkRouteTableId\":", args->link_route_table_id); ret += 1; } - if (args->location) { + if (args->route_table_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Location\":", args->location); + ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateRouteTableLink"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_direct_link(struct osc_env *e, struct osc_str *out, struct osc_create_direct_link_arg *args) +int osc_update_route_table_link(struct osc_env *e, struct osc_str *out, struct osc_update_route_table_link_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_direct_link_data(args, &data); + r = update_route_table_link_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateDirectLink"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_dhcp_options_data(struct osc_create_dhcp_options_arg *args, struct osc_str *data) +static int update_server_certificate_data(struct osc_env *e, struct osc_update_server_certificate_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; - osc_str_append_string(data, "{"); - if (args->domain_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DomainName\":", args->domain_name); - ret += 1; - } - if (args->domain_name_servers) { - char **as; - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"DomainNameServers\":[" )); - for (as = args->domain_name_servers; *as; ++as) { - if (as != args->domain_name_servers) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->domain_name_servers_str) { - ARG_TO_JSON(DomainNameServers, string, args->domain_name_servers_str); - ret += 1; - } + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->log_servers) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"LogServers\":[" )); - for (as = args->log_servers; *as; ++as) { - if (as != args->log_servers) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->log_servers_str) { - ARG_TO_JSON(LogServers, string, args->log_servers_str); - ret += 1; + if (args->name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Name\":", args->name); + ret += 1; } - if (args->ntp_servers) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"NtpServers\":[" )); - for (as = args->ntp_servers; *as; ++as) { - if (as != args->ntp_servers) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->ntp_servers_str) { - ARG_TO_JSON(NtpServers, string, args->ntp_servers_str); - ret += 1; + if (args->new_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NewName\":", args->new_name); + ret += 1; + } + if (args->new_path) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NewPath\":", args->new_path); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateServerCertificate"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_create_dhcp_options_arg *args) +int osc_update_server_certificate(struct osc_env *e, struct osc_str *out, struct osc_update_server_certificate_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_dhcp_options_data(args, &data); + r = update_server_certificate_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateDhcpOptions"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_dedicated_group_data(struct osc_create_dedicated_group_arg *args, struct osc_str *data) +static int update_snapshot_data(struct osc_env *e, struct osc_update_snapshot_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_cpu_generation || args->cpu_generation) { - ARG_TO_JSON(CpuGeneration, int, args->cpu_generation); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Name\":", args->name); - ret += 1; + if (args->permissions_to_create_volume_str) { + ARG_TO_JSON(PermissionsToCreateVolume, string, args->permissions_to_create_volume_str); + ret += 1; + } else if (args->is_set_permissions_to_create_volume) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"PermissionsToCreateVolume\": { " )); + STRY(permissions_on_resource_creation_setter(&args->permissions_to_create_volume, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } - if (args->subregion_name) { + if (args->snapshot_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SubregionName\":", args->subregion_name); + ARG_TO_JSON_STR("\"SnapshotId\":", args->snapshot_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateSnapshot"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_create_dedicated_group_arg *args) +int osc_update_snapshot(struct osc_env *e, struct osc_str *out, struct osc_update_snapshot_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_dedicated_group_data(args, &data); + r = update_snapshot_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateDedicatedGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_client_gateway_data(struct osc_create_client_gateway_arg *args, struct osc_str *data) +static int update_subnet_data(struct osc_env *e, struct osc_update_subnet_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->is_set_bgp_asn || args->bgp_asn) { - ARG_TO_JSON(BgpAsn, int, args->bgp_asn); - ret += 1; - } - if (args->connection_type) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ConnectionType\":", args->connection_type); - ret += 1; - } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->public_ip) { + if (args->is_set_map_public_ip_on_launch) { + ARG_TO_JSON(MapPublicIpOnLaunch, bool, args->map_public_ip_on_launch); + ret += 1; + } + if (args->subnet_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PublicIp\":", args->public_ip); + ARG_TO_JSON_STR("\"SubnetId\":", args->subnet_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateSubnet"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_client_gateway(struct osc_env *e, struct osc_str *out, struct osc_create_client_gateway_arg *args) +int osc_update_subnet(struct osc_env *e, struct osc_str *out, struct osc_update_subnet_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_client_gateway_data(args, &data); + r = update_subnet_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateClientGateway"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_ca_data(struct osc_create_ca_arg *args, struct osc_str *data) +static int update_user_group_data(struct osc_env *e, struct osc_update_user_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); - if (args->ca_pem) { + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->new_path) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"CaPem\":", args->ca_pem); + ARG_TO_JSON_STR("\"NewPath\":", args->new_path); ret += 1; } - if (args->description) { + if (args->new_user_group_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Description\":", args->description); + ARG_TO_JSON_STR("\"NewUserGroupName\":", args->new_user_group_name); ret += 1; } - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->path) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Path\":", args->path); + ret += 1; + } + if (args->user_group_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateUserGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_ca(struct osc_env *e, struct osc_str *out, struct osc_create_ca_arg *args) +int osc_update_user_group(struct osc_env *e, struct osc_str *out, struct osc_update_user_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_ca_data(args, &data); + r = update_user_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateCa"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_api_access_rule_data(struct osc_create_api_access_rule_arg *args, struct osc_str *data) +static int update_user_data(struct osc_env *e, struct osc_update_user_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; - osc_str_append_string(data, "{"); - if (args->ca_ids) { - char **as; - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"CaIds\":[" )); - for (as = args->ca_ids; *as; ++as) { - if (as != args->ca_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->ca_ids_str) { - ARG_TO_JSON(CaIds, string, args->ca_ids_str); - ret += 1; + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; } - if (args->cns) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Cns\":[" )); - for (as = args->cns; *as; ++as) { - if (as != args->cns) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->cns_str) { - ARG_TO_JSON(Cns, string, args->cns_str); - ret += 1; + if (args->new_path) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NewPath\":", args->new_path); + ret += 1; } - if (args->description) { + if (args->new_user_email) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Description\":", args->description); + ARG_TO_JSON_STR("\"NewUserEmail\":", args->new_user_email); ret += 1; } - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->new_user_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NewUserName\":", args->new_user_name); ret += 1; } - if (args->ip_ranges) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"IpRanges\":[" )); - for (as = args->ip_ranges; *as; ++as) { - if (as != args->ip_ranges) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->ip_ranges_str) { - ARG_TO_JSON(IpRanges, string, args->ip_ranges_str); - ret += 1; + if (args->user_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateUser"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_api_access_rule(struct osc_env *e, struct osc_str *out, struct osc_create_api_access_rule_arg *args) +int osc_update_user(struct osc_env *e, struct osc_str *out, struct osc_update_user_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_api_access_rule_data(args, &data); + r = update_user_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateApiAccessRule"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_account_data(struct osc_create_account_arg *args, struct osc_str *data) +static int update_vm_group_data(struct osc_env *e, struct osc_update_vm_group_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; - osc_str_append_string(data, "{"); - if (args->additional_emails) { - char **as; - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"AdditionalEmails\":[" )); - for (as = args->additional_emails; *as; ++as) { - if (as != args->additional_emails) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->additional_emails_str) { - ARG_TO_JSON(AdditionalEmails, string, args->additional_emails_str); - ret += 1; - } - if (args->city) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"City\":", args->city); - ret += 1; - } - if (args->company_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"CompanyName\":", args->company_name); - ret += 1; - } - if (args->country) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Country\":", args->country); - ret += 1; - } - if (args->customer_id) { + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(data, "{"); + if (args->description) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"CustomerId\":", args->customer_id); + ARG_TO_JSON_STR("\"Description\":", args->description); ret += 1; } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->email) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Email\":", args->email); - ret += 1; - } - if (args->first_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"FirstName\":", args->first_name); - ret += 1; - } - if (args->job_title) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"JobTitle\":", args->job_title); - ret += 1; - } - if (args->last_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"LastName\":", args->last_name); - ret += 1; - } - if (args->mobile_number) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"MobileNumber\":", args->mobile_number); - ret += 1; - } - if (args->phone_number) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PhoneNumber\":", args->phone_number); - ret += 1; + if (args->tags) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Tags\":[" )); + for (int i = 0; i < args->nb_tags; ++i) { + struct resource_tag *p = &args->tags[i]; + if (p != args->tags) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(resource_tag_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->tags_str) { + ARG_TO_JSON(Tags, string, args->tags_str); + ret += 1; } - if (args->state_province) { + if (args->vm_group_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"StateProvince\":", args->state_province); + ARG_TO_JSON_STR("\"VmGroupId\":", args->vm_group_id); ret += 1; } - if (args->vat_number) { + if (args->vm_group_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VatNumber\":", args->vat_number); + ARG_TO_JSON_STR("\"VmGroupName\":", args->vm_group_name); ret += 1; } - if (args->zip_code) { + if (args->vm_template_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ZipCode\":", args->zip_code); + ARG_TO_JSON_STR("\"VmTemplateId\":", args->vm_template_id); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateVmGroup"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_account(struct osc_env *e, struct osc_str *out, struct osc_create_account_arg *args) +int osc_update_vm_group(struct osc_env *e, struct osc_str *out, struct osc_update_vm_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_account_data(args, &data); + r = update_vm_group_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateAccount"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int create_access_key_data(struct osc_create_access_key_arg *args, struct osc_str *data) +static int update_vm_data(struct osc_env *e, struct osc_update_vm_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->block_device_mappings) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"BlockDeviceMappings\":[" )); + for (int i = 0; i < args->nb_block_device_mappings; ++i) { + struct block_device_mapping_vm_update *p = &args->block_device_mappings[i]; + if (p != args->block_device_mappings) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(block_device_mapping_vm_update_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->block_device_mappings_str) { + ARG_TO_JSON(BlockDeviceMappings, string, args->block_device_mappings_str); + ret += 1; + } + if (args->is_set_bsu_optimized) { + ARG_TO_JSON(BsuOptimized, bool, args->bsu_optimized); + ret += 1; + } + if (args->is_set_deletion_protection) { + ARG_TO_JSON(DeletionProtection, bool, args->deletion_protection); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->expiration_date) { + if (args->is_set_is_source_dest_checked) { + ARG_TO_JSON(IsSourceDestChecked, bool, args->is_source_dest_checked); + ret += 1; + } + if (args->keypair_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"ExpirationDate\":", args->expiration_date); + ARG_TO_JSON_STR("\"KeypairName\":", args->keypair_name); ret += 1; } - if (args->user_name) { + if (args->is_set_nested_virtualization) { + ARG_TO_JSON(NestedVirtualization, bool, args->nested_virtualization); + ret += 1; + } + if (args->performance) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ARG_TO_JSON_STR("\"Performance\":", args->performance); + ret += 1; + } + if (args->security_group_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"SecurityGroupIds\":[" )); + for (as = args->security_group_ids; *as; ++as) { + if (as != args->security_group_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->security_group_ids_str) { + ARG_TO_JSON(SecurityGroupIds, string, args->security_group_ids_str); + ret += 1; + } + if (args->user_data) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserData\":", args->user_data); + ret += 1; + } + if (args->vm_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VmId\":", args->vm_id); + ret += 1; + } + if (args->vm_initiated_shutdown_behavior) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VmInitiatedShutdownBehavior\":", args->vm_initiated_shutdown_behavior); + ret += 1; + } + if (args->vm_type) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VmType\":", args->vm_type); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateVm"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_create_access_key(struct osc_env *e, struct osc_str *out, struct osc_create_access_key_arg *args) +int osc_update_vm(struct osc_env *e, struct osc_str *out, struct osc_update_vm_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = create_access_key_data(args, &data); + r = update_vm_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CreateAccessKey"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int check_authentication_data(struct osc_check_authentication_arg *args, struct osc_str *data) +static int update_vm_template_data(struct osc_env *e, struct osc_update_vm_template_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->description) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Description\":", args->description); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->login) { + if (args->tags) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Tags\":[" )); + for (int i = 0; i < args->nb_tags; ++i) { + struct resource_tag *p = &args->tags[i]; + if (p != args->tags) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_string(data, "{ " )); + STRY(resource_tag_setter(p, data) < 0); + STRY(osc_str_append_string(data, "}" )); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else + if (args->tags_str) { + ARG_TO_JSON(Tags, string, args->tags_str); + ret += 1; + } + if (args->vm_template_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Login\":", args->login); + ARG_TO_JSON_STR("\"VmTemplateId\":", args->vm_template_id); ret += 1; } - if (args->password) { + if (args->vm_template_name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Password\":", args->password); + ARG_TO_JSON_STR("\"VmTemplateName\":", args->vm_template_name); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateVmTemplate"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_check_authentication(struct osc_env *e, struct osc_str *out, struct osc_check_authentication_arg *args) +int osc_update_vm_template(struct osc_env *e, struct osc_str *out, struct osc_update_vm_template_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = check_authentication_data(args, &data); + r = update_vm_template_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/CheckAuthentication"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int add_user_to_user_group_data(struct osc_add_user_to_user_group_arg *args, struct osc_str *data) +static int update_volume_data(struct osc_env *e, struct osc_update_volume_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->user_group_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupName\":", args->user_group_name); + if (args->is_set_iops || args->iops) { + ARG_TO_JSON(Iops, int, args->iops); ret += 1; } - if (args->user_group_path) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserGroupPath\":", args->user_group_path); + if (args->is_set_size || args->size) { + ARG_TO_JSON(Size, int, args->size); ret += 1; } - if (args->user_name) { + if (args->volume_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ARG_TO_JSON_STR("\"VolumeId\":", args->volume_id); ret += 1; } - if (args->user_path) { + if (args->volume_type) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"UserPath\":", args->user_path); + ARG_TO_JSON_STR("\"VolumeType\":", args->volume_type); ret += 1; } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateVolume"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_add_user_to_user_group(struct osc_env *e, struct osc_str *out, struct osc_add_user_to_user_group_arg *args) +int osc_update_volume(struct osc_env *e, struct osc_str *out, struct osc_update_volume_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = add_user_to_user_group_data(args, &data); + r = update_volume_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/AddUserToUserGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } -static int accept_net_peering_data(struct osc_accept_net_peering_arg *args, struct osc_str *data) +static int update_vpn_connection_data(struct osc_env *e, struct osc_update_vpn_connection_arg *args, struct osc_str *data) { + struct osc_str end_call; int ret = 0; int count_args = 0; + (void)count_args; /* if use only query/header and path, this is unused */ if (!args) return 0; + + osc_init_str(&end_call); + osc_str_append_string(&end_call, e->endpoint.buf); osc_str_append_string(data, "{"); + if (args->client_gateway_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ClientGatewayId\":", args->client_gateway_id); + ret += 1; + } if (args->is_set_dry_run) { ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->net_peering_id) { + if (args->virtual_gateway_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"NetPeeringId\":", args->net_peering_id); + ARG_TO_JSON_STR("\"VirtualGatewayId\":", args->virtual_gateway_id); + ret += 1; + } + if (args->vpn_connection_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VpnConnectionId\":", args->vpn_connection_id); ret += 1; } + if (args->vpn_options_str) { + ARG_TO_JSON(VpnOptions, string, args->vpn_options_str); + ret += 1; + } else if (args->is_set_vpn_options) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"VpnOptions\": { " )); + STRY(vpn_options_setter(&args->vpn_options, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } osc_str_append_string(data, "}"); + osc_str_append_string(&end_call, "/api/v1/UpdateVpnConnection"); + + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + osc_deinit_str(&end_call); return !!ret; } -int osc_accept_net_peering(struct osc_env *e, struct osc_str *out, struct osc_accept_net_peering_arg *args) +int osc_update_vpn_connection(struct osc_env *e, struct osc_str *out, struct osc_update_vpn_connection_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; - struct osc_str end_call; int r; osc_init_str(&data); - osc_init_str(&end_call); - r = accept_net_peering_data(args, &data); + r = update_vpn_connection_data(e, args, &data); if (r < 0) goto out; - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/AcceptNetPeering"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); if (e->flag & OSC_VERBOSE_MODE) { printf("\n%s\n\n", data.buf); } res = curl_easy_perform(e->c); out: - osc_deinit_str(&end_call); osc_deinit_str(&data); return res; } @@ -29985,15 +30693,16 @@ int osc_init_sdk_ext(struct osc_env *e, const char *profile, unsigned int flag, if (f < 0) return -1; e->flag |= f; + osc_set_extra_flag_from_conf(profile, &flag); } if (!e->region) e->region = "eu-west-2"; if (!endpoint && !e->endpoint_allocated_) { - osc_str_append_string(&e->endpoint, "https://api."); - osc_str_append_string(&e->endpoint, e->region); - osc_str_append_string(&e->endpoint, ".outscale.com"); + osc_str_append_string(&e->endpoint, "https://api."); + osc_str_append_string(&e->endpoint, e->region); + osc_str_append_string(&e->endpoint, ".outscale.com"); } else { if (e->endpoint_allocated_) { osc_str_append_string(&e->endpoint, diff --git a/osc_sdk.h b/osc_sdk.h index bc13cb9..4e2beb1 100644 --- a/osc_sdk.h +++ b/osc_sdk.h @@ -65,15 +65,15 @@ struct osc_str { char *buf; }; -#define OSC_ENV_FREE_AK 1 << 0 -#define OSC_ENV_FREE_REGION 1 << 1 -#define OSC_VERBOSE_MODE 1 << 2 /* curl verbose mode + print request content */ -#define OSC_INSECURE_MODE 1 << 3 /* see --insecure option of curl */ -#define OSC_ENV_FREE_CERT 1 << 4 -#define OSC_ENV_FREE_SSLKEY 1 << 5 -#define OSC_ENV_FREE_SK 1 << 6 -#define OSC_ENV_FREE_PROXY 1 << 7 -#define OSC_ENV_FREE_ENDPOINT 1 << 8 +#define OSC_ENV_FREE_AK (1 << 0) +#define OSC_ENV_FREE_REGION (1 << 1) +#define OSC_VERBOSE_MODE (1 << 2) /* curl verbose mode + print request content */ +#define OSC_INSECURE_MODE (1 << 3) /* see --insecure option of curl */ +#define OSC_ENV_FREE_CERT (1 << 4) +#define OSC_ENV_FREE_SSLKEY (1 << 5) +#define OSC_ENV_FREE_SK (1 << 6) +#define OSC_ENV_FREE_PROXY (1 << 7) +#define OSC_ENV_FREE_ENDPOINT (1 << 8) #define OSC_ENV_FREE_AK_SK (OSC_ENV_FREE_AK | OSC_ENV_FREE_SK) @@ -127,6 +127,11 @@ static const char *osc_sdk_version_str(void) return ret; } +struct osc_additional_strings { + char *key; + char *val; +}; + struct accepter_net { /* * The account ID of the owner of the accepter Net. @@ -7175,12 +7180,9 @@ struct with { int response_status_code; }; -struct osc_update_vpn_connection_arg { - /* Required: vpn_connection_id */ - /* - * The ID of the client gateway. - */ - char *client_gateway_id; +struct osc_accept_net_peering_arg { + /* Required: NetPeeringId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -7188,88 +7190,14 @@ struct osc_update_vpn_connection_arg { int is_set_dry_run; int dry_run; /* - * The ID of the virtual gateway. - */ - char *virtual_gateway_id; - /* - * The ID of the VPN connection you want to modify. - */ - char *vpn_connection_id; - /* - * Information about the VPN options. - * --VpnOptions.Phase1Options: ref Phase1Options - * Information about Phase 1 of the Internet Key Exchange (IKE) - * negotiation. When Phase 1 finishes successfully, peers proceed - * to Phase 2 - * negotiations. - * --VpnOptions.Phase1Options.DpdTimeoutAction: string - * The action to carry out after a Dead Peer Detection (DPD) - * timeout - * occurs. - * --VpnOptions.Phase1Options.DpdTimeoutSeconds: long long int - * The maximum waiting time for a Dead Peer Detection (DPD) - * response before - * considering the peer as dead, in seconds. - * --VpnOptions.Phase1Options.IkeVersions: array string - * The Internet Key Exchange (IKE) versions allowed for the VPN - * tunnel. - * --VpnOptions.Phase1Options.Phase1DhGroupNumbers: array integer - * The Diffie-Hellman (DH) group numbers allowed for the VPN - * tunnel for - * phase 1. - * --VpnOptions.Phase1Options.Phase1EncryptionAlgorithms: array - * string - * The encryption algorithms allowed for the VPN tunnel for - * phase 1. - * --VpnOptions.Phase1Options.Phase1IntegrityAlgorithms: array - * string - * The integrity algorithms allowed for the VPN tunnel for phase - * 1. - * --VpnOptions.Phase1Options.Phase1LifetimeSeconds: long long int - * The lifetime for phase 1 of the IKE negotiation process, in - * seconds. - * --VpnOptions.Phase1Options.ReplayWindowSize: long long int - * The number of packets in an IKE replay window. - * --VpnOptions.Phase1Options.StartupAction: string - * The action to carry out when establishing tunnels for a VPN - * connection. - * --VpnOptions.Phase2Options: ref Phase2Options - * Information about Phase 2 of the Internet Key Exchange (IKE) - * negotiation. - * --VpnOptions.Phase2Options.Phase2DhGroupNumbers: array integer - * The Diffie-Hellman (DH) group numbers allowed for the VPN - * tunnel for - * phase 2. - * --VpnOptions.Phase2Options.Phase2EncryptionAlgorithms: array - * string - * The encryption algorithms allowed for the VPN tunnel for - * phase 2. - * --VpnOptions.Phase2Options.Phase2IntegrityAlgorithms: array - * string - * The integrity algorithms allowed for the VPN tunnel for phase - * 2. - * --VpnOptions.Phase2Options.Phase2LifetimeSeconds: long long int - * The lifetime for phase 2 of the Internet Key Exchange (IKE) - * negociation - * process, in seconds. - * --VpnOptions.Phase2Options.PreSharedKey: string - * The pre-shared key to establish the initial authentication - * between the - * client gateway and the virtual gateway. This key can contain - * any - * character except line breaks and double quotes ("). - * --VpnOptions.TunnelInsideIpRange: string - * The range of inside IPs for the tunnel. This must be a /30 CIDR - * block - * from the 169.254.254.0/24 range. + * The ID of the Net peering you want to accept. */ - char *vpn_options_str; - int is_set_vpn_options; - struct vpn_options vpn_options; + char *net_peering_id; }; -struct osc_update_volume_arg { - /* Required: volume_id */ +struct osc_add_user_to_user_group_arg { + /* Required: UserGroupName UserName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -7277,44 +7205,26 @@ struct osc_update_volume_arg { int is_set_dry_run; int dry_run; /* - * **Cold volume**: the new number of I/O operations per second (IOPS). - * This parameter can be specified only if you update an `io1` volume or - * if you change the type of the volume for an `io1`. This modification - * is instantaneous.
\n**Hot volume**: the new number of I/O - * operations per second (IOPS). This parameter can be specified only if - * you update an `io1` volume. This modification is not instantaneous. - *

\nThe maximum number of IOPS allowed for `io1` volumes is - * `13000` with a maximum performance ratio of 300 IOPS per gibibyte. + * The name of the group you want to add a user to. */ - int is_set_iops; - long long int iops; + char *user_group_name; /* - * **Cold volume**: the new size of the volume, in gibibytes (GiB). This - * value must be equal to or greater than the current size of the - * volume. This modification is not instantaneous.
\n**Hot - * volume**: you cannot change the size of a hot volume. + * The path to the group. If not specified, it is set to a slash (`/`). */ - int is_set_size; - long long int size; + char *user_group_path; /* - * The ID of the volume you want to update. + * The name of the user you want to add to the group. */ - char *volume_id; + char *user_name; /* - * **Cold volume**: the new type of the volume (`standard` \\| `io1` \\| - * `gp2`). This modification is instantaneous. If you update to an `io1` - * volume, you must also specify the `Iops` parameter.
\n**Hot - * volume**: you cannot change the type of a hot volume. + * The path to the user. If not specified, it is set to a slash (`/`). */ - char *volume_type; + char *user_path; }; -struct osc_update_vm_template_arg { - /* Required: vm_template_id */ - /* - * A new description for the VM template. - */ - char *description; +struct osc_check_authentication_arg { + /* Required: Login Password + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -7322,32 +7232,18 @@ struct osc_update_vm_template_arg { int is_set_dry_run; int dry_run; /* - * New tags for your VM template. - * Information about the tag. - * --Tags.INDEX.Key: string - * The key of the tag, with a minimum of 1 character. - * --Tags.INDEX.Value: string - * The value of the tag, between 0 and 255 characters. - */ - char *tags_str; - int nb_tags; - struct resource_tag *tags; - /* - * The ID of the VM template you want to update. + * The email address of the account. */ - char *vm_template_id; + char *login; /* - * A new name for your VM template. + * The password of the account. */ - char *vm_template_name; + char *password; }; -struct osc_update_vm_group_arg { - /* Required: vm_group_id */ - /* - * A new description for the VM group. - */ - char *description; +struct osc_create_access_key_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -7355,72 +7251,47 @@ struct osc_update_vm_group_arg { int is_set_dry_run; int dry_run; /* - * New tags for your VM group. - * Information about the tag. - * --Tags.INDEX.Key: string - * The key of the tag, with a minimum of 1 character. - * --Tags.INDEX.Value: string - * The value of the tag, between 0 and 255 characters. + * The date and time, or the date, at which you want the access key to + * expire, in ISO 8601 format (for example, `2020-06-14T00:00:00.000Z`, + * or `2020-06-14`). To remove an existing expiration date, use the + * method without specifying this parameter. */ - char *tags_str; - int nb_tags; - struct resource_tag *tags; + char *expiration_date; /* - * The ID of the VM group you want to update. + * The name of the EIM user that owns the key to be created. If you do + * not specify a user name, this action creates an access key for the + * user who sends the request (which can be the root account). */ - char *vm_group_id; + char *user_name; +}; + +struct osc_create_account_arg { + /* Required: City CompanyName Country CustomerId Email FirstName LastName ZipCode + */ /* - * A new name for your VM group. + * One or more additional email addresses for the account. These + * addresses are used for notifications only. If you already have a list + * of additional emails registered, you cannot add to it, only replace + * it. To remove all registered additional emails, specify an empty list. */ - char *vm_group_name; + char *additional_emails_str; + char **additional_emails; /* - * A new VM template ID for your VM group. + * The city of the account owner. */ - char *vm_template_id; -}; - -struct osc_update_vm_arg { - /* Required: vm_id */ + char *city; /* - * One or more block device mappings of the VM. - * Information about the block device mapping. - * --BlockDeviceMappings.INDEX.Bsu: ref BsuToUpdateVm - * Information about the BSU volume. - * --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool - * If set to true, the volume is deleted when terminating the - * VM. If set to - * false, the volume is not deleted when terminating the VM. - * --BlockDeviceMappings.INDEX.Bsu.VolumeId: string - * The ID of the volume. - * --BlockDeviceMappings.INDEX.DeviceName: string - * The device name for the volume. For a root device, you must use - * `/dev/sda1`. For other volumes, you must use `/dev/sdX`, - * `/dev/sdXX`, - * `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter - * between `b` - * and `z`, and the second `X` is a letter between `a` and `z`). - * --BlockDeviceMappings.INDEX.NoDevice: string - * Removes the device which is included in the block device mapping - * of the - * OMI. - * --BlockDeviceMappings.INDEX.VirtualDeviceName: string - * The name of the virtual device (`ephemeralN`). + * The name of the company for the account. */ - char *block_device_mappings_str; - int nb_block_device_mappings; - struct block_device_mapping_vm_update *block_device_mappings; + char *company_name; /* - * This parameter is not available. It is present in our API for the - * sake of historical compatibility with AWS. + * The country of the account owner. */ - int is_set_bsu_optimized; - int bsu_optimized; + char *country; /* - * If true, you cannot delete the VM unless you change this parameter - * back to false. + * The ID of the customer. It must be 8 digits. */ - int is_set_deletion_protection; - int deletion_protection; + char *customer_id; /* * If true, checks whether you have the required permissions to perform * the action. @@ -7428,88 +7299,62 @@ struct osc_update_vm_arg { int is_set_dry_run; int dry_run; /* - * (Net only) If true, the source/destination check is enabled. If - * false, it is disabled. + * The main email address for the account. This address is used for your + * credentials and notifications. */ - int is_set_is_source_dest_checked; - int is_source_dest_checked; + char *email; /* - * The name of a keypair you want to associate with the VM.
\nWhen - * you replace the keypair of a VM with another one, the metadata of the - * VM is modified to reflect the new public key, but the replacement is - * still not effective in the operating system of the VM. To complete - * the replacement and effectively apply the new keypair, you need to - * perform other actions inside the VM. For more information, see - * [Modifying the Keypair of a - * VM](https://docs.outscale.com/en/userguide/Modifying-the-Keypair-of-a- - * VM.html). + * The first name of the account owner. */ - char *keypair_name; + char *first_name; /* - * (dedicated tenancy only) If true, nested virtualization is enabled. - * If false, it is disabled. + * The job title of the account owner. */ - int is_set_nested_virtualization; - int nested_virtualization; + char *job_title; /* - * The performance of the VM (`medium` \\| `high` \\| `highest`). + * The last name of the account owner. */ - char *performance; + char *last_name; /* - * One or more IDs of security groups for the VM. + * The mobile phone number of the account owner. */ - char *security_group_ids_str; - char **security_group_ids; + char *mobile_number; /* - * The Base64-encoded MIME user data, limited to 500 kibibytes (KiB). + * The landline phone number of the account owner. */ - char *user_data; + char *phone_number; /* - * The ID of the VM. + * The state/province of the account. */ - char *vm_id; + char *state_province; /* - * The VM behavior when you stop it. If set to `stop`, the VM stops. If - * set to `restart`, the VM stops then automatically restarts. If set to - * `terminate`, the VM stops and is terminated. + * The value added tax (VAT) number for the account. */ - char *vm_initiated_shutdown_behavior; + char *vat_number; /* - * The type of VM. For more information, see [VM - * Types](https://docs.outscale.com/en/userguide/VM-Types.html). + * The ZIP code of the city. */ - char *vm_type; + char *zip_code; }; -struct osc_update_user_group_arg { - /* Required: user_group_name */ - /* - * If true, checks whether you have the required permissions to perform - * the action. - */ - int is_set_dry_run; - int dry_run; - /* - * A new path for the group. If not specified, it is set to a slash - * (`/`). - */ - char *new_path; +struct osc_create_api_access_rule_arg { + /* Required: null + */ /* - * A new name for the user group. + * One or more IDs of Client Certificate Authorities (CAs). */ - char *new_user_group_name; + char *ca_ids_str; + char **ca_ids; /* - * The path to the group. If not specified, it is set to a slash (`/`). + * One or more Client Certificate Common Names (CNs). If this parameter + * is specified, you must also specify the `CaIds` parameter. */ - char *path; + char *cns_str; + char **cns; /* - * The name of the group you want to update. + * A description for the API access rule. */ - char *user_group_name; -}; - -struct osc_update_user_arg { - /* Required: user_name */ + char *description; /* * If true, checks whether you have the required permissions to perform * the action. @@ -7517,45 +7362,50 @@ struct osc_update_user_arg { int is_set_dry_run; int dry_run; /* - * A new path for the EIM user. - */ - char *new_path; - /* - * A new email address for the EIM user. + * One or more IPs or CIDR blocks (for example, `192.0.2.0/16`). */ - char *new_user_email; + char *ip_ranges_str; + char **ip_ranges; +}; + +struct osc_create_ca_arg { + /* Required: CaPem + */ /* - * A new name for the EIM user. + * The CA in PEM format.
With OSC CLI, use the following syntax to + * make sure your CA file is correctly parsed: `--CaPem="$(cat + * FILENAME)"`. */ - char *new_user_name; + char *ca_pem; /* - * The name of the EIM user you want to modify. + * The description of the CA. */ - char *user_name; -}; - -struct osc_update_subnet_arg { - /* Required: subnet_id, map_public_ip_on_launch */ + char *description; /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; +}; + +struct osc_create_client_gateway_arg { + /* Required: BgpAsn PublicIp ConnectionType + */ /* - * If true, a public IP is assigned to the network interface cards - * (NICs) created in the specified Subnet. + * The Autonomous System Number (ASN) used by the Border Gateway + * Protocol (BGP) to find the path to your client gateway through the + * Internet.
\nThis number must be between `1` and `4294967295`. If + * you do not have an ASN, you can choose one between 64512 and 65534, + * or between 4200000000 and 4294967294. */ - int is_set_map_public_ip_on_launch; - int map_public_ip_on_launch; + int is_set_bgp_asn; + long long int bgp_asn; /* - * The ID of the Subnet. + * The communication protocol used to establish tunnel with your client + * gateway (always `ipsec.1`). */ - char *subnet_id; -}; - -struct osc_update_snapshot_arg { - /* Required: snapshot_id, permissions_to_create_volume */ + char *connection_type; /* * If true, checks whether you have the required permissions to perform * the action. @@ -7563,50 +7413,20 @@ struct osc_update_snapshot_arg { int is_set_dry_run; int dry_run; /* - * Information about the permissions for the resource.
\nSpecify - * either the `Additions` or the `Removals` parameter. - * --PermissionsToCreateVolume.Additions: ref PermissionsOnResource - * Permissions for the resource. - * --PermissionsToCreateVolume.Additions.AccountIds: array string - * One or more account IDs that the permission is associated - * with. - * --PermissionsToCreateVolume.Additions.GlobalPermission: bool - * A global permission for all accounts.
\n(Request) Set - * this - * parameter to true to make the resource public (if the parent - * parameter is - * `Additions`) or to make the resource private (if the parent - * parameter is - * `Removals`).
\n(Response) If true, the resource is - * public. If false, - * the resource is private. - * --PermissionsToCreateVolume.Removals: ref PermissionsOnResource - * Permissions for the resource. - * --PermissionsToCreateVolume.Removals.AccountIds: array string - * One or more account IDs that the permission is associated - * with. - * --PermissionsToCreateVolume.Removals.GlobalPermission: bool - * A global permission for all accounts.
\n(Request) Set - * this - * parameter to true to make the resource public (if the parent - * parameter is - * `Additions`) or to make the resource private (if the parent - * parameter is - * `Removals`).
\n(Response) If true, the resource is - * public. If false, - * the resource is private. - */ - char *permissions_to_create_volume_str; - int is_set_permissions_to_create_volume; - struct permissions_on_resource_creation permissions_to_create_volume; - /* - * The ID of the snapshot. + * The public fixed IPv4 address of your client gateway. */ - char *snapshot_id; + char *public_ip; }; -struct osc_update_server_certificate_arg { - /* Required: name */ +struct osc_create_dedicated_group_arg { + /* Required: CpuGeneration Name SubregionName + */ + /* + * The processor generation for the VMs in the dedicated group (for + * example, `4`). + */ + int is_set_cpu_generation; + long long int cpu_generation; /* * If true, checks whether you have the required permissions to perform * the action. @@ -7614,39 +7434,33 @@ struct osc_update_server_certificate_arg { int is_set_dry_run; int dry_run; /* - * The name of the server certificate you want to modify. + * A name for the dedicated group. */ char *name; /* - * A new name for the server certificate. - */ - char *new_name; - /* - * A new path for the server certificate. + * The Subregion in which you want to create the dedicated group. */ - char *new_path; + char *subregion_name; }; -struct osc_update_route_table_link_arg { - /* Required: route_table_id, link_route_table_id */ - /* - * If true, checks whether you have the required permissions to perform - * the action. - */ - int is_set_dry_run; - int dry_run; +struct osc_create_dhcp_options_arg { + /* Required: null + */ /* - * The ID of the current route table link. + * Specify a domain name (for example, `MyCompany.com`). You can specify + * only one domain name. You must specify at least one of the following + * parameters: `DomainName`, `DomainNameServers`, `LogServers`, or + * `NtpServers`. */ - char *link_route_table_id; + char *domain_name; /* - * The ID of the new route table to associate with the Subnet. + * The IPs of domain name servers. If no IPs are specified, the + * `OutscaleProvidedDNS` value is set by default. You must specify at + * least one of the following parameters: `DomainName`, + * `DomainNameServers`, `LogServers`, or `NtpServers`. */ - char *route_table_id; -}; - -struct osc_update_route_propagation_arg { - /* Required: enable, route_table_id, virtual_gateway_id */ + char *domain_name_servers_str; + char **domain_name_servers; /* * If true, checks whether you have the required permissions to perform * the action. @@ -7654,66 +7468,95 @@ struct osc_update_route_propagation_arg { int is_set_dry_run; int dry_run; /* - * If true, a virtual gateway can propagate routes to a specified route - * table of a Net. If false, the propagation is disabled. - */ - int is_set_enable; - int enable; - /* - * The ID of the route table. + * The IPs of the log servers. You must specify at least one of the + * following parameters: `DomainName`, `DomainNameServers`, + * `LogServers`, or `NtpServers`. */ - char *route_table_id; + char *log_servers_str; + char **log_servers; /* - * The ID of the virtual gateway. + * The IPs of the Network Time Protocol (NTP) servers. You must specify + * at least one of the following parameters: `DomainName`, + * `DomainNameServers`, `LogServers`, or `NtpServers`. */ - char *virtual_gateway_id; + char *ntp_servers_str; + char **ntp_servers; }; -struct osc_update_route_arg { - /* Required: route_table_id, destination_ip_range */ +struct osc_create_direct_link_interface_arg { + /* Required: DirectLinkId DirectLinkInterface + */ /* - * The IP range used for the destination match, in CIDR notation (for - * example, `10.0.0.0/24`). + * The ID of the existing DirectLink for which you want to create the + * DirectLink interface. */ - char *destination_ip_range; + char *direct_link_id; + /* + * Information about the DirectLink interface. + * --DirectLinkInterface.BgpAsn: long long int + * The BGP (Border Gateway Protocol) ASN (Autonomous System Number) + * on the + * customer's side of the DirectLink interface. This number must be + * between + * `64512` and `65534`. + * --DirectLinkInterface.BgpKey: string + * The BGP authentication key. + * --DirectLinkInterface.ClientPrivateIp: string + * The IP on the customer's side of the DirectLink interface. + * --DirectLinkInterface.DirectLinkInterfaceName: string + * The name of the DirectLink interface. + * --DirectLinkInterface.OutscalePrivateIp: string + * The IP on the OUTSCALE side of the DirectLink interface. + * --DirectLinkInterface.VirtualGatewayId: string + * The ID of the target virtual gateway. + * --DirectLinkInterface.Vlan: long long int + * The VLAN number associated with the DirectLink interface. This + * number + * must be unique and be between `2` and `4094`. + */ + char *direct_link_interface_str; + int is_set_direct_link_interface; + struct direct_link_interface direct_link_interface; /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; +}; + +struct osc_create_direct_link_arg { + /* Required: Bandwidth DirectLinkName Location + */ /* - * The ID of an Internet service or virtual gateway attached to your Net. - */ - char *gateway_id; - /* - * The ID of a NAT service. - */ - char *nat_service_id; - /* - * The ID of a Net peering. + * The bandwidth of the DirectLink (`1Gbps` \\| `10Gbps`). */ - char *net_peering_id; + char *bandwidth; /* - * The ID of a network interface card (NIC). + * The name of the DirectLink. */ - char *nic_id; + char *direct_link_name; /* - * The ID of the route table. + * If true, checks whether you have the required permissions to perform + * the action. */ - char *route_table_id; + int is_set_dry_run; + int dry_run; /* - * The ID of a NAT VM in your Net. + * The code of the requested location for the DirectLink, returned by + * the [ReadLocations](#readlocations) method. */ - char *vm_id; + char *location; }; -struct osc_update_nic_arg { - /* Required: nic_id */ +struct osc_create_flexible_gpu_arg { + /* Required: ModelName SubregionName + */ /* - * A new description for the NIC. + * If true, the fGPU is deleted when the VM is terminated. */ - char *description; + int is_set_delete_on_vm_deletion; + int delete_on_vm_deletion; /* * If true, checks whether you have the required permissions to perform * the action. @@ -7721,40 +7564,28 @@ struct osc_update_nic_arg { int is_set_dry_run; int dry_run; /* - * Information about the NIC attachment. If you are modifying the - * `DeleteOnVmDeletion` attribute, you must specify the ID of the NIC - * attachment. - * --LinkNic.DeleteOnVmDeletion: bool - * If true, the NIC is deleted when the VM is terminated. If false, - * the NIC - * is detached from the VM. - * --LinkNic.LinkNicId: string - * The ID of the NIC attachment. + * The processor generation that the fGPU must be compatible with. If + * not specified, the oldest possible processor generation is selected + * (as provided by [ReadFlexibleGpuCatalog](#readflexiblegpucatalog) for + * the specified model of fGPU). */ - char *link_nic_str; - int is_set_link_nic; - struct link_nic_to_update link_nic; + char *generation; /* - * The ID of the NIC you want to modify. + * The model of fGPU you want to allocate. For more information, see + * [About Flexible + * GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html) + * . */ - char *nic_id; + char *model_name; /* - * One or more IDs of security groups for the NIC.
\nYou must - * specify at least one group, even if you use the default security - * group in the Net. + * The Subregion in which you want to create the fGPU. */ - char *security_group_ids_str; - char **security_group_ids; + char *subregion_name; }; -struct osc_update_net_access_point_arg { - /* Required: net_access_point_id */ - /* - * One or more IDs of route tables to associate with the specified Net - * access point. - */ - char *add_route_table_ids_str; - char **add_route_table_ids; +struct osc_create_image_export_task_arg { + /* Required: OsuExport ImageId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -7762,60 +7593,100 @@ struct osc_update_net_access_point_arg { int is_set_dry_run; int dry_run; /* - * The ID of the Net access point. + * The ID of the OMI to export. */ - char *net_access_point_id; + char *image_id; /* - * One or more IDs of route tables to disassociate from the specified - * Net access point. + * Information about the OOS export task to create. + * --OsuExport.DiskImageFormat: string + * The format of the export disk (`qcow2` \\| `raw`). + * --OsuExport.OsuApiKey: ref OsuApiKey + * Information about the OOS API key. + * --OsuExport.OsuApiKey.ApiKeyId: string + * The API key of the OOS account that enables you to access the + * bucket. + * --OsuExport.OsuApiKey.SecretKey: string + * The secret key of the OOS account that enables you to access + * the bucket. + * --OsuExport.OsuBucket: string + * The name of the OOS bucket where you want to export the object. + * --OsuExport.OsuManifestUrl: string + * The URL of the manifest file. + * --OsuExport.OsuPrefix: string + * The prefix for the key of the OOS object. */ - char *remove_route_table_ids_str; - char **remove_route_table_ids; + char *osu_export_str; + int is_set_osu_export; + struct osu_export_to_create osu_export; }; -struct osc_update_net_arg { - /* Required: dhcp_options_set_id, net_id */ - /* - * The ID of the DHCP options set (or `default` if you want to associate - * the default one). - */ - char *dhcp_options_set_id; +struct osc_create_image_arg { + /* Required: null + */ /* - * If true, checks whether you have the required permissions to perform - * the action. + * **(when registering from a snapshot)** The architecture of the OMI + * (`i386` or `x86_64`). */ - int is_set_dry_run; - int dry_run; + char *architecture; /* - * The ID of the Net. + * **(when registering from a snapshot)** One or more block device + * mappings. + * One or more parameters used to automatically set up volumes when + * the VM + * is created. + * --BlockDeviceMappings.INDEX.Bsu: ref BsuToCreate + * Information about the BSU volume to create. + * --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool + * By default or if set to true, the volume is deleted when + * terminating the + * VM. If false, the volume is not deleted when terminating the + * VM. + * --BlockDeviceMappings.INDEX.Bsu.Iops: long long int + * The number of I/O operations per second (IOPS). This + * parameter must be + * specified only if you create an `io1` volume. The maximum + * number of IOPS + * allowed for `io1` volumes is `13000` with a maximum + * performance ratio of + * 300 IOPS per gibibyte. + * --BlockDeviceMappings.INDEX.Bsu.SnapshotId: string + * The ID of the snapshot used to create the volume. + * --BlockDeviceMappings.INDEX.Bsu.VolumeSize: long long int + * The size of the volume, in gibibytes (GiB).
\nIf you + * specify a + * snapshot ID, the volume size must be at least equal to the + * snapshot + * size.
\nIf you specify a snapshot ID but no volume size, + * the volume + * is created with a size similar to the snapshot one. + * --BlockDeviceMappings.INDEX.Bsu.VolumeType: string + * The type of the volume (`standard` \\| `io1` \\| `gp2`). If + * not + * specified in the request, a `standard` volume is created.
\nFor more + * information about volume types, see [About Volumes > Volume + * Types and + * + * IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volum + * e_ty + * pes_and_iops). + * --BlockDeviceMappings.INDEX.DeviceName: string + * The device name for the volume. For a root device, you must use + * `/dev/sda1`. For other volumes, you must use `/dev/sdX`, + * `/dev/sdXX`, + * `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter + * between `b` + * and `z`, and the second `X` is a letter between `a` and `z`). + * --BlockDeviceMappings.INDEX.VirtualDeviceName: string + * The name of the virtual device (`ephemeralN`). */ - char *net_id; -}; - -struct osc_update_load_balancer_arg { - /* Required: load_balancer_name */ + char *block_device_mappings_str; + int nb_block_device_mappings; + struct block_device_mapping_image *block_device_mappings; /* - * Information about access logs. - * --AccessLog.IsEnabled: bool - * If true, access logs are enabled for your load balancer. If - * false, they - * are not. If you set this to true in your request, the - * `OsuBucketName` - * parameter is required. - * --AccessLog.OsuBucketName: string - * The name of the OOS bucket for the access logs. - * --AccessLog.OsuBucketPrefix: string - * The path to the folder of the access logs in your OOS bucket (by - * default, the `root` level of your bucket). - * --AccessLog.PublicationInterval: long long int - * The time interval for the publication of access logs in the OOS - * bucket, - * in minutes. This value can be either `5` or `60` (by default, - * `60`). + * A description for the new OMI. */ - char *access_log_str; - int is_set_access_log; - struct access_log access_log; + char *description; /* * If true, checks whether you have the required permissions to perform * the action. @@ -7823,115 +7694,65 @@ struct osc_update_load_balancer_arg { int is_set_dry_run; int dry_run; /* - * Information about the health check configuration. - * --HealthCheck.CheckInterval: long long int - * The number of seconds between two requests (between `5` and `600` - * both - * included). - * --HealthCheck.HealthyThreshold: long long int - * The number of consecutive successful requests before considering - * the VM - * as healthy (between `2` and `10` both included). - * --HealthCheck.Path: string - * If you use the HTTP or HTTPS protocols, the request URL path. - * --HealthCheck.Port: long long int - * The port number (between `1` and `65535`, both included). - * --HealthCheck.Protocol: string - * The protocol for the URL of the VM (`HTTP` \\| `HTTPS` \\| `TCP` - * \\| - * `SSL`). - * --HealthCheck.Timeout: long long int - * The maximum waiting time for a response before considering the VM - * as - * unhealthy, in seconds (between `2` and `60` both included). - * --HealthCheck.UnhealthyThreshold: long long int - * The number of consecutive failed requests before considering the - * VM as - * unhealthy (between `2` and `10` both included). + * **(when registering from a bucket by using a manifest file)** The + * pre-signed URL of the manifest file for the OMI you want to register. + * For more information, see [Creating a Pre-signed + * URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL. + * html). */ - char *health_check_str; - int is_set_health_check; - struct health_check health_check; + char *file_location; /* - * The name of the load balancer. + * A unique name for the new OMI.
\nConstraints: 3-128 alphanumeric + * characters, underscores (`_`), spaces (` `), parentheses (`()`), + * slashes (`/`), periods (`.`), or dashes (`-`). */ - char *load_balancer_name; + char *image_name; /* - * The port on which the load balancer is listening (between `1` and - * `65535`, both included). This parameter is required if you want to - * update the server certificate. + * **(when creating from a VM)** If false, the VM shuts down before + * creating the OMI and then reboots. If true, the VM does not. */ - int is_set_load_balancer_port; - long long int load_balancer_port; + int is_set_no_reboot; + int no_reboot; /* - * The name of the policy you want to enable for the listener. + * The product codes associated with the OMI. */ - char *policy_names_str; - char **policy_names; + char *product_codes_str; + char **product_codes; /* - * (internet-facing only) The public IP you want to associate with the - * load balancer. The former public IP of the load balancer is then - * disassociated. If you specify an empty string and the former public - * IP belonged to you, it is disassociated and replaced by a public IP - * owned by 3DS OUTSCALE. + * **(when registering from a snapshot)** The name of the root device + * for the new OMI. */ - char *public_ip; + char *root_device_name; /* - * If true, secure cookies are enabled for the load balancer. + * **(when copying an OMI)** The ID of the OMI you want to copy. */ - int is_set_secured_cookies; - int secured_cookies; + char *source_image_id; /* - * (Net only) One or more IDs of security groups you want to assign to - * the load balancer. You need to specify the already assigned security - * groups that you want to keep along with the new ones you are - * assigning. If the list is empty, the default security group of the - * Net is assigned to the load balancer. + * **(when copying an OMI)** The name of the source Region (always the + * same as the Region of your account). */ - char *security_groups_str; - char **security_groups; + char *source_region_name; /* - * The OUTSCALE Resource Name (ORN) of the server certificate. For more - * information, see [Resource Identifiers > OUTSCALE Resource Names - * (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.ht - * ml#_outscale_resource_names_orns). If this parameter is specified, - * you must also specify the `LoadBalancerPort` parameter. + * **(when creating from a VM)** The ID of the VM from which you want to + * create the OMI. */ - char *server_certificate_id; + char *vm_id; }; -struct osc_update_listener_rule_arg { - /* Required: listener_rule_name */ +struct osc_create_internet_service_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; - /* - * A host-name pattern for the rule, with a maximum length of 128 - * characters. This host-name pattern supports maximum three wildcards, - * and must not contain any special characters except `-.?`. - */ - char *host_pattern; - /* - * The name of the listener rule. - */ - char *listener_rule_name; - /* - * A path pattern for the rule, with a maximum length of 128 characters. - * This path pattern supports maximum three wildcards, and must not - * contain any special characters except `_-.$/~"'@:+?`. - */ - char *path_pattern; }; -struct osc_update_image_arg { - /* Required: image_id */ - /* - * A new description for the image. - */ - char *description; +struct osc_create_keypair_arg { + /* Required: KeypairName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -7939,55 +7760,21 @@ struct osc_update_image_arg { int is_set_dry_run; int dry_run; /* - * The ID of the OMI you want to modify. + * A unique name for the keypair, with a maximum length of 255 [ASCII + * printable + * characters](https://en.wikipedia.org/wiki/ASCII#Printable_characters). */ - char *image_id; + char *keypair_name; /* - * Information about the permissions for the resource.
\nSpecify - * either the `Additions` or the `Removals` parameter. - * --PermissionsToLaunch.Additions: ref PermissionsOnResource - * Permissions for the resource. - * --PermissionsToLaunch.Additions.AccountIds: array string - * One or more account IDs that the permission is associated - * with. - * --PermissionsToLaunch.Additions.GlobalPermission: bool - * A global permission for all accounts.
\n(Request) Set - * this - * parameter to true to make the resource public (if the parent - * parameter is - * `Additions`) or to make the resource private (if the parent - * parameter is - * `Removals`).
\n(Response) If true, the resource is - * public. If false, - * the resource is private. - * --PermissionsToLaunch.Removals: ref PermissionsOnResource - * Permissions for the resource. - * --PermissionsToLaunch.Removals.AccountIds: array string - * One or more account IDs that the permission is associated - * with. - * --PermissionsToLaunch.Removals.GlobalPermission: bool - * A global permission for all accounts.
\n(Request) Set - * this - * parameter to true to make the resource public (if the parent - * parameter is - * `Additions`) or to make the resource private (if the parent - * parameter is - * `Removals`).
\n(Response) If true, the resource is - * public. If false, - * the resource is private. + * The public key to import in your account, if you are importing an + * existing keypair. This value must be Base64-encoded. */ - char *permissions_to_launch_str; - int is_set_permissions_to_launch; - struct permissions_on_resource_creation permissions_to_launch; + char *public_key; }; -struct osc_update_flexible_gpu_arg { - /* Required: flexible_gpu_id */ - /* - * If true, the fGPU is deleted when the VM is terminated. - */ - int is_set_delete_on_vm_deletion; - int delete_on_vm_deletion; +struct osc_create_listener_rule_arg { + /* Required: VmIds Listener ListenerRule + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -7995,37 +7782,53 @@ struct osc_update_flexible_gpu_arg { int is_set_dry_run; int dry_run; /* - * The ID of the fGPU you want to modify. - */ - char *flexible_gpu_id; -}; - -struct osc_update_direct_link_interface_arg { - /* Required: direct_link_interface_id, mtu */ - /* - * The ID of the DirectLink interface you want to update. + * Information about the load balancer. + * --Listener.LoadBalancerName: string + * The name of the load balancer to which the listener is attached. + * --Listener.LoadBalancerPort: long long int + * The port of load balancer on which the load balancer is listening + * (between `1` and `65535` both included). */ - char *direct_link_interface_id; + char *listener_str; + int is_set_listener; + struct load_balancer_light listener; /* - * If true, checks whether you have the required permissions to perform - * the action. + * Information about the listener rule. + * --ListenerRule.Action: string + * The type of action for the rule (always `forward`). + * --ListenerRule.HostNamePattern: string + * A host-name pattern for the rule, with a maximum length of 128 + * characters. This host-name pattern supports maximum three + * wildcards, and + * must not contain any special characters except `-.?`. + * --ListenerRule.ListenerRuleName: string + * A human-readable name for the listener rule. + * --ListenerRule.PathPattern: string + * A path pattern for the rule, with a maximum length of 128 + * characters. + * This path pattern supports maximum three wildcards, and must not + * contain + * any special characters except `_-.$/~"'@:+?`. + * --ListenerRule.Priority: long long int + * The priority level of the listener rule, between `1` and `19999` + * both + * included. Each rule must have a unique priority level. Otherwise, + * an + * error is returned. */ - int is_set_dry_run; - int dry_run; + char *listener_rule_str; + int is_set_listener_rule; + struct listener_rule_for_creation listener_rule; /* - * The maximum transmission unit (MTU) of the DirectLink interface, in - * bytes (always `1500`). + * The IDs of the backend VMs. */ - int is_set_mtu; - long long int mtu; + char *vm_ids_str; + char **vm_ids; }; -struct osc_update_dedicated_group_arg { - /* Required: dedicated_group_id, name */ - /* - * The ID of the dedicated group you want to update. - */ - char *dedicated_group_id; +struct osc_create_load_balancer_listeners_arg { + /* Required: Listeners LoadBalancerName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -8033,49 +7836,80 @@ struct osc_update_dedicated_group_arg { int is_set_dry_run; int dry_run; /* - * The new name of the dedicated group. + * One or more listeners for the load balancer. + * Information about the listener to create. + * --Listeners.INDEX.BackendPort: long long int + * The port on which the backend VM is listening (between `1` and + * `65535`, + * both included). + * --Listeners.INDEX.BackendProtocol: string + * The protocol for routing traffic to backend VMs (`HTTP` \\| + * `HTTPS` \\| + * `TCP` \\| `SSL`). + * --Listeners.INDEX.LoadBalancerPort: long long int + * The port on which the load balancer is listening (between `1` and + * `65535`, both included). + * --Listeners.INDEX.LoadBalancerProtocol: string + * The routing protocol (`HTTP` \\| `HTTPS` \\| `TCP` \\| `SSL`). + * --Listeners.INDEX.ServerCertificateId: string + * The OUTSCALE Resource Name (ORN) of the server certificate. For + * more + * information, see [Resource Identifiers > OUTSCALE Resource Names + * + * (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.ht + * ml#_ + * outscale_resource_names_orns). */ - char *name; + char *listeners_str; + int nb_listeners; + struct listener_for_creation *listeners; + /* + * The name of the load balancer for which you want to create listeners. + */ + char *load_balancer_name; }; -struct osc_update_ca_arg { - /* Required: ca_id */ +struct osc_create_load_balancer_policy_arg { + /* Required: PolicyType LoadBalancerName PolicyName + */ /* - * The ID of the CA. + * The lifetime of the cookie, in seconds. If not specified, the default + * value of this parameter is `1`, which means that the sticky session + * lasts for the duration of the browser session. */ - char *ca_id; + int is_set_cookie_expiration_period; + long long int cookie_expiration_period; /* - * The description of the CA. + * The name of the application cookie used for stickiness. This + * parameter is required if you create a stickiness policy based on an + * application-generated cookie. */ - char *description; + char *cookie_name; /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; -}; - -struct osc_update_api_access_rule_arg { - /* Required: api_access_rule_id */ - /* - * The ID of the API access rule you want to update. - */ - char *api_access_rule_id; /* - * One or more IDs of Client Certificate Authorities (CAs). + * The name of the load balancer for which you want to create a policy. */ - char *ca_ids_str; - char **ca_ids; + char *load_balancer_name; /* - * One or more Client Certificate Common Names (CNs). + * The unique name of the policy, with a maximum length of 32 + * alphanumeric characters and dashes (`-`). */ - char *cns_str; - char **cns; + char *policy_name; /* - * A new description for the API access rule. + * The type of stickiness policy you want to create: `app` or + * `load_balancer`. */ - char *description; + char *policy_type; +}; + +struct osc_create_load_balancer_arg { + /* Required: Listeners LoadBalancerName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -8083,66 +7917,88 @@ struct osc_update_api_access_rule_arg { int is_set_dry_run; int dry_run; /* - * One or more IPs or CIDR blocks (for example, `192.0.2.0/16`). - */ - char *ip_ranges_str; - char **ip_ranges; -}; - -struct osc_update_api_access_policy_arg { - /* Required: max_access_key_expiration_seconds, require_trusted_env */ - /* - * If true, checks whether you have the required permissions to perform - * the action. + * One or more listeners to create. + * Information about the listener to create. + * --Listeners.INDEX.BackendPort: long long int + * The port on which the backend VM is listening (between `1` and + * `65535`, + * both included). + * --Listeners.INDEX.BackendProtocol: string + * The protocol for routing traffic to backend VMs (`HTTP` \\| + * `HTTPS` \\| + * `TCP` \\| `SSL`). + * --Listeners.INDEX.LoadBalancerPort: long long int + * The port on which the load balancer is listening (between `1` and + * `65535`, both included). + * --Listeners.INDEX.LoadBalancerProtocol: string + * The routing protocol (`HTTP` \\| `HTTPS` \\| `TCP` \\| `SSL`). + * --Listeners.INDEX.ServerCertificateId: string + * The OUTSCALE Resource Name (ORN) of the server certificate. For + * more + * information, see [Resource Identifiers > OUTSCALE Resource Names + * + * (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.ht + * ml#_ + * outscale_resource_names_orns). */ - int is_set_dry_run; - int dry_run; + char *listeners_str; + int nb_listeners; + struct listener_for_creation *listeners; /* - * The maximum possible lifetime for your access keys, in seconds - * (between `0` and `3153600000`, both included). If set to `O`, your - * access keys can have unlimited lifetimes, but a trusted session - * cannot be activated. Otherwise, all your access keys must have an - * expiration date. This value must be greater than the remaining - * lifetime of each access key of your account. + * The unique name of the load balancer, with a maximum length of 32 + * alphanumeric characters and dashes (`-`). This name must not start or + * end with a dash. */ - int is_set_max_access_key_expiration_seconds; - long long int max_access_key_expiration_seconds; + char *load_balancer_name; /* - * If true, a trusted session is activated, provided that you specify - * the `MaxAccessKeyExpirationSeconds` parameter with a value greater - * than `0`.
\nEnabling this will require you and all your users to - * log in to Cockpit v2 using the WebAuthn method for multi-factor - * authentication. For more information, see [About Authentication > - * Multi-Factor - * Authentication](https://docs.outscale.com/en/userguide/About-Authentic - * ation.html#_multi_factor_authentication). + * The type of load balancer: `internet-facing` or `internal`. Use this + * parameter only for load balancers in a Net. */ - int is_set_require_trusted_env; - int require_trusted_env; -}; - -struct osc_update_account_arg { - /* Required:none */ + char *load_balancer_type; /* - * One or more additional email addresses for the account. These - * addresses are used for notifications only. If you already have a list - * of additional emails registered, you cannot add to it, only replace - * it. To remove all registered additional emails, specify an empty list. + * (internet-facing only) The public IP you want to associate with the + * load balancer. If not specified, a public IP owned by 3DS OUTSCALE is + * associated. */ - char *additional_emails_str; - char **additional_emails; + char *public_ip; /* - * The new city of the account owner. + * (Net only) One or more IDs of security groups you want to assign to + * the load balancer. If not specified, the default security group of + * the Net is assigned to the load balancer. */ - char *city; + char *security_groups_str; + char **security_groups; /* - * The new name of the company for the account. + * (Net only) The ID of the Subnet in which you want to create the load + * balancer. Regardless of this Subnet, the load balancer can distribute + * traffic to all Subnets. This parameter is required in a Net. */ - char *company_name; + char *subnets_str; + char **subnets; /* - * The new country of the account owner. + * (public Cloud only) The Subregion in which you want to create the + * load balancer. Regardless of this Subregion, the load balancer can + * distribute traffic to all Subregions. This parameter is required in + * the public Cloud. */ - char *country; + char *subregion_names_str; + char **subregion_names; + /* + * One or more tags assigned to the load balancer. + * Information about the tag. + * --Tags.INDEX.Key: string + * The key of the tag, with a minimum of 1 character. + * --Tags.INDEX.Value: string + * The value of the tag, between 0 and 255 characters. + */ + char *tags_str; + int nb_tags; + struct resource_tag *tags; +}; + +struct osc_create_load_balancer_tags_arg { + /* Required: LoadBalancerNames Tags + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -8150,50 +8006,30 @@ struct osc_update_account_arg { int is_set_dry_run; int dry_run; /* - * The main email address for the account. This address is used for your - * credentials and notifications. - */ - char *email; - /* - * The new first name of the account owner. - */ - char *first_name; - /* - * The new job title of the account owner. - */ - char *job_title; - /* - * The new last name of the account owner. - */ - char *last_name; - /* - * The new mobile phone number of the account owner. - */ - char *mobile_number; - /* - * The new landline phone number of the account owner. - */ - char *phone_number; - /* - * The new state/province of the account owner. - */ - char *state_province; - /* - * The new value added tax (VAT) number for the account. + * One or more load balancer names. */ - char *vat_number; + char *load_balancer_names_str; + char **load_balancer_names; /* - * The new ZIP code of the city. + * One or more tags to add to the specified load balancers. + * Information about the tag. + * --Tags.INDEX.Key: string + * The key of the tag, with a minimum of 1 character. + * --Tags.INDEX.Value: string + * The value of the tag, between 0 and 255 characters. */ - char *zip_code; + char *tags_str; + int nb_tags; + struct resource_tag *tags; }; -struct osc_update_access_key_arg { - /* Required: access_key_id, state */ +struct osc_create_nat_service_arg { + /* Required: PublicIpId SubnetId + */ /* - * The ID of the access key. + * A unique identifier which enables you to manage the idempotency. */ - char *access_key_id; + char *client_token; /* * If true, checks whether you have the required permissions to perform * the action. @@ -8201,29 +8037,20 @@ struct osc_update_access_key_arg { int is_set_dry_run; int dry_run; /* - * The date and time, or the date, at which you want the access key to - * expire, in ISO 8601 format (for example, `2020-06-14T00:00:00.000Z` - * or `2020-06-14`). If not specified, the access key is set to not - * expire. - */ - char *expiration_date; - /* - * The new state for the access key (`ACTIVE` \\| `INACTIVE`). When set - * to `ACTIVE`, the access key is enabled and can be used to send - * requests. When set to `INACTIVE`, the access key is disabled. + * The allocation ID of the public IP to associate with the NAT + * service.
\nIf the public IP is already associated with another + * resource, you must first disassociate it. */ - char *state; + char *public_ip_id; /* - * The name of the EIM user that the access key you want to modify is - * associated with. If you do not specify a user name, this action - * modifies the access key of the user who sends the request (which can - * be the root account). + * The ID of the Subnet in which you want to create the NAT service. */ - char *user_name; + char *subnet_id; }; -struct osc_unlink_volume_arg { - /* Required: volume_id */ +struct osc_create_net_access_point_arg { + /* Required: ServiceName NetId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -8231,37 +8058,33 @@ struct osc_unlink_volume_arg { int is_set_dry_run; int dry_run; /* - * Forces the detachment of the volume in case of previous failure. - * Important: This action may damage your data or file systems. + * The ID of the Net. */ - int is_set_force_unlink; - int force_unlink; + char *net_id; /* - * The ID of the volume you want to detach. + * One or more IDs of route tables to use for the connection. */ - char *volume_id; -}; - -struct osc_unlink_virtual_gateway_arg { - /* Required: net_id, virtual_gateway_id */ + char *route_table_ids_str; + char **route_table_ids; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The name of the service (in the format `com.outscale.region.service`). */ - int is_set_dry_run; - int dry_run; + char *service_name; +}; + +struct osc_create_net_peering_arg { + /* Required: AccepterNetId SourceNetId + */ /* - * The ID of the Net from which you want to detach the virtual gateway. + * The ID of the Net you want to connect with. */ - char *net_id; + char *accepter_net_id; /* - * The ID of the virtual gateway. + * The account ID of the owner of the Net you want to connect with. By + * default, the account ID of the owner of the Net from which the + * peering request is sent. */ - char *virtual_gateway_id; -}; - -struct osc_unlink_route_table_arg { - /* Required: link_route_table_id */ + char *accepter_owner_id; /* * If true, checks whether you have the required permissions to perform * the action. @@ -8269,13 +8092,14 @@ struct osc_unlink_route_table_arg { int is_set_dry_run; int dry_run; /* - * The ID of the association between the route table and the Subnet. + * The ID of the Net you send the peering request from. */ - char *link_route_table_id; + char *source_net_id; }; -struct osc_unlink_public_ip_arg { - /* Required:none */ +struct osc_create_net_arg { + /* Required: IpRange + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -8283,20 +8107,27 @@ struct osc_unlink_public_ip_arg { int is_set_dry_run; int dry_run; /* - * The ID representing the association of the public IP with the VM or - * the NIC. This parameter is required unless you use the `PublicIp` - * parameter. + * The IP range for the Net, in CIDR notation (for example, + * `10.0.0.0/16`). */ - char *link_public_ip_id; + char *ip_range; /* - * The public IP. This parameter is required unless you use the - * `LinkPublicIpId` parameter. + * The tenancy options for the VMs:
\n- `default` if a VM created + * in a Net can be launched with any tenancy.
\n- `dedicated` if it + * can be launched with dedicated tenancy VMs running on single-tenant + * hardware.
\n- `dedicated group ID`: if it can be launched in a + * dedicated group on single-tenant hardware. */ - char *public_ip; + char *tenancy; }; -struct osc_unlink_private_ips_arg { - /* Required: nic_id, private_ips */ +struct osc_create_nic_arg { + /* Required: SubnetId + */ + /* + * A description for the NIC. + */ + char *description; /* * If true, checks whether you have the required permissions to perform * the action. @@ -8304,39 +8135,46 @@ struct osc_unlink_private_ips_arg { int is_set_dry_run; int dry_run; /* - * The ID of the NIC. - */ - char *nic_id; - /* - * One or more secondary private IPs you want to unassign from the NIC. - */ - char *private_ips_str; - char **private_ips; -}; - -struct osc_unlink_policy_arg { - /* Required: policy_orn, user_name */ - /* - * If true, checks whether you have the required permissions to perform - * the action. + * The primary private IP for the NIC.
\nThis IP must be within the + * IP range of the Subnet that you specify with the `SubnetId` + * attribute.
\nIf you do not specify this attribute, a random + * private IP is selected within the IP range of the Subnet. + * Information about the private IP. + * --PrivateIps.INDEX.IsPrimary: bool + * If true, the IP is the primary private IP of the NIC. + * --PrivateIps.INDEX.PrivateIp: string + * The private IP of the NIC. */ - int is_set_dry_run; - int dry_run; + char *private_ips_str; + int nb_private_ips; + struct private_ip_light *private_ips; /* - * The OUTSCALE Resource Name (ORN) of the policy. For more information, - * see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie - * rs.html). + * One or more IDs of security groups for the NIC. */ - char *policy_orn; + char *security_group_ids_str; + char **security_group_ids; /* - * The name of the user you want to detach the policy from. + * The ID of the Subnet in which you want to create the NIC. */ - char *user_name; + char *subnet_id; }; -struct osc_unlink_nic_arg { - /* Required: link_nic_id */ +struct osc_create_policy_arg { + /* Required: Document PolicyName + */ + /* + * A description for the policy. + */ + char *description; + /* + * The policy document, corresponding to a JSON string that contains the + * policy. For more information, see [EIM Reference + * Information](https://docs.outscale.com/en/userguide/EIM-Reference-Info + * rmation.html) and [EIM Policy + * Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator + * .html). + */ + char *document; /* * If true, checks whether you have the required permissions to perform * the action. @@ -8344,19 +8182,27 @@ struct osc_unlink_nic_arg { int is_set_dry_run; int dry_run; /* - * The ID of the attachment operation. + * The path of the policy. */ - char *link_nic_id; + char *path; + /* + * The name of the policy. + */ + char *policy_name; }; -struct osc_unlink_managed_policy_from_user_group_arg { - /* Required: policy_orn, user_group_name */ +struct osc_create_policy_version_arg { + /* Required: Document PolicyOrn + */ /* - * If true, checks whether you have the required permissions to perform - * the action. + * The policy document, corresponding to a JSON string that contains the + * policy. For more information, see [EIM Reference + * Information](https://docs.outscale.com/en/userguide/EIM-Reference-Info + * rmation.html) and [EIM Policy + * Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator + * .html). */ - int is_set_dry_run; - int dry_run; + char *document; /* * The OUTSCALE Resource Name (ORN) of the policy. For more information, * see [Resource @@ -8365,23 +8211,20 @@ struct osc_unlink_managed_policy_from_user_group_arg { */ char *policy_orn; /* - * The name of the group you want to unlink the policy from. + * If set to true, the new policy version is set as the default version + * and becomes the operative one. */ - char *user_group_name; + int is_set_set_as_default; + int set_as_default; }; -struct osc_unlink_load_balancer_backend_machines_arg { - /* Required: load_balancer_name */ - /* - * One or more public IPs of backend VMs. - */ - char *backend_ips_str; - char **backend_ips; +struct osc_create_product_type_arg { + /* Required: Description + */ /* - * One or more IDs of backend VMs. + * The description of the product type. */ - char *backend_vm_ids_str; - char **backend_vm_ids; + char *description; /* * If true, checks whether you have the required permissions to perform * the action. @@ -8389,45 +8232,30 @@ struct osc_unlink_load_balancer_backend_machines_arg { int is_set_dry_run; int dry_run; /* - * The name of the load balancer. + * The vendor of the product type. */ - char *load_balancer_name; + char *vendor; }; -struct osc_unlink_internet_service_arg { - /* Required: internet_service_id, net_id */ +struct osc_create_public_ip_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; - /* - * The ID of the Internet service you want to detach. - */ - char *internet_service_id; - /* - * The ID of the Net from which you want to detach the Internet service. - */ - char *net_id; }; -struct osc_unlink_flexible_gpu_arg { - /* Required: flexible_gpu_id */ - /* - * If true, checks whether you have the required permissions to perform - * the action. - */ - int is_set_dry_run; - int dry_run; +struct osc_create_route_arg { + /* Required: DestinationIpRange RouteTableId + */ /* - * The ID of the fGPU you want to detach from your VM. + * The IP range used for the destination match, in CIDR notation (for + * example, `10.0.0.0/24`). */ - char *flexible_gpu_id; -}; - -struct osc_stop_vms_arg { - /* Required: vm_ids */ + char *destination_ip_range; /* * If true, checks whether you have the required permissions to perform * the action. @@ -8435,49 +8263,34 @@ struct osc_stop_vms_arg { int is_set_dry_run; int dry_run; /* - * Forces the VM to stop. + * The ID of an Internet service or virtual gateway attached to your Net. */ - int is_set_force_stop; - int force_stop; + char *gateway_id; /* - * One or more IDs of VMs. + * The ID of a NAT service. */ - char *vm_ids_str; - char **vm_ids; -}; - -struct osc_start_vms_arg { - /* Required: vm_ids */ + char *nat_service_id; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The ID of a Net peering. */ - int is_set_dry_run; - int dry_run; + char *net_peering_id; /* - * One or more IDs of VMs. + * The ID of a NIC. */ - char *vm_ids_str; - char **vm_ids; -}; - -struct osc_set_default_policy_version_arg { - /* Required: policy_orn, version_id */ + char *nic_id; /* - * The OUTSCALE Resource Name (ORN) of the policy. For more information, - * see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie - * rs.html). + * The ID of the route table for which you want to create a route. */ - char *policy_orn; + char *route_table_id; /* - * The ID of the version. + * The ID of a NAT VM in your Net (attached to exactly one NIC). */ - char *version_id; + char *vm_id; }; -struct osc_scale_up_vm_group_arg { - /* Required: vm_group_id, vm_addition */ +struct osc_create_route_table_arg { + /* Required: NetId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -8485,37 +8298,20 @@ struct osc_scale_up_vm_group_arg { int is_set_dry_run; int dry_run; /* - * The number of VMs you want to add to the VM group. - */ - int is_set_vm_addition; - long long int vm_addition; - /* - * The ID of the VM group you want to scale up. + * The ID of the Net for which you want to create a route table. */ - char *vm_group_id; + char *net_id; }; -struct osc_scale_down_vm_group_arg { - /* Required: vm_group_id, vm_subtraction */ - /* - * If true, checks whether you have the required permissions to perform - * the action. - */ - int is_set_dry_run; - int dry_run; - /* - * The ID of the VM group you want to scale down. - */ - char *vm_group_id; +struct osc_create_security_group_arg { + /* Required: Description SecurityGroupName + */ /* - * The number of VMs you want to delete from the VM group. + * A description for the security group.
\nThis description can + * contain between 1 and 255 characters. Allowed characters are `a-z`, + * `A-Z`, `0-9`, accented letters, spaces, and `_.-:/()#,@[]+=&;{}!$*`. */ - int is_set_vm_subtraction; - long long int vm_subtraction; -}; - -struct osc_remove_user_from_user_group_arg { - /* Required: user_group_name, user_name */ + char *description; /* * If true, checks whether you have the required permissions to perform * the action. @@ -8523,25 +8319,21 @@ struct osc_remove_user_from_user_group_arg { int is_set_dry_run; int dry_run; /* - * The name of the group you want to remove the user from. - */ - char *user_group_name; - /* - * The path to the group. If not specified, it is set to a slash (`/`). - */ - char *user_group_path; - /* - * The name of the user you want to remove from the group. + * The ID of the Net for the security group. */ - char *user_name; + char *net_id; /* - * The path to the user (by default, `/`). + * The name of the security group.
\nThis name must not start with + * `sg-`.
\nThis name must be unique and contain between 1 and 255 + * characters. Allowed characters are `a-z`, `A-Z`, `0-9`, spaces, and + * `_.-:/()#,@[]+=&;{}!$*`. */ - char *user_path; + char *security_group_name; }; -struct osc_reject_net_peering_arg { - /* Required: net_peering_id */ +struct osc_create_security_group_rule_arg { + /* Required: SecurityGroupId Flow + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -8549,48 +8341,123 @@ struct osc_reject_net_peering_arg { int is_set_dry_run; int dry_run; /* - * The ID of the Net peering you want to reject. + * The direction of the flow: `Inbound` or `Outbound`. You can specify + * `Outbound` for Nets only. */ - char *net_peering_id; -}; - -struct osc_register_vms_in_load_balancer_arg { - /* Required: backend_vm_ids, load_balancer_name */ + char *flow; /* - * One or more IDs of backend VMs.
\nSpecifying the same ID several - * times has no effect as each backend VM has equal weight. + * The beginning of the port range for the TCP and UDP protocols, or an + * ICMP type number. If you specify this parameter, you cannot specify + * the `Rules` parameter and its subparameters. */ - char *backend_vm_ids_str; - char **backend_vm_ids; + int is_set_from_port_range; + long long int from_port_range; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all + * protocols). By default, `-1`. In a Net, this can also be an IP + * protocol number. For more information, see the [IANA.org + * website](https://www.iana.org/assignments/protocol-numbers/protocol-nu + * mbers.xhtml). If you specify this parameter, you cannot specify the + * `Rules` parameter and its subparameters. */ - int is_set_dry_run; - int dry_run; + char *ip_protocol; /* - * The name of the load balancer. + * The IP range for the security group rule, in CIDR notation (for + * example, 10.0.0.0/16). If you specify this parameter, you cannot + * specify the `Rules` parameter and its subparameters. */ - char *load_balancer_name; -}; - -struct osc_reboot_vms_arg { - /* Required: vm_ids */ + char *ip_range; /* - * If true, checks whether you have the required permissions to perform - * the action. - */ - int is_set_dry_run; - int dry_run; + * Information about the security group rule to create. If you specify + * this parent parameter and its subparameters, you cannot specify the + * following parent parameters: `FromPortRange`, `IpProtocol`, + * `IpRange`, and `ToPortRange`. + * Information about the security group rule. + * --Rules.INDEX.FromPortRange: long long int + * The beginning of the port range for the TCP and UDP protocols, or + * an + * ICMP type number. + * --Rules.INDEX.IpProtocol: string + * The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all + * protocols). + * By default, `-1`. In a Net, this can also be an IP protocol + * number. For + * more information, see the [IANA.org + * + * website](https://www.iana.org/assignments/protocol-numbers/protocol-nu + * mber + * s.xhtml). + * --Rules.INDEX.IpRanges: array string + * One or more IP ranges for the security group rules, in CIDR + * notation + * (for example, `10.0.0.0/16`). + * --Rules.INDEX.SecurityGroupsMembers: array ref SecurityGroupsMember + * Information about one or more source or destination security + * groups. + * Information about a source or destination security group. + * --Rules.INDEX.SecurityGroupsMembers.INDEX.AccountId: string + * The account ID that owns the source or destination security + * group. + * --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupId: + * string + * The ID of a source or destination security group that you + * want to link + * to the security group of the rule. + * --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupName: + * string + * (Public Cloud only) The name of a source or destination + * security group + * that you want to link to the security group of the rule. + * --Rules.INDEX.ServiceIds: array string + * One or more service IDs to allow traffic from a Net to access the + * corresponding OUTSCALE services. For more information, see + * [ReadNetAccessPointServices](#readnetaccesspointservices). + * --Rules.INDEX.ToPortRange: long long int + * The end of the port range for the TCP and UDP protocols, or an + * ICMP code + * number. + */ + char *rules_str; + int nb_rules; + struct security_group_rule *rules; /* - * One or more IDs of the VMs you want to reboot. + * The account ID that owns the source or destination security group + * specified in the `SecurityGroupNameToLink` parameter. */ - char *vm_ids_str; - char **vm_ids; + char *security_group_account_id_to_link; + /* + * The ID of the security group for which you want to create a rule. + */ + char *security_group_id; + /* + * The ID of a source or destination security group that you want to + * link to the security group of the rule. + */ + char *security_group_name_to_link; + /* + * The end of the port range for the TCP and UDP protocols, or an ICMP + * code number. If you specify this parameter, you cannot specify the + * `Rules` parameter and its subparameters. + */ + int is_set_to_port_range; + long long int to_port_range; }; -struct osc_read_vpn_connections_arg { - /* Required:none */ +struct osc_create_server_certificate_arg { + /* Required: Body PrivateKey Name + */ + /* + * The PEM-encoded X509 certificate.
With OSC CLI, use the + * following syntax to make sure your certificate file is correctly + * parsed: `--Body="$(cat FILENAME)"`. + */ + char *body; + /* + * The PEM-encoded intermediate certification authorities.
With OSC + * CLI, use the following syntax to make sure your certificate chain + * file is correctly parsed: `--Chain="$(cat FILENAME)"`. + */ + char *chain; /* * If true, checks whether you have the required permissions to perform * the action. @@ -8598,61 +8465,27 @@ struct osc_read_vpn_connections_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.BgpAsns: array integer - * The Border Gateway Protocol (BGP) Autonomous System Numbers - * (ASNs) of - * the connections. - * --Filters.ClientGatewayIds: array string - * The IDs of the client gateways. - * --Filters.ConnectionTypes: array string - * The types of the VPN connections (always `ipsec.1`). - * --Filters.RouteDestinationIpRanges: array string - * The destination IP ranges. - * --Filters.States: array string - * The states of the VPN connections (`pending` \\| `available` \\| - * `deleting` \\| `deleted`). - * --Filters.StaticRoutesOnly: bool - * If false, the VPN connection uses dynamic routing with Border - * Gateway - * Protocol (BGP). If true, routing is controlled using static - * routes. For - * more information about how to create and delete static routes, - * see - * [CreateVpnConnectionRoute](#createvpnconnectionroute) and - * [DeleteVpnConnectionRoute](#deletevpnconnectionroute). - * --Filters.TagKeys: array string - * The keys of the tags associated with the VPN connections. - * --Filters.TagValues: array string - * The values of the tags associated with the VPN connections. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the VPN - * connections, in the following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. - * --Filters.VirtualGatewayIds: array string - * The IDs of the virtual gateways. - * --Filters.VpnConnectionIds: array string - * The IDs of the VPN connections. + * A unique name for the certificate. Constraints: 1-128 alphanumeric + * characters, pluses (`+`), equals (`=`), commas (`,`), periods (`.`), + * at signs (`@`), minuses (`-`), or underscores (`_`). */ - char *filters_str; - int is_set_filters; - struct filters_vpn_connection filters; + char *name; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * The path to the server certificate, set to a slash (`/`) if not + * specified. */ - char *next_page_token; + char *path; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The PEM-encoded private key matching the certificate.
With OSC + * CLI, use the following syntax to make sure your key file is correctly + * parsed: `--PrivateKey="$(cat FILENAME)"`. */ - int is_set_results_per_page; - long long int results_per_page; + char *private_key; }; -struct osc_read_volumes_arg { - /* Required:none */ +struct osc_create_snapshot_export_task_arg { + /* Required: OsuExport SnapshotId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -8660,74 +8493,40 @@ struct osc_read_volumes_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.CreationDates: array string - * The dates and times at which the volumes were created, in ISO - * 8601 - * date-time format (for example, `2020-06-30T00:00:00.000Z`). - * --Filters.LinkVolumeDeleteOnVmDeletion: bool - * Whether the volumes are deleted or not when terminating the VMs. - * --Filters.LinkVolumeDeviceNames: array string - * The VM device names. - * --Filters.LinkVolumeLinkDates: array string - * The dates and times at which the volumes were attached, in ISO - * 8601 - * date-time format (for example, `2020-06-30T00:00:00.000Z`). - * --Filters.LinkVolumeLinkStates: array string - * The attachment states of the volumes (`attaching` \\| `detaching` - * \\| - * `attached` \\| `detached`). - * --Filters.LinkVolumeVmIds: array string - * One or more IDs of VMs. - * --Filters.SnapshotIds: array string - * The snapshots from which the volumes were created. - * --Filters.SubregionNames: array string - * The names of the Subregions in which the volumes were created. - * --Filters.TagKeys: array string - * The keys of the tags associated with the volumes. - * --Filters.TagValues: array string - * The values of the tags associated with the volumes. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the - * volumes, in - * the following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. - * --Filters.VolumeIds: array string - * The IDs of the volumes. - * --Filters.VolumeSizes: array integer - * The sizes of the volumes, in gibibytes (GiB). - * --Filters.VolumeStates: array string - * The states of the volumes (`creating` \\| `available` \\| - * `in-use` \\| - * `updating` \\| `deleting` \\| `error`). - * --Filters.VolumeTypes: array string - * The types of the volumes (`standard` \\| `gp2` \\| `io1`). - */ - char *filters_str; - int is_set_filters; - struct filters_volume filters; - /* - * The token to request the next page of results. Each token refers to a - * specific page. + * Information about the OOS export task to create. + * --OsuExport.DiskImageFormat: string + * The format of the export disk (`qcow2` \\| `raw`). + * --OsuExport.OsuApiKey: ref OsuApiKey + * Information about the OOS API key. + * --OsuExport.OsuApiKey.ApiKeyId: string + * The API key of the OOS account that enables you to access the + * bucket. + * --OsuExport.OsuApiKey.SecretKey: string + * The secret key of the OOS account that enables you to access + * the bucket. + * --OsuExport.OsuBucket: string + * The name of the OOS bucket where you want to export the object. + * --OsuExport.OsuManifestUrl: string + * The URL of the manifest file. + * --OsuExport.OsuPrefix: string + * The prefix for the key of the OOS object. */ - char *next_page_token; + char *osu_export_str; + int is_set_osu_export; + struct osu_export_to_create osu_export; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The ID of the snapshot to export. */ - int is_set_results_per_page; - long long int results_per_page; + char *snapshot_id; }; -struct osc_read_vms_state_arg { - /* Required:none */ +struct osc_create_snapshot_arg { + /* Required: null + */ /* - * If true, includes the status of all VMs. By default or if set to - * false, only includes the status of running VMs. + * A description for the snapshot. */ - int is_set_all_vms; - int all_vms; + char *description; /* * If true, checks whether you have the required permissions to perform * the action. @@ -8735,61 +8534,38 @@ struct osc_read_vms_state_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.MaintenanceEventCodes: array string - * The code for the scheduled event (`system-reboot` \\| - * `system-maintenance`). - * --Filters.MaintenanceEventDescriptions: array string - * The description of the scheduled event. - * --Filters.MaintenanceEventsNotAfter: array string - * The latest date and time (UTC) the event can end. - * --Filters.MaintenanceEventsNotBefore: array string - * The earliest date and time (UTC) the event can start. - * --Filters.SubregionNames: array string - * The names of the Subregions of the VMs. - * --Filters.VmIds: array string - * One or more IDs of VMs. - * --Filters.VmStates: array string - * The states of the VMs (`pending` \\| `running` \\| `stopping` \\| - * `stopped` \\| `shutting-down` \\| `terminated` \\| `quarantine`). - */ - char *filters_str; - int is_set_filters; - struct filters_vms_state filters; - /* - * The token to request the next page of results. Each token refers to a - * specific page. + * **(when importing from a bucket)** The pre-signed URL of the snapshot + * you want to import. For more information, see [Creating a Pre-signed + * URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL. + * html). */ - char *next_page_token; + char *file_location; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * **(when importing from a bucket)** The size of the snapshot you want + * to create in your account, in bytes. This size must be greater than + * or equal to the size of the original, uncompressed snapshot. */ - int is_set_results_per_page; - long long int results_per_page; -}; - -struct osc_read_vms_health_arg { - /* Required: load_balancer_name */ + int is_set_snapshot_size; + long long int snapshot_size; /* - * One or more IDs of backend VMs. + * **(when copying a snapshot)** The name of the source Region, which + * must be the same as the Region of your account. */ - char *backend_vm_ids_str; - char **backend_vm_ids; + char *source_region_name; /* - * If true, checks whether you have the required permissions to perform - * the action. + * **(when copying a snapshot)** The ID of the snapshot you want to copy. */ - int is_set_dry_run; - int dry_run; + char *source_snapshot_id; /* - * The name of the load balancer. + * **(when creating from a volume)** The ID of the volume you want to + * create a snapshot of. */ - char *load_balancer_name; + char *volume_id; }; -struct osc_read_vms_arg { - /* Required:none */ +struct osc_create_subnet_arg { + /* Required: IpRange NetId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -8797,198 +8573,28 @@ struct osc_read_vms_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.Architectures: array string - * The architectures of the VMs (`i386` \\| `x86_64`). - * --Filters.BlockDeviceMappingDeleteOnVmDeletion: bool - * Whether the BSU volumes are deleted when terminating the VMs. - * --Filters.BlockDeviceMappingDeviceNames: array string - * The device names for the BSU volumes (in the format `/dev/sdX`, - * `/dev/sdXX`, `/dev/xvdX`, or `/dev/xvdXX`). - * --Filters.BlockDeviceMappingLinkDates: array string - * The link dates for the BSU volumes mapped to the VMs (for - * example, - * `2016-01-23T18:45:30.000Z`). - * --Filters.BlockDeviceMappingStates: array string - * The states for the BSU volumes (`attaching` \\| `attached` \\| - * `detaching` \\| `detached`). - * --Filters.BlockDeviceMappingVolumeIds: array string - * The volume IDs of the BSU volumes. - * --Filters.ClientTokens: array string - * The idempotency tokens provided when launching the VMs. - * --Filters.CreationDates: array string - * The dates when the VMs were launched. - * --Filters.ImageIds: array string - * The IDs of the OMIs used to launch the VMs. - * --Filters.IsSourceDestChecked: bool - * Whether the source/destination checking is enabled (true) or - * disabled - * (false). - * --Filters.KeypairNames: array string - * The names of the keypairs used when launching the VMs. - * --Filters.LaunchNumbers: array integer - * The numbers for the VMs when launching a group of several VMs - * (for - * example, `0`, `1`, `2`, and so on). - * --Filters.Lifecycles: array string - * Whether the VMs are Spot Instances (spot). - * --Filters.NetIds: array string - * The IDs of the Nets in which the VMs are running. - * --Filters.NicAccountIds: array string - * The IDs of the NICs. - * --Filters.NicDescriptions: array string - * The descriptions of the NICs. - * --Filters.NicIsSourceDestChecked: bool - * Whether the source/destination checking is enabled (true) or - * disabled - * (false). - * --Filters.NicLinkNicDeleteOnVmDeletion: bool - * Whether the NICs are deleted when the VMs they are attached to - * are - * deleted. - * --Filters.NicLinkNicDeviceNumbers: array integer - * The device numbers the NICs are attached to. - * --Filters.NicLinkNicLinkNicDates: array string - * The dates and times (UTC) when the NICs were attached to the VMs. - * --Filters.NicLinkNicLinkNicIds: array string - * The IDs of the NIC attachments. - * --Filters.NicLinkNicStates: array string - * The states of the attachments. - * --Filters.NicLinkNicVmAccountIds: array string - * The account IDs of the owners of the VMs the NICs are attached to. - * --Filters.NicLinkNicVmIds: array string - * The IDs of the VMs the NICs are attached to. - * --Filters.NicLinkPublicIpAccountIds: array string - * The account IDs of the owners of the public IPs associated with - * the - * NICs. - * --Filters.NicLinkPublicIpLinkPublicIpIds: array string - * The association IDs returned when the public IPs were associated - * with - * the NICs. - * --Filters.NicLinkPublicIpPublicIpIds: array string - * The allocation IDs returned when the public IPs were allocated to - * their - * accounts. - * --Filters.NicLinkPublicIpPublicIps: array string - * The public IPs associated with the NICs. - * --Filters.NicMacAddresses: array string - * The Media Access Control (MAC) addresses of the NICs. - * --Filters.NicNetIds: array string - * The IDs of the Nets where the NICs are located. - * --Filters.NicNicIds: array string - * The IDs of the NICs. - * --Filters.NicPrivateIpsLinkPublicIpAccountIds: array string - * The account IDs of the owner of the public IPs associated with - * the - * private IPs. - * --Filters.NicPrivateIpsLinkPublicIpIds: array string - * The public IPs associated with the private IPs. - * --Filters.NicPrivateIpsPrimaryIp: bool - * Whether the private IPs are the primary IPs associated with the - * NICs. - * --Filters.NicPrivateIpsPrivateIps: array string - * The private IPs of the NICs. - * --Filters.NicSecurityGroupIds: array string - * The IDs of the security groups associated with the NICs. - * --Filters.NicSecurityGroupNames: array string - * The names of the security groups associated with the NICs. - * --Filters.NicStates: array string - * The states of the NICs (`available` \\| `in-use`). - * --Filters.NicSubnetIds: array string - * The IDs of the Subnets for the NICs. - * --Filters.NicSubregionNames: array string - * The Subregions where the NICs are located. - * --Filters.Platforms: array string - * The platforms. Use windows if you have Windows VMs. Otherwise, - * leave - * this filter blank. - * --Filters.PrivateIps: array string - * The private IPs of the VMs. - * --Filters.ProductCodes: array string - * The product codes associated with the OMI used to create the VMs. - * --Filters.PublicIps: array string - * The public IPs of the VMs. - * --Filters.ReservationIds: array string - * The IDs of the reservation of the VMs, created every time you - * launch - * VMs. These reservation IDs can be associated with several VMs - * when you - * lauch a group of VMs using the same launch request. - * --Filters.RootDeviceNames: array string - * The names of the root devices for the VMs (for example, - * `/dev/sda1`) - * --Filters.RootDeviceTypes: array string - * The root devices types used by the VMs (always `ebs`) - * --Filters.SecurityGroupIds: array string - * The IDs of the security groups for the VMs (only in the public - * Cloud). - * --Filters.SecurityGroupNames: array string - * The names of the security groups for the VMs (only in the public - * Cloud). - * --Filters.StateReasonCodes: array integer - * The reason codes for the state changes. - * --Filters.StateReasonMessages: array string - * The messages describing the state changes. - * --Filters.StateReasons: array string - * The reasons explaining the current states of the VMs. This filter - * is - * like the `StateReasonCodes` one. - * --Filters.SubnetIds: array string - * The IDs of the Subnets for the VMs. - * --Filters.SubregionNames: array string - * The names of the Subregions of the VMs. - * --Filters.TagKeys: array string - * The keys of the tags associated with the VMs. - * --Filters.TagValues: array string - * The values of the tags associated with the VMs. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the VMs, in - * the - * following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. - * --Filters.Tenancies: array string - * The tenancies of the VMs (`dedicated` \\| `default` \\| `host`). - * --Filters.VmIds: array string - * One or more IDs of VMs. - * --Filters.VmSecurityGroupIds: array string - * The IDs of the security groups for the VMs. - * --Filters.VmSecurityGroupNames: array string - * The names of the security group for the VMs. - * --Filters.VmStateCodes: array integer - * The state codes of the VMs: `-1` (quarantine), `0` (pending), - * `16` - * (running), `32` (shutting-down), `48` (terminated), `64` - * (stopping), and - * `80` (stopped). - * --Filters.VmStateNames: array string - * The state names of the VMs (`pending` \\| `running` \\| - * `stopping` \\| - * `stopped` \\| `shutting-down` \\| `terminated` \\| `quarantine`). - * --Filters.VmTypes: array string - * The VM types (for example, t2.micro). For more information, see - * [VM - * Types](https://docs.outscale.com/en/userguide/VM-Types.html). + * The IP range in the Subnet, in CIDR notation (for example, + * `10.0.0.0/16`).
\nThe IP range of the Subnet can be either the + * same as the Net one if you create only a single Subnet in this Net, + * or a subset of the Net one. In case of several Subnets in a Net, + * their IP ranges must not overlap. The smallest Subnet you can create + * uses a /29 netmask (eight IPs). For more information, see [About + * Nets](https://docs.outscale.com/en/userguide/About-Nets.html). */ - char *filters_str; - int is_set_filters; - struct filters_vm filters; + char *ip_range; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * The ID of the Net for which you want to create a Subnet. */ - char *next_page_token; + char *net_id; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The name of the Subregion in which you want to create the Subnet. */ - int is_set_results_per_page; - long long int results_per_page; + char *subregion_name; }; -struct osc_read_vm_types_arg { - /* Required:none */ +struct osc_create_tags_arg { + /* Required: ResourceIds Tags + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -8996,47 +8602,26 @@ struct osc_read_vm_types_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.BsuOptimized: bool - * This parameter is not available. It is present in our API for the - * sake - * of historical compatibility with AWS. - * --Filters.EphemeralsTypes: array string - * The types of ephemeral storage disk. - * --Filters.Eths: array integer - * The number of Ethernet interfaces available. - * --Filters.Gpus: array integer - * The number of GPUs available. - * --Filters.MemorySizes: array double - * The amounts of memory, in gibibytes (GiB). - * --Filters.VcoreCounts: array integer - * The numbers of vCores. - * --Filters.VmTypeNames: array string - * The names of the VM types. For more information, see [VM - * Types](https://docs.outscale.com/en/userguide/VM-Types.html). - * --Filters.VolumeCounts: array integer - * The maximum number of ephemeral storage disks. - * --Filters.VolumeSizes: array integer - * The size of one ephemeral storage disk, in gibibytes (GiB). - */ - char *filters_str; - int is_set_filters; - struct filters_vm_type filters; - /* - * The token to request the next page of results. Each token refers to a - * specific page. + * One or more resource IDs. */ - char *next_page_token; + char *resource_ids_str; + char **resource_ids; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * One or more tags to add to the specified resources. + * Information about the tag. + * --Tags.INDEX.Key: string + * The key of the tag, with a minimum of 1 character. + * --Tags.INDEX.Value: string + * The value of the tag, between 0 and 255 characters. */ - int is_set_results_per_page; - long long int results_per_page; + char *tags_str; + int nb_tags; + struct resource_tag *tags; }; -struct osc_read_vm_templates_arg { - /* Required:none */ +struct osc_create_user_group_arg { + /* Required: UserGroupName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -9044,83 +8629,18 @@ struct osc_read_vm_templates_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.CpuCores: array integer - * The number of vCores. - * --Filters.CpuGenerations: array string - * The processor generations (for example, `v4`). - * --Filters.CpuPerformances: array string - * The performances of the VMs. - * --Filters.Descriptions: array string - * The descriptions of the VM templates. - * --Filters.ImageIds: array string - * The IDs of the OMIs. - * --Filters.KeypairNames: array string - * The names of the keypairs. - * --Filters.Rams: array integer - * The amount of RAM. - * --Filters.TagKeys: array string - * The keys of the tags associated with the VM templates. - * --Filters.TagValues: array string - * The values of the tags associated with the VM templates. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the VM - * templates, - * in the following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. - * --Filters.VmTemplateIds: array string - * The IDs of the VM templates. - * --Filters.VmTemplateNames: array string - * The names of the VM templates. - */ - char *filters_str; - int is_set_filters; - struct filters_vm_template filters; -}; - -struct osc_read_vm_groups_arg { - /* Required:none */ - /* - * If true, checks whether you have the required permissions to perform - * the action. + * The path to the group. If not specified, it is set to a slash (`/`). */ - int is_set_dry_run; - int dry_run; + char *path; /* - * One or more filters. - * --Filters.Descriptions: array string - * The descriptions of the VM groups. - * --Filters.SecurityGroupIds: array string - * The IDs of the security groups. - * --Filters.SubnetIds: array string - * The IDs of the Subnets. - * --Filters.TagKeys: array string - * The keys of the tags associated with the VM groups. - * --Filters.TagValues: array string - * The values of the tags associated with the VM groups. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the VMs, in - * the - * following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. - * --Filters.VmCounts: array integer - * The number of VMs in the VM group. - * --Filters.VmGroupIds: array string - * The IDs of the VM groups. - * --Filters.VmGroupNames: array string - * The names of the VM groups. - * --Filters.VmTemplateIds: array string - * The IDs of the VM templates. + * The name of the group. */ - char *filters_str; - int is_set_filters; - struct filters_vm_group filters; + char *user_group_name; }; -struct osc_read_virtual_gateways_arg { - /* Required:none */ +struct osc_create_user_arg { + /* Required: UserName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -9128,78 +8648,48 @@ struct osc_read_virtual_gateways_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.ConnectionTypes: array string - * The types of the virtual gateways (always `ipsec.1`). - * --Filters.LinkNetIds: array string - * The IDs of the Nets the virtual gateways are attached to. - * --Filters.LinkStates: array string - * The current states of the attachments between the virtual - * gateways and - * the Nets (`attaching` \\| `attached` \\| `detaching` \\| - * `detached`). - * --Filters.States: array string - * The states of the virtual gateways (`pending` \\| `available` \\| - * `deleting` \\| `deleted`). - * --Filters.TagKeys: array string - * The keys of the tags associated with the virtual gateways. - * --Filters.TagValues: array string - * The values of the tags associated with the virtual gateways. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the virtual - * gateways, in the following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. - * --Filters.VirtualGatewayIds: array string - * The IDs of the virtual gateways. + * The path to the EIM user you want to create (by default, `/`). This + * path name must begin and end with a slash (`/`), and contain between + * 1 and 512 alphanumeric characters and/or slashes (`/`), or + * underscores (`_`). */ - char *filters_str; - int is_set_filters; - struct filters_virtual_gateway filters; + char *path; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * The email address of the EIM user. */ - char *next_page_token; + char *user_email; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The name of the EIM user. This user name must contain between 1 and + * 64 alphanumeric characters and/or pluses (`+`), equals (`=`), commas + * (`,`), periods (`.`), at signs (`@`), dashes (`-`), or underscores + * (`_`). */ - int is_set_results_per_page; - long long int results_per_page; + char *user_name; }; -struct osc_read_users_arg { - /* Required:none */ +struct osc_create_virtual_gateway_arg { + /* Required: ConnectionType + */ + /* + * The type of VPN connection supported by the virtual gateway (always + * `ipsec.1`). + */ + char *connection_type; /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; - /* - * One or more filters. - * --Filters.UserIds: array string - * The IDs of the users. - */ - char *filters_str; - int is_set_filters; - struct filters_users filters; - /* - * The item starting the list of users requested. - */ - int is_set_first_item; - long long int first_item; - /* - * The maximum number of items that can be returned in a single response - * (by default, `100`). - */ - int is_set_results_per_page; - long long int results_per_page; }; -struct osc_read_user_groups_per_user_arg { - /* Required: user_name */ +struct osc_create_vm_group_arg { + /* Required: SecurityGroupIds SubnetId VmGroupName VmTemplateId VmCount + */ + /* + * A description for the VM group. + */ + char *description; /* * If true, checks whether you have the required permissions to perform * the action. @@ -9207,72 +8697,69 @@ struct osc_read_user_groups_per_user_arg { int is_set_dry_run; int dry_run; /* - * The name of the user. + * The positioning strategy of VMs on hypervisors. By default, or if set + * to `no-strategy` our orchestrator determines the most adequate + * position for your VMs. If set to `attract`, your VMs are deployed on + * the same hypervisor, which improves network performance. If set to + * `repulse`, your VMs are deployed on a different hypervisor, which + * improves fault tolerance. */ - char *user_name; + char *positioning_strategy; /* - * The path to the user (by default, `/`). + * One or more IDs of security groups for the VM group. */ - char *user_path; -}; - -struct osc_read_user_groups_arg { - /* Required:none */ + char *security_group_ids_str; + char **security_group_ids; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The ID of the Subnet in which you want to create the VM group. */ - int is_set_dry_run; - int dry_run; + char *subnet_id; /* - * One or more filters. - * --Filters.PathPrefix: string - * The path prefix of the groups. If not specified, it is set to a - * slash - * (`/`). - * --Filters.UserGroupIds: array string - * The IDs of the user groups. + * One or more tags to add to the VM group. + * Information about the tag. + * --Tags.INDEX.Key: string + * The key of the tag, with a minimum of 1 character. + * --Tags.INDEX.Value: string + * The value of the tag, between 0 and 255 characters. */ - char *filters_str; - int is_set_filters; - struct filters_user_group filters; + char *tags_str; + int nb_tags; + struct resource_tag *tags; /* - * The item starting the list of groups requested. + * The number of VMs deployed in the VM group. */ - int is_set_first_item; - long long int first_item; + int is_set_vm_count; + long long int vm_count; /* - * The maximum number of items that can be returned in a single response - * (by default, `100`). + * The name of the VM group. */ - int is_set_results_per_page; - long long int results_per_page; + char *vm_group_name; + /* + * The ID of the VM template used to launch VMs in the VM group. + */ + char *vm_template_id; }; -struct osc_read_user_group_policy_arg { - /* Required: policy_name, user_group_name */ +struct osc_create_vm_template_arg { + /* Required: CpuCores CpuGeneration ImageId Ram VmTemplateName + */ /* - * If true, checks whether you have the required permissions to perform - * the action. + * The number of vCores to use for each VM. */ - int is_set_dry_run; - int dry_run; + int is_set_cpu_cores; + long long int cpu_cores; /* - * The name of the policy. + * The processor generation to use for each VM (for example, `v4`). */ - char *policy_name; + char *cpu_generation; /* - * The name of the group. + * The performance of the VMs (`medium` \\| `high` \\| `highest`). */ - char *user_group_name; + char *cpu_performance; /* - * The path to the group. If not specified, it is set to a slash (`/`). + * A description for the VM template. */ - char *user_group_path; -}; - -struct osc_read_user_group_policies_arg { - /* Required: user_group_name */ + char *description; /* * If true, checks whether you have the required permissions to perform * the action. @@ -9280,118 +8767,117 @@ struct osc_read_user_group_policies_arg { int is_set_dry_run; int dry_run; /* - * The item starting the list of policies requested. - */ - int is_set_first_item; - long long int first_item; - /* - * The maximum number of items that can be returned in a single response - * (by default, `100`). - */ - int is_set_results_per_page; - long long int results_per_page; - /* - * The name of the group. + * The ID of the OMI to use for each VM. You can find a list of OMIs by + * calling the [ReadImages](#readimages) method. */ - char *user_group_name; + char *image_id; /* - * The path to the group. If not specified, it is set to a slash (`/`). + * The name of the keypair to use for each VM. */ - char *user_group_path; -}; - -struct osc_read_user_group_arg { - /* Required: user_group_name */ + char *keypair_name; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The amount of RAM to use for each VM. */ - int is_set_dry_run; - int dry_run; + int is_set_ram; + long long int ram; /* - * The path to the group. If not specified, it is set to a slash (`/`). + * One or more tags to add to the VM template. + * Information about the tag. + * --Tags.INDEX.Key: string + * The key of the tag, with a minimum of 1 character. + * --Tags.INDEX.Value: string + * The value of the tag, between 0 and 255 characters. */ - char *path; + char *tags_str; + int nb_tags; + struct resource_tag *tags; /* - * The name of the group. + * The name of the VM template. */ - char *user_group_name; + char *vm_template_name; }; -struct osc_read_unit_price_arg { - /* Required: operation, service, type */ - /* - * The operation associated with the catalog entry (for example, - * `RunInstances-OD` or `CreateVolume`). - */ - char *operation; - /* - * The service associated with the catalog entry (for example, - * `TinaOS-FCU` or `TinaOS-OOS`). - */ - char *service; +struct osc_create_vms_arg { + /* Required: ImageId + */ /* - * The type associated with the catalog entry (for example, - * `BSU:VolumeIOPS:io1` or `BoxUsage:tinav6.c6r16p3`). + * One or more block device mappings. + * Information about the block device mapping. + * --BlockDeviceMappings.INDEX.Bsu: ref BsuToCreate + * Information about the BSU volume to create. + * --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool + * By default or if set to true, the volume is deleted when + * terminating the + * VM. If false, the volume is not deleted when terminating the + * VM. + * --BlockDeviceMappings.INDEX.Bsu.Iops: long long int + * The number of I/O operations per second (IOPS). This + * parameter must be + * specified only if you create an `io1` volume. The maximum + * number of IOPS + * allowed for `io1` volumes is `13000` with a maximum + * performance ratio of + * 300 IOPS per gibibyte. + * --BlockDeviceMappings.INDEX.Bsu.SnapshotId: string + * The ID of the snapshot used to create the volume. + * --BlockDeviceMappings.INDEX.Bsu.VolumeSize: long long int + * The size of the volume, in gibibytes (GiB).
\nIf you + * specify a + * snapshot ID, the volume size must be at least equal to the + * snapshot + * size.
\nIf you specify a snapshot ID but no volume size, + * the volume + * is created with a size similar to the snapshot one. + * --BlockDeviceMappings.INDEX.Bsu.VolumeType: string + * The type of the volume (`standard` \\| `io1` \\| `gp2`). If + * not + * specified in the request, a `standard` volume is created.
\nFor more + * information about volume types, see [About Volumes > Volume + * Types and + * + * IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volum + * e_ty + * pes_and_iops). + * --BlockDeviceMappings.INDEX.DeviceName: string + * The device name for the volume. For a root device, you must use + * `/dev/sda1`. For other volumes, you must use `/dev/sdX`, + * `/dev/sdXX`, + * `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter + * between `b` + * and `z`, and the second `X` is a letter between `a` and `z`). + * --BlockDeviceMappings.INDEX.NoDevice: string + * Removes the device which is included in the block device mapping + * of the + * OMI. + * --BlockDeviceMappings.INDEX.VirtualDeviceName: string + * The name of the virtual device (`ephemeralN`). */ - char *type; -}; - -struct osc_read_tags_arg { - /* Required:none */ + char *block_device_mappings_str; + int nb_block_device_mappings; + struct block_device_mapping_vm_creation *block_device_mappings; /* - * If true, checks whether you have the required permissions to perform - * the action. + * By default or if true, the VM is started on creation. If false, the + * VM is stopped on creation. */ - int is_set_dry_run; - int dry_run; + int is_set_boot_on_creation; + int boot_on_creation; /* - * One or more filters. - * --Filters.Keys: array string - * The keys of the tags that are assigned to the resources. You can - * use - * this filter alongside the `Values` filter. In that case, you - * filter the - * resources corresponding to each tag, regardless of the other - * filter. - * --Filters.ResourceIds: array string - * The IDs of the resources with which the tags are associated. - * --Filters.ResourceTypes: array string - * The resource type (`vm` \\| `image` \\| `volume` \\| `snapshot` - * \\| - * `public-ip` \\| `security-group` \\| `route-table` \\| `nic` \\| - * `net` - * \\| `subnet` \\| `net-peering` \\| `net-access-point` \\| - * `nat-service` - * \\| `internet-service` \\| `client-gateway` \\| `virtual-gateway` - * \\| - * `vpn-connection` \\| `dhcp-options` \\| `task`). - * --Filters.Values: array string - * The values of the tags that are assigned to the resources. You - * can use - * this filter alongside the `TagKeys` filter. In that case, you - * filter the - * resources corresponding to each tag, regardless of the other - * filter. + * This parameter is not available. It is present in our API for the + * sake of historical compatibility with AWS. */ - char *filters_str; - int is_set_filters; - struct filters_tag filters; + int is_set_bsu_optimized; + int bsu_optimized; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * A unique identifier which enables you to manage the idempotency. */ - char *next_page_token; + char *client_token; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * If true, you cannot delete the VM unless you change this parameter + * back to false. */ - int is_set_results_per_page; - long long int results_per_page; -}; - -struct osc_read_subregions_arg { - /* Required:none */ + int is_set_deletion_protection; + int deletion_protection; /* * If true, checks whether you have the required permissions to perform * the action. @@ -9399,182 +8885,159 @@ struct osc_read_subregions_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.RegionNames: array string - * The names of the Regions containing the Subregions. - * --Filters.States: array string - * The states of the Subregions. - * --Filters.SubregionNames: array string - * The names of the Subregions. + * The ID of the OMI used to create the VM. You can find the list of + * OMIs by calling the [ReadImages](#readimages) method. */ - char *filters_str; - int is_set_filters; - struct filters_subregion filters; + char *image_id; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * The name of the keypair. */ - char *next_page_token; + char *keypair_name; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The maximum number of VMs you want to create. If all the VMs cannot + * be created, the largest possible number of VMs above MinVmsCount is + * created. */ - int is_set_results_per_page; - long long int results_per_page; -}; - -struct osc_read_subnets_arg { - /* Required:none */ + int is_set_max_vms_count; + long long int max_vms_count; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The minimum number of VMs you want to create. If this number of VMs + * cannot be created, no VMs are created. */ - int is_set_dry_run; - int dry_run; + int is_set_min_vms_count; + long long int min_vms_count; /* - * One or more filters. - * --Filters.AvailableIpsCounts: array integer - * The number of available IPs. - * --Filters.IpRanges: array string - * The IP ranges in the Subnets, in CIDR notation (for example, - * `10.0.0.0/16`). - * --Filters.NetIds: array string - * The IDs of the Nets in which the Subnets are. - * --Filters.States: array string - * The states of the Subnets (`pending` \\| `available` \\| - * `deleted`). - * --Filters.SubnetIds: array string - * The IDs of the Subnets. - * --Filters.SubregionNames: array string - * The names of the Subregions in which the Subnets are located. - * --Filters.TagKeys: array string - * The keys of the tags associated with the Subnets. - * --Filters.TagValues: array string - * The values of the tags associated with the Subnets. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the - * Subnets, in - * the following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * (dedicated tenancy only) If true, nested virtualization is enabled. + * If false, it is disabled. */ - char *filters_str; - int is_set_filters; - struct filters_subnet filters; + int is_set_nested_virtualization; + int nested_virtualization; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * One or more NICs. If you specify this parameter, you must not specify + * the `SubnetId` and `SubregionName` parameters. You also must define + * one NIC as the primary network interface of the VM with `0` as its + * device number. + * Information about the network interface card (NIC) when creating a + * virtual machine (VM). + * --Nics.INDEX.DeleteOnVmDeletion: bool + * If true, the NIC is deleted when the VM is terminated. You can + * specify + * this parameter only for a new NIC. To modify this value for an + * existing + * NIC, see [UpdateNic](#updatenic). + * --Nics.INDEX.Description: string + * The description of the NIC, if you are creating a NIC when + * creating the + * VM. + * --Nics.INDEX.DeviceNumber: long long int + * The index of the VM device for the NIC attachment (between `0` + * and `7`, + * both included). This parameter is required if you create a NIC + * when + * creating the VM. + * --Nics.INDEX.NicId: string + * The ID of the NIC, if you are attaching an existing NIC when + * creating a + * VM. + * --Nics.INDEX.PrivateIps: array ref PrivateIpLight + * One or more private IPs to assign to the NIC, if you create a NIC + * when + * creating a VM. Only one private IP can be the primary private IP. + * Information about the private IP. + * --Nics.INDEX.PrivateIps.INDEX.IsPrimary: bool + * If true, the IP is the primary private IP of the NIC. + * --Nics.INDEX.PrivateIps.INDEX.PrivateIp: string + * The private IP of the NIC. + * --Nics.INDEX.SecondaryPrivateIpCount: long long int + * The number of secondary private IPs, if you create a NIC when + * creating a + * VM. This parameter cannot be specified if you specified more than + * one + * private IP in the `PrivateIps` parameter. + * --Nics.INDEX.SecurityGroupIds: array string + * One or more IDs of security groups for the NIC, if you create a + * NIC when + * creating a VM. + * --Nics.INDEX.SubnetId: string + * The ID of the Subnet for the NIC, if you create a NIC when + * creating a + * VM. This parameter is required if you create a NIC when creating + * the VM. */ - char *next_page_token; + char *nics_str; + int nb_nics; + struct nic_for_vm_creation *nics; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The performance of the VM (`medium` \\| `high` \\| `highest`). By + * default, `high`. This parameter is ignored if you specify a + * performance flag directly in the `VmType` parameter. */ - int is_set_results_per_page; - long long int results_per_page; -}; - -struct osc_read_snapshots_arg { - /* Required:none */ + char *performance; /* - * If true, checks whether you have the required permissions to perform - * the action. + * Information about the placement of the VM. + * --Placement.SubregionName: string + * The name of the Subregion. If you specify this parameter, you + * must not + * specify the `Nics` parameter. + * --Placement.Tenancy: string + * The tenancy of the VM (`default`, `dedicated`, or a dedicated + * group ID). */ - int is_set_dry_run; - int dry_run; + char *placement_str; + int is_set_placement; + struct placement placement; /* - * One or more filters. - * --Filters.AccountAliases: array string - * The account aliases of the owners of the snapshots. - * --Filters.AccountIds: array string - * The account IDs of the owners of the snapshots. - * --Filters.Descriptions: array string - * The descriptions of the snapshots. - * --Filters.FromCreationDate: string - * The beginning of the time period, in ISO 8601 date-time format - * (for - * example, `2020-06-14T00:00:00.000Z`). - * --Filters.PermissionsToCreateVolumeAccountIds: array string - * The account IDs which have permissions to create volumes. - * --Filters.PermissionsToCreateVolumeGlobalPermission: bool - * If true, lists all public volumes. If false, lists all private - * volumes. - * --Filters.Progresses: array integer - * The progresses of the snapshots, as a percentage. - * --Filters.SnapshotIds: array string - * The IDs of the snapshots. - * --Filters.States: array string - * The states of the snapshots (`in-queue` \\| `pending` \\| - * `completed` - * \\| `error` \\| `deleting`). - * --Filters.TagKeys: array string - * The keys of the tags associated with the snapshots. - * --Filters.TagValues: array string - * The values of the tags associated with the snapshots. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the - * snapshots, in - * the following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. - * --Filters.ToCreationDate: string - * The end of the time period, in ISO 8601 date-time format (for - * example, - * `2020-06-30T00:00:00.000Z`). - * --Filters.VolumeIds: array string - * The IDs of the volumes used to create the snapshots. - * --Filters.VolumeSizes: array integer - * The sizes of the volumes used to create the snapshots, in - * gibibytes - * (GiB). + * One or more private IPs of the VM. */ - char *filters_str; - int is_set_filters; - struct filters_snapshot filters; + char *private_ips_str; + char **private_ips; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * One or more IDs of security group for the VMs. */ - char *next_page_token; + char *security_group_ids_str; + char **security_group_ids; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * One or more names of security groups for the VMs. */ - int is_set_results_per_page; - long long int results_per_page; -}; - -struct osc_read_snapshot_export_tasks_arg { - /* Required:none */ + char *security_groups_str; + char **security_groups; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The ID of the Subnet in which you want to create the VM. If you + * specify this parameter, you must not specify the `Nics` parameter. */ - int is_set_dry_run; - int dry_run; + char *subnet_id; /* - * One or more filters. - * --Filters.TaskIds: array string - * The IDs of the export tasks. + * Data or script used to add a specific configuration to the VM. It + * must be Base64-encoded and is limited to 500 kibibytes (KiB). For + * more information about user data, see [Configuring a VM with User + * Data and OUTSCALE + * Tags](https://docs.outscale.com/en/userguide/Configuring-a-VM-with-Use + * r-Data-and-OUTSCALE-Tags.html). */ - char *filters_str; - int is_set_filters; - struct filters_export_task filters; + char *user_data; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * The VM behavior when you stop it. By default or if set to `stop`, the + * VM stops. If set to `restart`, the VM stops then automatically + * restarts. If set to `terminate`, the VM stops and is terminated. */ - char *next_page_token; + char *vm_initiated_shutdown_behavior; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The type of VM. You can specify a TINA type (in the `tinavW.cXrYpZ` + * or `tinavW.cXrY` format), or an AWS type (for example, `t2.small`, + * which is the default value).
\nIf you specify an AWS type, it is + * converted in the background to its corresponding TINA type, but the + * AWS type is still returned. If the specified or converted TINA type + * includes a performance flag, this performance flag is applied + * regardless of the value you may have provided in the `Performance` + * parameter. For more information, see [VM + * Types](https://docs.outscale.com/en/userguide/VM-Types.html). */ - int is_set_results_per_page; - long long int results_per_page; + char *vm_type; }; -struct osc_read_server_certificates_arg { - /* Required:none */ +struct osc_create_volume_arg { + /* Required: SubregionName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -9582,17 +9045,50 @@ struct osc_read_server_certificates_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.Paths: array string - * The paths to the server certificates. + * The number of I/O operations per second (IOPS). This parameter must + * be specified only if you create an `io1` volume. The maximum number + * of IOPS allowed for `io1` volumes is `13000` with a maximum + * performance ratio of 300 IOPS per gibibyte. */ - char *filters_str; - int is_set_filters; - struct filters_server_certificate filters; + int is_set_iops; + long long int iops; + /* + * The size of the volume, in gibibytes (GiB). The maximum allowed size + * for a volume is 14901 GiB. This parameter is required if the volume + * is not created from a snapshot (`SnapshotId` unspecified). + */ + int is_set_size; + long long int size; + /* + * The ID of the snapshot from which you want to create the volume. + */ + char *snapshot_id; + /* + * The Subregion in which you want to create the volume. + */ + char *subregion_name; + /* + * The type of volume you want to create (`io1` \\| `gp2` \\| + * `standard`). If not specified, a `standard` volume is created.
\nFor more information about volume types, see [About Volumes > + * Volume Types and + * IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volum + * e_types_and_iops). + */ + char *volume_type; }; -struct osc_read_security_groups_arg { - /* Required:none */ +struct osc_create_vpn_connection_arg { + /* Required: ClientGatewayId ConnectionType VirtualGatewayId + */ + /* + * The ID of the client gateway. + */ + char *client_gateway_id; + /* + * The type of VPN connection (always `ipsec.1`). + */ + char *connection_type; /* * If true, checks whether you have the required permissions to perform * the action. @@ -9600,93 +9096,46 @@ struct osc_read_security_groups_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.Descriptions: array string - * The descriptions of the security groups. - * --Filters.InboundRuleAccountIds: array string - * The account IDs that have been granted permissions. - * --Filters.InboundRuleFromPortRanges: array integer - * The beginnings of the port ranges for the TCP and UDP protocols, - * or the - * ICMP type numbers. - * --Filters.InboundRuleIpRanges: array string - * The IP ranges that have been granted permissions, in CIDR - * notation (for - * example, `10.0.0.0/24`). - * --Filters.InboundRuleProtocols: array string - * The IP protocols for the permissions (`tcp` \\| `udp` \\| `icmp`, - * or a - * protocol number, or `-1` for all protocols). - * --Filters.InboundRuleSecurityGroupIds: array string - * The IDs of the security groups that have been granted permissions. - * --Filters.InboundRuleSecurityGroupNames: array string - * The names of the security groups that have been granted - * permissions. - * --Filters.InboundRuleToPortRanges: array integer - * The ends of the port ranges for the TCP and UDP protocols, or the - * ICMP - * code numbers. - * --Filters.NetIds: array string - * The IDs of the Nets specified when the security groups were - * created. - * --Filters.OutboundRuleAccountIds: array string - * The account IDs that have been granted permissions. - * --Filters.OutboundRuleFromPortRanges: array integer - * The beginnings of the port ranges for the TCP and UDP protocols, - * or the - * ICMP type numbers. - * --Filters.OutboundRuleIpRanges: array string - * The IP ranges that have been granted permissions, in CIDR - * notation (for - * example, `10.0.0.0/24`). - * --Filters.OutboundRuleProtocols: array string - * The IP protocols for the permissions (`tcp` \\| `udp` \\| `icmp`, - * or a - * protocol number, or `-1` for all protocols). - * --Filters.OutboundRuleSecurityGroupIds: array string - * The IDs of the security groups that have been granted permissions. - * --Filters.OutboundRuleSecurityGroupNames: array string - * The names of the security groups that have been granted - * permissions. - * --Filters.OutboundRuleToPortRanges: array integer - * The ends of the port ranges for the TCP and UDP protocols, or the - * ICMP - * code numbers. - * --Filters.SecurityGroupIds: array string - * The IDs of the security groups. - * --Filters.SecurityGroupNames: array string - * The names of the security groups. - * --Filters.TagKeys: array string - * The keys of the tags associated with the security groups. - * --Filters.TagValues: array string - * The values of the tags associated with the security groups. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the - * security - * groups, in the following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * By default or if false, the VPN connection uses dynamic routing with + * Border Gateway Protocol (BGP). If true, routing is controlled using + * static routes. For more information about how to create and delete + * static routes, see + * [CreateVpnConnectionRoute](#createvpnconnectionroute) and + * [DeleteVpnConnectionRoute](#deletevpnconnectionroute). */ - char *filters_str; - int is_set_filters; - struct filters_security_group filters; + int is_set_static_routes_only; + int static_routes_only; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * The ID of the virtual gateway. */ - char *next_page_token; + char *virtual_gateway_id; +}; + +struct osc_create_vpn_connection_route_arg { + /* Required: DestinationIpRange VpnConnectionId + */ /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The network prefix of the route, in CIDR notation (for example, + * `10.12.0.0/16`). */ - int is_set_results_per_page; - long long int results_per_page; + char *destination_ip_range; + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * The ID of the target VPN connection of the static route. + */ + char *vpn_connection_id; }; -struct osc_read_secret_access_key_arg { - /* Required: access_key_id */ +struct osc_delete_access_key_arg { + /* Required: AccessKeyId + */ /* - * The ID of the access key. + * The ID of the access key you want to delete. */ char *access_key_id; /* @@ -9695,123 +9144,128 @@ struct osc_read_secret_access_key_arg { */ int is_set_dry_run; int dry_run; + /* + * The name of the EIM user the access key you want to delete is + * associated with. By default, the user who sends the request (which + * can be the root account). + */ + char *user_name; }; -struct osc_read_route_tables_arg { - /* Required:none */ +struct osc_delete_api_access_rule_arg { + /* Required: ApiAccessRuleId + */ + /* + * The ID of the API access rule you want to delete. + */ + char *api_access_rule_id; /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; +}; + +struct osc_delete_ca_arg { + /* Required: CaId + */ /* - * One or more filters. - * --Filters.LinkRouteTableIds: array string - * The IDs of the route tables involved in the associations. - * --Filters.LinkRouteTableLinkRouteTableIds: array string - * The IDs of the associations between the route tables and the - * Subnets. - * --Filters.LinkRouteTableMain: bool - * If true, the route tables are the main ones for their Nets. - * --Filters.LinkSubnetIds: array string - * The IDs of the Subnets involved in the associations. - * --Filters.NetIds: array string - * The IDs of the Nets for the route tables. - * --Filters.RouteCreationMethods: array string - * The methods used to create a route. - * --Filters.RouteDestinationIpRanges: array string - * The IP ranges specified in routes in the tables. - * --Filters.RouteDestinationServiceIds: array string - * The service IDs specified in routes in the tables. - * --Filters.RouteGatewayIds: array string - * The IDs of the gateways specified in routes in the tables. - * --Filters.RouteNatServiceIds: array string - * The IDs of the NAT services specified in routes in the tables. - * --Filters.RouteNetPeeringIds: array string - * The IDs of the Net peerings specified in routes in the tables. - * --Filters.RouteStates: array string - * The states of routes in the route tables (always `active`). - * --Filters.RouteTableIds: array string - * The IDs of the route tables. - * --Filters.RouteVmIds: array string - * The IDs of the VMs specified in routes in the tables. - * --Filters.TagKeys: array string - * The keys of the tags associated with the route tables. - * --Filters.TagValues: array string - * The values of the tags associated with the route tables. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the route - * tables, - * in the following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * The ID of the CA you want to delete. */ - char *filters_str; - int is_set_filters; - struct filters_route_table filters; + char *ca_id; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * If true, checks whether you have the required permissions to perform + * the action. */ - char *next_page_token; + int is_set_dry_run; + int dry_run; +}; + +struct osc_delete_client_gateway_arg { + /* Required: ClientGatewayId + */ /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The ID of the client gateway you want to delete. */ - int is_set_results_per_page; - long long int results_per_page; + char *client_gateway_id; + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; }; -struct osc_read_regions_arg { - /* Required:none */ +struct osc_delete_dedicated_group_arg { + /* Required: DedicatedGroupId + */ + /* + * The ID of the dedicated group you want to delete. + */ + char *dedicated_group_id; /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; + /* + * If true, forces the deletion of the dedicated group and all its + * dependencies. + */ + int is_set_force; + int force; }; -struct osc_read_quotas_arg { - /* Required:none */ +struct osc_delete_dhcp_options_arg { + /* Required: DhcpOptionsSetId + */ + /* + * The ID of the DHCP options set you want to delete. + */ + char *dhcp_options_set_id; /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; +}; + +struct osc_delete_direct_link_interface_arg { + /* Required: DirectLinkInterfaceId + */ /* - * One or more filters. - * --Filters.Collections: array string - * The group names of the quotas. - * --Filters.QuotaNames: array string - * The names of the quotas. - * --Filters.QuotaTypes: array string - * The resource IDs if these are resource-specific quotas, `global` - * if they - * are not. - * --Filters.ShortDescriptions: array string - * The description of the quotas. + * The ID of the DirectLink interface you want to delete. */ - char *filters_str; - int is_set_filters; - struct filters_quota filters; + char *direct_link_interface_id; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * If true, checks whether you have the required permissions to perform + * the action. */ - char *next_page_token; + int is_set_dry_run; + int dry_run; +}; + +struct osc_delete_direct_link_arg { + /* Required: DirectLinkId + */ /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The ID of the DirectLink you want to delete. */ - int is_set_results_per_page; - long long int results_per_page; + char *direct_link_id; + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; }; -struct osc_read_public_ips_arg { - /* Required:none */ +struct osc_delete_export_task_arg { + /* Required: ExportTaskId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -9819,54 +9273,29 @@ struct osc_read_public_ips_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.LinkPublicIpIds: array string - * The IDs representing the associations of public IPs with VMs or - * NICs. - * --Filters.NicAccountIds: array string - * The account IDs of the owners of the NICs. - * --Filters.NicIds: array string - * The IDs of the NICs. - * --Filters.Placements: array string - * Whether the public IPs are for use in the public Cloud or in a - * Net. - * --Filters.PrivateIps: array string - * The private IPs associated with the public IPs. - * --Filters.PublicIpIds: array string - * The IDs of the public IPs. - * --Filters.PublicIps: array string - * The public IPs. - * --Filters.TagKeys: array string - * The keys of the tags associated with the public IPs. - * --Filters.TagValues: array string - * The values of the tags associated with the public IPs. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the public - * IPs, in - * the following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. - * --Filters.VmIds: array string - * The IDs of the VMs. + * The ID of the export task to delete. */ - char *filters_str; - int is_set_filters; - struct filters_public_ip filters; + char *export_task_id; +}; + +struct osc_delete_flexible_gpu_arg { + /* Required: FlexibleGpuId + */ /* - * The token to request the next page of results. Each token refers to a - * specific page. + * If true, checks whether you have the required permissions to perform + * the action. */ - char *next_page_token; + int is_set_dry_run; + int dry_run; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The ID of the fGPU you want to delete. */ - int is_set_results_per_page; - long long int results_per_page; + char *flexible_gpu_id; }; -struct osc_read_public_ip_ranges_arg { - /* Required:none */ +struct osc_delete_image_arg { + /* Required: ImageId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -9874,30 +9303,44 @@ struct osc_read_public_ip_ranges_arg { int is_set_dry_run; int dry_run; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * The ID of the OMI you want to delete. */ - char *next_page_token; + char *image_id; +}; + +struct osc_delete_internet_service_arg { + /* Required: InternetServiceId + */ /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * If true, checks whether you have the required permissions to perform + * the action. */ - int is_set_results_per_page; - long long int results_per_page; + int is_set_dry_run; + int dry_run; + /* + * The ID of the Internet service you want to delete. + */ + char *internet_service_id; }; -struct osc_read_public_catalog_arg { - /* Required:none */ +struct osc_delete_keypair_arg { + /* Required: KeypairName + */ /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; + /* + * The name of the keypair you want to delete. + */ + char *keypair_name; }; -struct osc_read_product_types_arg { - /* Required:none */ +struct osc_delete_listener_rule_arg { + /* Required: ListenerRuleName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -9905,76 +9348,93 @@ struct osc_read_product_types_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.ProductTypeIds: array string - * The IDs of the product types. + * The name of the rule you want to delete. */ - char *filters_str; - int is_set_filters; - struct filters_product_type filters; + char *listener_rule_name; +}; + +struct osc_delete_load_balancer_listeners_arg { + /* Required: LoadBalancerName LoadBalancerPorts + */ /* - * The token to request the next page of results. Each token refers to a - * specific page. + * If true, checks whether you have the required permissions to perform + * the action. */ - char *next_page_token; + int is_set_dry_run; + int dry_run; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The name of the load balancer for which you want to delete listeners. */ - int is_set_results_per_page; - long long int results_per_page; + char *load_balancer_name; + /* + * One or more port numbers of the listeners you want to delete. + */ + char *load_balancer_ports_str; + int *load_balancer_ports; }; -struct osc_read_policy_versions_arg { - /* Required: policy_orn */ +struct osc_delete_load_balancer_policy_arg { + /* Required: LoadBalancerName PolicyName + */ /* - * The item starting the list of policies requested. + * If true, checks whether you have the required permissions to perform + * the action. */ - int is_set_first_item; - long long int first_item; + int is_set_dry_run; + int dry_run; /* - * The OUTSCALE Resource Name (ORN) of the policy. For more information, - * see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie - * rs.html). + * The name of the load balancer for which you want to delete a policy. */ - char *policy_orn; + char *load_balancer_name; /* - * The maximum number of items that can be returned in a single response - * (by default, `100`). + * The name of the policy you want to delete. */ - int is_set_results_per_page; - long long int results_per_page; + char *policy_name; }; -struct osc_read_policy_version_arg { - /* Required: policy_orn, version_id */ +struct osc_delete_load_balancer_arg { + /* Required: LoadBalancerName + */ /* - * The OUTSCALE Resource Name (ORN) of the policy. For more information, - * see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie - * rs.html). + * If true, checks whether you have the required permissions to perform + * the action. */ - char *policy_orn; + int is_set_dry_run; + int dry_run; /* - * The ID of the policy version. + * The name of the load balancer you want to delete. */ - char *version_id; + char *load_balancer_name; }; -struct osc_read_policy_arg { - /* Required: policy_orn */ +struct osc_delete_load_balancer_tags_arg { + /* Required: LoadBalancerNames Tags + */ /* - * The OUTSCALE Resource Name (ORN) of the policy. For more information, - * see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie - * rs.html). + * If true, checks whether you have the required permissions to perform + * the action. */ - char *policy_orn; + int is_set_dry_run; + int dry_run; + /* + * One or more load balancer names. + */ + char *load_balancer_names_str; + char **load_balancer_names; + /* + * One or more tags to delete from the load balancers. + * Information about the tag. + * --Tags.INDEX.Key: string + * The key of the tag, with a minimum of 1 character. + */ + char *tags_str; + int nb_tags; + struct resource_load_balancer_tag *tags; }; -struct osc_read_policies_arg { - /* Required:none */ +struct osc_delete_nat_service_arg { + /* Required: NatServiceId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -9982,34 +9442,29 @@ struct osc_read_policies_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.OnlyLinked: bool - * If set to true, lists only the policies attached to a user. - * --Filters.PathPrefix: string - * The path prefix you can use to filter the results. If not - * specified, it - * is set to a slash (`/`). - * --Filters.Scope: string - * The scope to filter policies (`OWS` \\| `LOCAL`). + * The ID of the NAT service you want to delete. */ - char *filters_str; - int is_set_filters; - struct read_policies_filters filters; + char *nat_service_id; +}; + +struct osc_delete_net_access_point_arg { + /* Required: NetAccessPointId + */ /* - * The item starting the list of policies requested. + * If true, checks whether you have the required permissions to perform + * the action. */ - int is_set_first_item; - long long int first_item; + int is_set_dry_run; + int dry_run; /* - * The maximum number of items that can be returned in a single response - * (by default, `100`). + * The ID of the Net access point. */ - int is_set_results_per_page; - long long int results_per_page; + char *net_access_point_id; }; -struct osc_read_nics_arg { - /* Required:none */ +struct osc_delete_net_peering_arg { + /* Required: NetPeeringId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10017,89 +9472,14 @@ struct osc_read_nics_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.Descriptions: array string - * The descriptions of the NICs. - * --Filters.IsSourceDestCheck: bool - * Whether the source/destination checking is enabled (true) or - * disabled - * (false). - * --Filters.LinkNicDeleteOnVmDeletion: bool - * Whether the NICs are deleted when the VMs they are attached to - * are - * terminated. - * --Filters.LinkNicDeviceNumbers: array integer - * The device numbers the NICs are attached to. - * --Filters.LinkNicLinkNicIds: array string - * The attachment IDs of the NICs. - * --Filters.LinkNicStates: array string - * The states of the attachments. - * --Filters.LinkNicVmAccountIds: array string - * The account IDs of the owners of the VMs the NICs are attached to. - * --Filters.LinkNicVmIds: array string - * The IDs of the VMs the NICs are attached to. - * --Filters.LinkPublicIpAccountIds: array string - * The account IDs of the owners of the public IPs associated with - * the - * NICs. - * --Filters.LinkPublicIpLinkPublicIpIds: array string - * The association IDs returned when the public IPs were associated - * with - * the NICs. - * --Filters.LinkPublicIpPublicDnsNames: array string - * The public DNS names associated with the public IPs. - * --Filters.LinkPublicIpPublicIpIds: array string - * The allocation IDs returned when the public IPs were allocated to - * their - * accounts. - * --Filters.LinkPublicIpPublicIps: array string - * The public IPs associated with the NICs. - * --Filters.MacAddresses: array string - * The Media Access Control (MAC) addresses of the NICs. - * --Filters.NetIds: array string - * The IDs of the Nets where the NICs are located. - * --Filters.NicIds: array string - * The IDs of the NICs. - * --Filters.PrivateDnsNames: array string - * The private DNS names associated with the primary private IPs. - * --Filters.PrivateIpsLinkPublicIpAccountIds: array string - * The account IDs of the owner of the public IPs associated with - * the - * private IPs. - * --Filters.PrivateIpsLinkPublicIpPublicIps: array string - * The public IPs associated with the private IPs. - * --Filters.PrivateIpsPrimaryIp: bool - * Whether the private IP is the primary IP associated with the NIC. - * --Filters.PrivateIpsPrivateIps: array string - * The private IPs of the NICs. - * --Filters.SecurityGroupIds: array string - * The IDs of the security groups associated with the NICs. - * --Filters.SecurityGroupNames: array string - * The names of the security groups associated with the NICs. - * --Filters.States: array string - * The states of the NICs. - * --Filters.SubnetIds: array string - * The IDs of the Subnets for the NICs. - * --Filters.SubregionNames: array string - * The Subregions where the NICs are located. - * --Filters.TagKeys: array string - * The keys of the tags associated with the NICs. - * --Filters.TagValues: array string - * The values of the tags associated with the NICs. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the NICs, - * in the - * following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * The ID of the Net peering you want to delete. */ - char *filters_str; - int is_set_filters; - struct filters_nic filters; + char *net_peering_id; }; -struct osc_read_nets_arg { - /* Required:none */ +struct osc_delete_net_arg { + /* Required: NetId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10107,47 +9487,29 @@ struct osc_read_nets_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.DhcpOptionsSetIds: array string - * The IDs of the DHCP options sets. - * --Filters.IpRanges: array string - * The IP ranges for the Nets, in CIDR notation (for example, - * `10.0.0.0/16`). - * --Filters.IsDefault: bool - * If true, the Net used is the default one. - * --Filters.NetIds: array string - * The IDs of the Nets. - * --Filters.States: array string - * The states of the Nets (`pending` \\| `available` \\| `deleting`). - * --Filters.TagKeys: array string - * The keys of the tags associated with the Nets. - * --Filters.TagValues: array string - * The values of the tags associated with the Nets. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the Nets, - * in the - * following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * The ID of the Net you want to delete. */ - char *filters_str; - int is_set_filters; - struct filters_net filters; + char *net_id; +}; + +struct osc_delete_nic_arg { + /* Required: NicId + */ /* - * The token to request the next page of results. Each token refers to a - * specific page. + * If true, checks whether you have the required permissions to perform + * the action. */ - char *next_page_token; + int is_set_dry_run; + int dry_run; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The ID of the NIC you want to delete. */ - int is_set_results_per_page; - long long int results_per_page; + char *nic_id; }; -struct osc_read_net_peerings_arg { - /* Required:none */ +struct osc_delete_policy_arg { + /* Required: PolicyOrn + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10155,60 +9517,33 @@ struct osc_read_net_peerings_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.AccepterNetAccountIds: array string - * The account IDs of the owners of the peer Nets. - * --Filters.AccepterNetIpRanges: array string - * The IP ranges of the peer Nets, in CIDR notation (for example, - * `10.0.0.0/24`). - * --Filters.AccepterNetNetIds: array string - * The IDs of the peer Nets. - * --Filters.ExpirationDates: array string - * The dates and times at which the Net peerings expire, in ISO 8601 - * date-time format (for example, `2020-06-14T00:00:00.000Z`). - * --Filters.NetPeeringIds: array string - * The IDs of the Net peerings. - * --Filters.SourceNetAccountIds: array string - * The account IDs of the owners of the peer Nets. - * --Filters.SourceNetIpRanges: array string - * The IP ranges of the peer Nets. - * --Filters.SourceNetNetIds: array string - * The IDs of the peer Nets. - * --Filters.StateMessages: array string - * Additional information about the states of the Net peerings. - * --Filters.StateNames: array string - * The states of the Net peerings (`pending-acceptance` \\| `active` - * \\| - * `rejected` \\| `failed` \\| `expired` \\| `deleted`). - * --Filters.TagKeys: array string - * The keys of the tags associated with the Net peerings. - * --Filters.TagValues: array string - * The values of the tags associated with the Net peerings. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the Net - * peerings, - * in the following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * The OUTSCALE Resource Name (ORN) of the policy you want to delete. + * For more information, see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). */ - char *filters_str; - int is_set_filters; - struct filters_net_peering filters; + char *policy_orn; +}; + +struct osc_delete_policy_version_arg { + /* Required: PolicyOrn VersionId + */ /* - * The token to request the next page of results. Each token refers to a - * specific page. + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). */ - char *next_page_token; + char *policy_orn; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The ID of the version of the policy you want to delete. */ - int is_set_results_per_page; - long long int results_per_page; + char *version_id; }; -struct osc_read_net_access_points_arg { - /* Required:none */ +struct osc_delete_public_ip_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10216,47 +9551,23 @@ struct osc_read_net_access_points_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.NetAccessPointIds: array string - * The IDs of the Net access points. - * --Filters.NetIds: array string - * The IDs of the Nets. - * --Filters.ServiceNames: array string - * The names of the services. For more information, see - * [ReadNetAccessPointServices](#readnetaccesspointservices). - * --Filters.States: array string - * The states of the Net access points (`pending` \\| `available` - * \\| - * `deleting` \\| `deleted`). - * --Filters.TagKeys: array string - * The keys of the tags associated with the Net access points. - * --Filters.TagValues: array string - * The values of the tags associated with the Net access points. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the Net - * access - * points, in the following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. - */ - char *filters_str; - int is_set_filters; - struct filters_net_access_point filters; - /* - * The token to request the next page of results. Each token refers to a - * specific page. + * The public IP. In the public Cloud, this parameter is required. */ - char *next_page_token; + char *public_ip; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The ID representing the association of the public IP with the VM or + * the NIC. In a Net, this parameter is required. */ - int is_set_results_per_page; - long long int results_per_page; + char *public_ip_id; }; -struct osc_read_net_access_point_services_arg { - /* Required:none */ +struct osc_delete_route_arg { + /* Required: RouteTableId DestinationIpRange + */ + /* + * The exact IP range for the route. + */ + char *destination_ip_range; /* * If true, checks whether you have the required permissions to perform * the action. @@ -10264,30 +9575,29 @@ struct osc_read_net_access_point_services_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.ServiceIds: array string - * The IDs of the services. - * --Filters.ServiceNames: array string - * The names of the services. + * The ID of the route table from which you want to delete a route. */ - char *filters_str; - int is_set_filters; - struct filters_service filters; + char *route_table_id; +}; + +struct osc_delete_route_table_arg { + /* Required: RouteTableId + */ /* - * The token to request the next page of results. Each token refers to a - * specific page. + * If true, checks whether you have the required permissions to perform + * the action. */ - char *next_page_token; + int is_set_dry_run; + int dry_run; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The ID of the route table you want to delete. */ - int is_set_results_per_page; - long long int results_per_page; + char *route_table_id; }; -struct osc_read_nat_services_arg { - /* Required:none */ +struct osc_delete_security_group_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10295,48 +9605,18 @@ struct osc_read_nat_services_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.ClientTokens: array string - * The idempotency tokens provided when creating the NAT services. - * --Filters.NatServiceIds: array string - * The IDs of the NAT services. - * --Filters.NetIds: array string - * The IDs of the Nets in which the NAT services are. - * --Filters.States: array string - * The states of the NAT services (`pending` \\| `available` \\| - * `deleting` - * \\| `deleted`). - * --Filters.SubnetIds: array string - * The IDs of the Subnets in which the NAT services are. - * --Filters.TagKeys: array string - * The keys of the tags associated with the NAT services. - * --Filters.TagValues: array string - * The values of the tags associated with the NAT services. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the NAT - * services, - * in the following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * The ID of the security group you want to delete. */ - char *filters_str; - int is_set_filters; - struct filters_nat_service filters; + char *security_group_id; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * The name of the security group. */ - char *next_page_token; - /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. - */ - int is_set_results_per_page; - long long int results_per_page; + char *security_group_name; }; -struct osc_read_managed_policies_linked_to_user_group_arg { - /* Required: user_group_name */ +struct osc_delete_security_group_rule_arg { + /* Required: SecurityGroupId Flow + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10344,36 +9624,104 @@ struct osc_read_managed_policies_linked_to_user_group_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.PathPrefix: string - * The path prefix of the groups. If not specified, it is set to a - * slash - * (`/`). - * --Filters.UserGroupIds: array string - * The IDs of the user groups. + * The direction of the flow: `Inbound` or `Outbound`. You can specify + * `Outbound` for Nets only. */ - char *filters_str; - int is_set_filters; - struct filters_user_group filters; + char *flow; /* - * The item starting the list of policies requested. + * The beginning of the port range for the TCP and UDP protocols, or an + * ICMP type number. */ - int is_set_first_item; - long long int first_item; + int is_set_from_port_range; + long long int from_port_range; /* - * The maximum number of items that can be returned in a single response - * (by default, `100`). + * The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all + * protocols). By default, `-1`. In a Net, this can also be an IP + * protocol number. For more information, see the [IANA.org + * website](https://www.iana.org/assignments/protocol-numbers/protocol-nu + * mbers.xhtml). */ - int is_set_results_per_page; - long long int results_per_page; + char *ip_protocol; /* - * The name of the group. + * The IP range for the security group rule, in CIDR notation (for + * example, `10.0.0.0/16`). */ - char *user_group_name; + char *ip_range; + /* + * One or more rules you want to delete from the security group. + * Information about the security group rule. + * --Rules.INDEX.FromPortRange: long long int + * The beginning of the port range for the TCP and UDP protocols, or + * an + * ICMP type number. + * --Rules.INDEX.IpProtocol: string + * The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all + * protocols). + * By default, `-1`. In a Net, this can also be an IP protocol + * number. For + * more information, see the [IANA.org + * + * website](https://www.iana.org/assignments/protocol-numbers/protocol-nu + * mber + * s.xhtml). + * --Rules.INDEX.IpRanges: array string + * One or more IP ranges for the security group rules, in CIDR + * notation + * (for example, `10.0.0.0/16`). + * --Rules.INDEX.SecurityGroupsMembers: array ref SecurityGroupsMember + * Information about one or more source or destination security + * groups. + * Information about a source or destination security group. + * --Rules.INDEX.SecurityGroupsMembers.INDEX.AccountId: string + * The account ID that owns the source or destination security + * group. + * --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupId: + * string + * The ID of a source or destination security group that you + * want to link + * to the security group of the rule. + * --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupName: + * string + * (Public Cloud only) The name of a source or destination + * security group + * that you want to link to the security group of the rule. + * --Rules.INDEX.ServiceIds: array string + * One or more service IDs to allow traffic from a Net to access the + * corresponding OUTSCALE services. For more information, see + * [ReadNetAccessPointServices](#readnetaccesspointservices). + * --Rules.INDEX.ToPortRange: long long int + * The end of the port range for the TCP and UDP protocols, or an + * ICMP code + * number. + */ + char *rules_str; + int nb_rules; + struct security_group_rule *rules; + /* + * The account ID of the owner of the security group you want to delete + * a rule from. + */ + char *security_group_account_id_to_unlink; + /* + * The ID of the security group you want to delete a rule from. + */ + char *security_group_id; + /* + * The ID of the source security group. If you are in the Public Cloud, + * you can also specify the name of the source security group. + */ + char *security_group_name_to_unlink; + /* + * The end of the port range for the TCP and UDP protocols, or an ICMP + * code number. + */ + int is_set_to_port_range; + long long int to_port_range; }; -struct osc_read_locations_arg { - /* Required:none */ +struct osc_delete_server_certificate_arg { + /* Required: Name + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10381,20 +9729,14 @@ struct osc_read_locations_arg { int is_set_dry_run; int dry_run; /* - * The token to request the next page of results. Each token refers to a - * specific page. - */ - char *next_page_token; - /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The name of the server certificate you want to delete. */ - int is_set_results_per_page; - long long int results_per_page; + char *name; }; -struct osc_read_load_balancers_arg { - /* Required:none */ +struct osc_delete_snapshot_arg { + /* Required: SnapshotId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10402,17 +9744,14 @@ struct osc_read_load_balancers_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.LoadBalancerNames: array string - * The names of the load balancers. + * The ID of the snapshot you want to delete. */ - char *filters_str; - int is_set_filters; - struct filters_load_balancer filters; + char *snapshot_id; }; -struct osc_read_load_balancer_tags_arg { - /* Required: load_balancer_names */ +struct osc_delete_subnet_arg { + /* Required: SubnetId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10420,14 +9759,14 @@ struct osc_read_load_balancer_tags_arg { int is_set_dry_run; int dry_run; /* - * One or more load balancer names. + * The ID of the Subnet you want to delete. */ - char *load_balancer_names_str; - char **load_balancer_names; + char *subnet_id; }; -struct osc_read_listener_rules_arg { - /* Required:none */ +struct osc_delete_tags_arg { + /* Required: ResourceIds Tags + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10435,17 +9774,27 @@ struct osc_read_listener_rules_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.ListenerRuleNames: array string - * The names of the listener rules. + * One or more resource IDs. */ - char *filters_str; - int is_set_filters; - struct filters_listener_rule filters; + char *resource_ids_str; + char **resource_ids; + /* + * One or more tags to delete (if you set a tag value, only the tags + * matching exactly this value are deleted). + * Information about the tag. + * --Tags.INDEX.Key: string + * The key of the tag, with a minimum of 1 character. + * --Tags.INDEX.Value: string + * The value of the tag, between 0 and 255 characters. + */ + char *tags_str; + int nb_tags; + struct resource_tag *tags; }; -struct osc_read_linked_policies_arg { - /* Required: user_name */ +struct osc_delete_user_group_policy_arg { + /* Required: UserGroupName PolicyName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10453,34 +9802,22 @@ struct osc_read_linked_policies_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.PathPrefix: string - * The path prefix of the policies. If not specified, it is set to a - * slash - * (`/`). - */ - char *filters_str; - int is_set_filters; - struct read_linked_policies_filters filters; - /* - * The item starting the list of policies requested. + * The name of the policy document you want to delete. */ - int is_set_first_item; - long long int first_item; + char *policy_name; /* - * The maximum number of items that can be returned in a single response - * (by default, `100`). + * The name of the group. */ - int is_set_results_per_page; - long long int results_per_page; + char *user_group_name; /* - * The name of the user the policies are linked to. + * The path to the group. If not specified, it is set to a slash (`/`). */ - char *user_name; + char *user_group_path; }; -struct osc_read_keypairs_arg { - /* Required:none */ +struct osc_delete_user_group_arg { + /* Required: UserGroupName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10488,34 +9825,24 @@ struct osc_read_keypairs_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.KeypairFingerprints: array string - * The fingerprints of the keypairs. - * --Filters.KeypairNames: array string - * The names of the keypairs. - * --Filters.KeypairTypes: array string - * The types of the keypairs (`ssh-rsa`, `ssh-ed25519`, - * `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or - * `ecdsa-sha2-nistp521`). + * If true, forces the deletion of the user group even if it is not + * empty. */ - char *filters_str; - int is_set_filters; - struct filters_keypair filters; + int is_set_force; + int force; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * The path to the group. If not specified, it is set to a slash (`/`). */ - char *next_page_token; + char *path; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The name of the group you want to delete. */ - int is_set_results_per_page; - long long int results_per_page; + char *user_group_name; }; -struct osc_read_internet_services_arg { - /* Required:none */ +struct osc_delete_user_arg { + /* Required: UserName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10523,46 +9850,29 @@ struct osc_read_internet_services_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.InternetServiceIds: array string - * The IDs of the Internet services. - * --Filters.LinkNetIds: array string - * The IDs of the Nets the Internet services are attached to. - * --Filters.LinkStates: array string - * The current states of the attachments between the Internet - * services and - * the Nets (only `available`, if the Internet gateway is attached - * to a - * Net). - * --Filters.TagKeys: array string - * The keys of the tags associated with the Internet services. - * --Filters.TagValues: array string - * The values of the tags associated with the Internet services. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the - * Internet - * services, in the following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * The name of the EIM user you want to delete. */ - char *filters_str; - int is_set_filters; - struct filters_internet_service filters; + char *user_name; +}; + +struct osc_delete_virtual_gateway_arg { + /* Required: VirtualGatewayId + */ /* - * The token to request the next page of results. Each token refers to a - * specific page. + * If true, checks whether you have the required permissions to perform + * the action. */ - char *next_page_token; + int is_set_dry_run; + int dry_run; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The ID of the virtual gateway you want to delete. */ - int is_set_results_per_page; - long long int results_per_page; + char *virtual_gateway_id; }; -struct osc_read_images_arg { - /* Required:none */ +struct osc_delete_vm_group_arg { + /* Required: VmGroupId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10570,80 +9880,29 @@ struct osc_read_images_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.AccountAliases: array string - * The account aliases of the owners of the OMIs. - * --Filters.AccountIds: array string - * The account IDs of the owners of the OMIs. By default, all the - * OMIs for - * which you have launch permissions are described. - * --Filters.Architectures: array string - * The architectures of the OMIs (`i386` \\| `x86_64`). - * --Filters.BlockDeviceMappingDeleteOnVmDeletion: bool - * Whether the volumes are deleted or not when terminating the VM. - * --Filters.BlockDeviceMappingDeviceNames: array string - * The device names for the volumes. - * --Filters.BlockDeviceMappingSnapshotIds: array string - * The IDs of the snapshots used to create the volumes. - * --Filters.BlockDeviceMappingVolumeSizes: array integer - * The sizes of the volumes, in gibibytes (GiB). - * --Filters.BlockDeviceMappingVolumeTypes: array string - * The types of volumes (`standard` \\| `gp2` \\| `io1`). - * --Filters.Descriptions: array string - * The descriptions of the OMIs, provided when they were created. - * --Filters.FileLocations: array string - * The locations of the buckets where the OMI files are stored. - * --Filters.Hypervisors: array string - * The hypervisor type of the OMI (always `xen`). - * --Filters.ImageIds: array string - * The IDs of the OMIs. - * --Filters.ImageNames: array string - * The names of the OMIs, provided when they were created. - * --Filters.PermissionsToLaunchAccountIds: array string - * The account IDs which have launch permissions for the OMIs. - * --Filters.PermissionsToLaunchGlobalPermission: bool - * If true, lists all public OMIs. If false, lists all private OMIs. - * --Filters.ProductCodeNames: array string - * The names of the product codes associated with the OMI. - * --Filters.ProductCodes: array string - * The product codes associated with the OMI. - * --Filters.RootDeviceNames: array string - * The name of the root device. This value must be /dev/sda1. - * --Filters.RootDeviceTypes: array string - * The types of root device used by the OMIs (`bsu` or `ebs`). - * --Filters.States: array string - * The states of the OMIs (`pending` \\| `available` \\| `failed`). - * --Filters.TagKeys: array string - * The keys of the tags associated with the OMIs. - * --Filters.TagValues: array string - * The values of the tags associated with the OMIs. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the OMIs, - * in the - * following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. - * --Filters.VirtualizationTypes: array string - * The virtualization types (always `hvm`). + * The ID of the VM group you want to delete. */ - char *filters_str; - int is_set_filters; - struct filters_image filters; + char *vm_group_id; +}; + +struct osc_delete_vm_template_arg { + /* Required: VmTemplateId + */ /* - * The token to request the next page of results. Each token refers to a - * specific page. + * If true, checks whether you have the required permissions to perform + * the action. */ - char *next_page_token; + int is_set_dry_run; + int dry_run; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The ID of the VM template you want to delete. */ - int is_set_results_per_page; - long long int results_per_page; + char *vm_template_id; }; -struct osc_read_image_export_tasks_arg { - /* Required:none */ +struct osc_delete_vms_arg { + /* Required: VmIds + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10651,28 +9910,30 @@ struct osc_read_image_export_tasks_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.TaskIds: array string - * The IDs of the export tasks. + * One or more IDs of VMs. */ - char *filters_str; - int is_set_filters; - struct filters_export_task filters; + char *vm_ids_str; + char **vm_ids; +}; + +struct osc_delete_volume_arg { + /* Required: VolumeId + */ /* - * The token to request the next page of results. Each token refers to a - * specific page. + * If true, checks whether you have the required permissions to perform + * the action. */ - char *next_page_token; + int is_set_dry_run; + int dry_run; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The ID of the volume you want to delete. */ - int is_set_results_per_page; - long long int results_per_page; + char *volume_id; }; -struct osc_read_flexible_gpus_arg { - /* Required:none */ +struct osc_delete_vpn_connection_arg { + /* Required: VpnConnectionId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10680,73 +9941,54 @@ struct osc_read_flexible_gpus_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.DeleteOnVmDeletion: bool - * Indicates whether the fGPU is deleted when terminating the VM. - * --Filters.FlexibleGpuIds: array string - * One or more IDs of fGPUs. - * --Filters.Generations: array string - * The processor generations that the fGPUs are compatible with. - * --Filters.ModelNames: array string - * One or more models of fGPUs. For more information, see [About - * Flexible - * - * GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html) - * . - * --Filters.States: array string - * The states of the fGPUs (`allocated` \\| `attaching` \\| - * `attached` \\| - * `detaching`). - * --Filters.SubregionNames: array string - * The Subregions where the fGPUs are located. - * --Filters.VmIds: array string - * One or more IDs of VMs. + * The ID of the VPN connection you want to delete. */ - char *filters_str; - int is_set_filters; - struct filters_flexible_gpu filters; + char *vpn_connection_id; }; -struct osc_read_flexible_gpu_catalog_arg { - /* Required:none */ +struct osc_delete_vpn_connection_route_arg { + /* Required: DestinationIpRange VpnConnectionId + */ + /* + * The network prefix of the route to delete, in CIDR notation (for + * example, `10.12.0.0/16`). + */ + char *destination_ip_range; /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; -}; - -struct osc_read_entities_linked_to_policy_arg { - /* Required:none */ /* - * The type of entity linked to the policy (`ACCOUNT` \\| `USER` \\| - * `GROUP`) you want to get information about. + * The ID of the target VPN connection of the static route to delete. */ - char *entities_type_str; - char **entities_type; + char *vpn_connection_id; +}; + +struct osc_deregister_vms_in_load_balancer_arg { + /* Required: BackendVmIds LoadBalancerName + */ /* - * The item starting the list of entities requested. + * One or more IDs of backend VMs. */ - int is_set_first_item; - long long int first_item; + char *backend_vm_ids_str; + char **backend_vm_ids; /* - * The OUTSCALE Resource Name (ORN) of the policy. For more information, - * see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie - * rs.html). + * If true, checks whether you have the required permissions to perform + * the action. */ - char *policy_orn; + int is_set_dry_run; + int dry_run; /* - * The maximum number of items that can be returned in a single response - * (by default, 100). + * The name of the load balancer. */ - int is_set_results_per_page; - long long int results_per_page; + char *load_balancer_name; }; -struct osc_read_direct_links_arg { - /* Required:none */ +struct osc_link_flexible_gpu_arg { + /* Required: FlexibleGpuId VmId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10754,28 +9996,18 @@ struct osc_read_direct_links_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.DirectLinkIds: array string - * The IDs of the DirectLinks. - */ - char *filters_str; - int is_set_filters; - struct filters_direct_link filters; - /* - * The token to request the next page of results. Each token refers to a - * specific page. + * The ID of the fGPU you want to attach. */ - char *next_page_token; + char *flexible_gpu_id; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The ID of the VM you want to attach the fGPU to. */ - int is_set_results_per_page; - long long int results_per_page; + char *vm_id; }; -struct osc_read_direct_link_interfaces_arg { - /* Required:none */ +struct osc_link_internet_service_arg { + /* Required: InternetServiceId NetId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10783,82 +10015,43 @@ struct osc_read_direct_link_interfaces_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.DirectLinkIds: array string - * The IDs of the DirectLinks. - * --Filters.DirectLinkInterfaceIds: array string - * The IDs of the DirectLink interfaces. - */ - char *filters_str; - int is_set_filters; - struct filters_direct_link_interface filters; - /* - * The token to request the next page of results. Each token refers to a - * specific page. + * The ID of the Internet service you want to attach. */ - char *next_page_token; + char *internet_service_id; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The ID of the Net to which you want to attach the Internet service. */ - int is_set_results_per_page; - long long int results_per_page; + char *net_id; }; -struct osc_read_dhcp_options_arg { - /* Required:none */ +struct osc_link_load_balancer_backend_machines_arg { + /* Required: LoadBalancerName + */ /* - * If true, checks whether you have the required permissions to perform - * the action. + * One or more public IPs of backend VMs. */ - int is_set_dry_run; - int dry_run; + char *backend_ips_str; + char **backend_ips; /* - * One or more filters. - * --Filters.Default: bool - * If true, lists all default DHCP options set. If false, lists all - * non-default DHCP options set. - * --Filters.DhcpOptionsSetIds: array string - * The IDs of the DHCP options sets. - * --Filters.DomainNameServers: array string - * The IPs of the domain name servers used for the DHCP options sets. - * --Filters.DomainNames: array string - * The domain names used for the DHCP options sets. - * --Filters.LogServers: array string - * The IPs of the log servers used for the DHCP options sets. - * --Filters.NtpServers: array string - * The IPs of the Network Time Protocol (NTP) servers used for the - * DHCP - * options sets. - * --Filters.TagKeys: array string - * The keys of the tags associated with the DHCP options sets. - * --Filters.TagValues: array string - * The values of the tags associated with the DHCP options sets. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the DHCP - * options - * sets, in the following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * One or more IDs of backend VMs. */ - char *filters_str; - int is_set_filters; - struct filters_dhcp_options filters; + char *backend_vm_ids_str; + char **backend_vm_ids; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * If true, checks whether you have the required permissions to perform + * the action. */ - char *next_page_token; + int is_set_dry_run; + int dry_run; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The name of the load balancer. */ - int is_set_results_per_page; - long long int results_per_page; + char *load_balancer_name; }; -struct osc_read_dedicated_groups_arg { - /* Required:none */ +struct osc_link_managed_policy_to_user_group_arg { + /* Required: PolicyOrn UserGroupName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10866,36 +10059,27 @@ struct osc_read_dedicated_groups_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.CpuGenerations: array integer - * The processor generation for the VMs in the dedicated group (for - * example, `4`). - * --Filters.DedicatedGroupIds: array string - * The IDs of the dedicated groups. - * --Filters.Names: array string - * The names of the dedicated groups. - * --Filters.SubregionNames: array string - * The names of the Subregions in which the dedicated groups are - * located. - */ - char *filters_str; - int is_set_filters; - struct filters_dedicated_group filters; - /* - * The token to request the next page of results. Each token refers to a - * specific page. + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). */ - char *next_page_token; + char *policy_orn; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The name of the group you want to link the policy to. */ - int is_set_results_per_page; - long long int results_per_page; + char *user_group_name; }; -struct osc_read_consumption_account_arg { - /* Required: from_date, to_date */ +struct osc_link_nic_arg { + /* Required: DeviceNumber VmId NicId + */ + /* + * The index of the VM device for the NIC attachment (between `1` and + * `7`, both included). + */ + int is_set_device_number; + long long int device_number; /* * If true, checks whether you have the required permissions to perform * the action. @@ -10903,42 +10087,18 @@ struct osc_read_consumption_account_arg { int is_set_dry_run; int dry_run; /* - * The beginning of the time period, in ISO 8601 date format (for - * example, `2020-06-14`). The date-time format is also accepted, but - * only with a time set to midnight (for example, - * `2020-06-14T00:00:00.000Z`). This value is included in the time - * period. - */ - char *from_date; - /* - * By default or if false, returns only the consumption of the specific - * account that sends this request. If true, returns either the overall - * consumption of your paying account and all linked accounts (if the - * account that sends this request is a paying account) or returns - * nothing (if the account that sends this request is a linked account). - */ - int is_set_overall; - int overall; - /* - * If true, the response also includes the unit price of the consumed - * resource (`UnitPrice`) and the total price of the consumed resource - * during the specified time period (`Price`), in the currency of your - * account. + * The ID of the NIC you want to attach. */ - int is_set_show_price; - int show_price; + char *nic_id; /* - * The end of the time period, in ISO 8601 date format (for example, - * `2020-06-30`). The date-time format is also accepted, but only with a - * time set to midnight (for example, `2020-06-30T00:00:00.000Z`). This - * value is excluded from the time period, and must be set to a later - * date than `FromDate`. + * The ID of the VM to which you want to attach the NIC. */ - char *to_date; + char *vm_id; }; -struct osc_read_console_output_arg { - /* Required: vm_id */ +struct osc_link_policy_arg { + /* Required: PolicyOrn UserName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -10946,13 +10106,28 @@ struct osc_read_console_output_arg { int is_set_dry_run; int dry_run; /* - * The ID of the VM. + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). */ - char *vm_id; + char *policy_orn; + /* + * The name of the user you want to link the policy to (between 1 and 64 + * characters). + */ + char *user_name; }; -struct osc_read_client_gateways_arg { - /* Required:none */ +struct osc_link_private_ips_arg { + /* Required: NicId + */ + /* + * If true, allows an IP that is already assigned to another NIC in the + * same Subnet to be assigned to the NIC you specified. + */ + int is_set_allow_relink; + int allow_relink; /* * If true, checks whether you have the required permissions to perform * the action. @@ -10960,50 +10135,34 @@ struct osc_read_client_gateways_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.BgpAsns: array integer - * The Border Gateway Protocol (BGP) Autonomous System Numbers - * (ASNs) of - * the connections. - * --Filters.ClientGatewayIds: array string - * The IDs of the client gateways. - * --Filters.ConnectionTypes: array string - * The types of communication tunnels used by the client gateways - * (always - * `ipsec.1`). - * --Filters.PublicIps: array string - * The public IPv4 addresses of the client gateways. - * --Filters.States: array string - * The states of the client gateways (`pending` \\| `available` \\| - * `deleting` \\| `deleted`). - * --Filters.TagKeys: array string - * The keys of the tags associated with the client gateways. - * --Filters.TagValues: array string - * The values of the tags associated with the client gateways. - * --Filters.Tags: array string - * The key/value combination of the tags associated with the client - * gateways, in the following format: - * - * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * The ID of the NIC. */ - char *filters_str; - int is_set_filters; - struct filters_client_gateway filters; + char *nic_id; /* - * The token to request the next page of results. Each token refers to a - * specific page. + * The secondary private IP or IPs you want to assign to the NIC within + * the IP range of the Subnet. */ - char *next_page_token; + char *private_ips_str; + char **private_ips; /* - * The maximum number of logs returned in a single response (between `1` - * and `1000`, both included). By default, `100`. + * The number of secondary private IPs to assign to the NIC. */ - int is_set_results_per_page; - long long int results_per_page; + int is_set_secondary_private_ip_count; + long long int secondary_private_ip_count; }; -struct osc_read_catalogs_arg { - /* Required:none */ +struct osc_link_public_ip_arg { + /* Required: null + */ + /* + * If true, allows the public IP to be associated with the VM or NIC + * that you specify even if it is already associated with another VM or + * NIC. If false, prevents the public IP from being associated with the + * VM or NIC that you specify if it is already associated with another + * VM or NIC. (By default, true in the public Cloud, false in a Net.) + */ + int is_set_allow_relink; + int allow_relink; /* * If true, checks whether you have the required permissions to perform * the action. @@ -11011,40 +10170,39 @@ struct osc_read_catalogs_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.CurrentCatalogOnly: bool - * By default or if set to true, only returns the current catalog. - * If - * false, returns the current catalog and past catalogs. - * --Filters.FromDate: string - * The beginning of the time period, in ISO 8601 date format (for - * example, - * `2020-06-14`). This date cannot be older than 3 years. You must - * specify - * the parameters `FromDate` and `ToDate` together. - * --Filters.ToDate: string - * The end of the time period, in ISO 8601 date format (for example, - * `2020-06-30`). You must specify the parameters `FromDate` and - * `ToDate` - * together. + * (Net only) The ID of the NIC. This parameter is required if the VM + * has more than one NIC attached. Otherwise, you need to specify the + * `VmId` parameter instead. You cannot specify both parameters at the + * same time. */ - char *filters_str; - int is_set_filters; - struct filters_catalogs filters; -}; - -struct osc_read_catalog_arg { - /* Required:none */ + char *nic_id; /* - * If true, checks whether you have the required permissions to perform - * the action. + * (Net only) The primary or secondary private IP of the specified NIC. + * By default, the primary private IP. */ - int is_set_dry_run; - int dry_run; + char *private_ip; + /* + * The public IP. This parameter is required unless you use the + * `PublicIpId` parameter. + */ + char *public_ip; + /* + * The allocation ID of the public IP. This parameter is required unless + * you use the `PublicIp` parameter. + */ + char *public_ip_id; + /* + * The ID of the VM.
\n- In the public Cloud, this parameter is + * required.
\n- In a Net, this parameter is required if the VM has + * only one NIC. Otherwise, you need to specify the `NicId` parameter + * instead. You cannot specify both parameters at the same time. + */ + char *vm_id; }; -struct osc_read_cas_arg { - /* Required:none */ +struct osc_link_route_table_arg { + /* Required: RouteTableId SubnetId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11052,21 +10210,185 @@ struct osc_read_cas_arg { int is_set_dry_run; int dry_run; /* - * One or more filters. - * --Filters.CaFingerprints: array string - * The fingerprints of the CAs. + * The ID of the route table. + */ + char *route_table_id; + /* + * The ID of the Subnet. + */ + char *subnet_id; +}; + +struct osc_link_virtual_gateway_arg { + /* Required: NetId VirtualGatewayId + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * The ID of the Net to which you want to attach the virtual gateway. + */ + char *net_id; + /* + * The ID of the virtual gateway. + */ + char *virtual_gateway_id; +}; + +struct osc_link_volume_arg { + /* Required: DeviceName VmId VolumeId + */ + /* + * The name of the device. For a root device, you must use `/dev/sda1`. + * For other volumes, you must use `/dev/sdX`, `/dev/sdXX`, `/dev/xvdX`, + * or `/dev/xvdXX` (where the first `X` is a letter between `b` and `z`, + * and the second `X` is a letter between `a` and `z`). + */ + char *device_name; + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * The ID of the VM you want to attach the volume to. + */ + char *vm_id; + /* + * The ID of the volume you want to attach. + */ + char *volume_id; +}; + +struct osc_put_user_group_policy_arg { + /* Required: PolicyName PolicyDocument UserGroupName + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * The policy document, corresponding to a JSON string that contains the + * policy. For more information, see [EIM Reference + * Information](https://docs.outscale.com/en/userguide/EIM-Reference-Info + * rmation.html) and [EIM Policy + * Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator + * .html). + */ + char *policy_document; + /* + * The name of the policy. + */ + char *policy_name; + /* + * The name of the group. + */ + char *user_group_name; + /* + * The path to the group. If not specified, it is set to a slash (`/`). + */ + char *user_group_path; +}; + +struct osc_read_access_keys_arg { + /* Required: null + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * One or more filters. + * --Filters.AccessKeyIds: array string + * The IDs of the access keys. + * --Filters.States: array string + * The states of the access keys (`ACTIVE` \\| `INACTIVE`). + */ + char *filters_str; + int is_set_filters; + struct filters_access_keys filters; + /* + * The name of the EIM user. By default, the user who sends the request + * (which can be the root account). + */ + char *user_name; +}; + +struct osc_read_accounts_arg { + /* Required: null + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; +}; + +struct osc_read_admin_password_arg { + /* Required: VmId + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * The ID of the VM. + */ + char *vm_id; +}; + +struct osc_read_api_access_policy_arg { + /* Required: null + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; +}; + +struct osc_read_api_access_rules_arg { + /* Required: null + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * One or more filters. + * --Filters.ApiAccessRuleIds: array string + * One or more IDs of API access rules. * --Filters.CaIds: array string - * The IDs of the CAs. + * One or more IDs of Client Certificate Authorities (CAs). + * --Filters.Cns: array string + * One or more Client Certificate Common Names (CNs). * --Filters.Descriptions: array string - * The descriptions of the CAs. + * One or more descriptions of API access rules. + * --Filters.IpRanges: array string + * One or more IPs or CIDR blocks (for example, `192.0.2.0/16`). */ char *filters_str; int is_set_filters; - struct filters_ca filters; + struct filters_api_access_rule filters; }; struct osc_read_api_logs_arg { - /* Required:none */ + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11175,8 +10497,9 @@ struct osc_read_api_logs_arg { struct with with; }; -struct osc_read_api_access_rules_arg { - /* Required:none */ +struct osc_read_cas_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11185,24 +10508,21 @@ struct osc_read_api_access_rules_arg { int dry_run; /* * One or more filters. - * --Filters.ApiAccessRuleIds: array string - * One or more IDs of API access rules. + * --Filters.CaFingerprints: array string + * The fingerprints of the CAs. * --Filters.CaIds: array string - * One or more IDs of Client Certificate Authorities (CAs). - * --Filters.Cns: array string - * One or more Client Certificate Common Names (CNs). + * The IDs of the CAs. * --Filters.Descriptions: array string - * One or more descriptions of API access rules. - * --Filters.IpRanges: array string - * One or more IPs or CIDR blocks (for example, `192.0.2.0/16`). + * The descriptions of the CAs. */ char *filters_str; int is_set_filters; - struct filters_api_access_rule filters; + struct filters_ca filters; }; -struct osc_read_api_access_policy_arg { - /* Required:none */ +struct osc_read_catalog_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11211,8 +10531,9 @@ struct osc_read_api_access_policy_arg { int dry_run; }; -struct osc_read_admin_password_arg { - /* Required: vm_id */ +struct osc_read_catalogs_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11220,23 +10541,31 @@ struct osc_read_admin_password_arg { int is_set_dry_run; int dry_run; /* - * The ID of the VM. - */ - char *vm_id; -}; - -struct osc_read_accounts_arg { - /* Required:none */ - /* - * If true, checks whether you have the required permissions to perform - * the action. + * One or more filters. + * --Filters.CurrentCatalogOnly: bool + * By default or if set to true, only returns the current catalog. + * If + * false, returns the current catalog and past catalogs. + * --Filters.FromDate: string + * The beginning of the time period, in ISO 8601 date format (for + * example, + * `2020-06-14`). This date cannot be older than 3 years. You must + * specify + * the parameters `FromDate` and `ToDate` together. + * --Filters.ToDate: string + * The end of the time period, in ISO 8601 date format (for example, + * `2020-06-30`). You must specify the parameters `FromDate` and + * `ToDate` + * together. */ - int is_set_dry_run; - int dry_run; + char *filters_str; + int is_set_filters; + struct filters_catalogs filters; }; -struct osc_read_access_keys_arg { - /* Required:none */ +struct osc_read_client_gateways_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11245,23 +10574,50 @@ struct osc_read_access_keys_arg { int dry_run; /* * One or more filters. - * --Filters.AccessKeyIds: array string - * The IDs of the access keys. + * --Filters.BgpAsns: array integer + * The Border Gateway Protocol (BGP) Autonomous System Numbers + * (ASNs) of + * the connections. + * --Filters.ClientGatewayIds: array string + * The IDs of the client gateways. + * --Filters.ConnectionTypes: array string + * The types of communication tunnels used by the client gateways + * (always + * `ipsec.1`). + * --Filters.PublicIps: array string + * The public IPv4 addresses of the client gateways. * --Filters.States: array string - * The states of the access keys (`ACTIVE` \\| `INACTIVE`). + * The states of the client gateways (`pending` \\| `available` \\| + * `deleting` \\| `deleted`). + * --Filters.TagKeys: array string + * The keys of the tags associated with the client gateways. + * --Filters.TagValues: array string + * The values of the tags associated with the client gateways. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the client + * gateways, in the following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. */ char *filters_str; int is_set_filters; - struct filters_access_keys filters; + struct filters_client_gateway filters; /* - * The name of the EIM user. By default, the user who sends the request - * (which can be the root account). + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *user_name; -}; + char *next_page_token; + /* + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + long long int results_per_page; +}; -struct osc_put_user_group_policy_arg { - /* Required: policy_name, policy_document, user_group_name */ +struct osc_read_console_output_arg { + /* Required: VmId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11269,37 +10625,14 @@ struct osc_put_user_group_policy_arg { int is_set_dry_run; int dry_run; /* - * The policy document, corresponding to a JSON string that contains the - * policy. For more information, see [EIM Reference - * Information](https://docs.outscale.com/en/userguide/EIM-Reference-Info - * rmation.html) and [EIM Policy - * Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator - * .html). - */ - char *policy_document; - /* - * The name of the policy. - */ - char *policy_name; - /* - * The name of the group. - */ - char *user_group_name; - /* - * The path to the group. If not specified, it is set to a slash (`/`). + * The ID of the VM. */ - char *user_group_path; + char *vm_id; }; -struct osc_link_volume_arg { - /* Required: device_name, vm_id, volume_id */ - /* - * The name of the device. For a root device, you must use `/dev/sda1`. - * For other volumes, you must use `/dev/sdX`, `/dev/sdXX`, `/dev/xvdX`, - * or `/dev/xvdXX` (where the first `X` is a letter between `b` and `z`, - * and the second `X` is a letter between `a` and `z`). - */ - char *device_name; +struct osc_read_consumption_account_arg { + /* Required: FromDate ToDate + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11307,17 +10640,43 @@ struct osc_link_volume_arg { int is_set_dry_run; int dry_run; /* - * The ID of the VM you want to attach the volume to. + * The beginning of the time period, in ISO 8601 date format (for + * example, `2020-06-14`). The date-time format is also accepted, but + * only with a time set to midnight (for example, + * `2020-06-14T00:00:00.000Z`). This value is included in the time + * period. */ - char *vm_id; + char *from_date; /* - * The ID of the volume you want to attach. + * By default or if false, returns only the consumption of the specific + * account that sends this request. If true, returns either the overall + * consumption of your paying account and all linked accounts (if the + * account that sends this request is a paying account) or returns + * nothing (if the account that sends this request is a linked account). */ - char *volume_id; + int is_set_overall; + int overall; + /* + * If true, the response also includes the unit price of the consumed + * resource (`UnitPrice`) and the total price of the consumed resource + * during the specified time period (`Price`), in the currency of your + * account. + */ + int is_set_show_price; + int show_price; + /* + * The end of the time period, in ISO 8601 date format (for example, + * `2020-06-30`). The date-time format is also accepted, but only with a + * time set to midnight (for example, `2020-06-30T00:00:00.000Z`). This + * value is excluded from the time period, and must be set to a later + * date than `FromDate`. + */ + char *to_date; }; -struct osc_link_virtual_gateway_arg { - /* Required: net_id, virtual_gateway_id */ +struct osc_read_dedicated_groups_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11325,17 +10684,37 @@ struct osc_link_virtual_gateway_arg { int is_set_dry_run; int dry_run; /* - * The ID of the Net to which you want to attach the virtual gateway. + * One or more filters. + * --Filters.CpuGenerations: array integer + * The processor generation for the VMs in the dedicated group (for + * example, `4`). + * --Filters.DedicatedGroupIds: array string + * The IDs of the dedicated groups. + * --Filters.Names: array string + * The names of the dedicated groups. + * --Filters.SubregionNames: array string + * The names of the Subregions in which the dedicated groups are + * located. */ - char *net_id; + char *filters_str; + int is_set_filters; + struct filters_dedicated_group filters; /* - * The ID of the virtual gateway. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *virtual_gateway_id; + char *next_page_token; + /* + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_link_route_table_arg { - /* Required: route_table_id, subnet_id */ +struct osc_read_dhcp_options_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11343,26 +10722,52 @@ struct osc_link_route_table_arg { int is_set_dry_run; int dry_run; /* - * The ID of the route table. + * One or more filters. + * --Filters.Default: bool + * If true, lists all default DHCP options set. If false, lists all + * non-default DHCP options set. + * --Filters.DhcpOptionsSetIds: array string + * The IDs of the DHCP options sets. + * --Filters.DomainNameServers: array string + * The IPs of the domain name servers used for the DHCP options sets. + * --Filters.DomainNames: array string + * The domain names used for the DHCP options sets. + * --Filters.LogServers: array string + * The IPs of the log servers used for the DHCP options sets. + * --Filters.NtpServers: array string + * The IPs of the Network Time Protocol (NTP) servers used for the + * DHCP + * options sets. + * --Filters.TagKeys: array string + * The keys of the tags associated with the DHCP options sets. + * --Filters.TagValues: array string + * The values of the tags associated with the DHCP options sets. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the DHCP + * options + * sets, in the following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. */ - char *route_table_id; + char *filters_str; + int is_set_filters; + struct filters_dhcp_options filters; /* - * The ID of the Subnet. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *subnet_id; -}; - -struct osc_link_public_ip_arg { - /* Required:none */ + char *next_page_token; /* - * If true, allows the public IP to be associated with the VM or NIC - * that you specify even if it is already associated with another VM or - * NIC. If false, prevents the public IP from being associated with the - * VM or NIC that you specify if it is already associated with another - * VM or NIC. (By default, true in the public Cloud, false in a Net.) + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - int is_set_allow_relink; - int allow_relink; + int is_set_results_per_page; + long long int results_per_page; +}; + +struct osc_read_direct_link_interfaces_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11370,44 +10775,31 @@ struct osc_link_public_ip_arg { int is_set_dry_run; int dry_run; /* - * (Net only) The ID of the NIC. This parameter is required if the VM - * has more than one NIC attached. Otherwise, you need to specify the - * `VmId` parameter instead. You cannot specify both parameters at the - * same time. - */ - char *nic_id; - /* - * (Net only) The primary or secondary private IP of the specified NIC. - * By default, the primary private IP. - */ - char *private_ip; - /* - * The public IP. This parameter is required unless you use the - * `PublicIpId` parameter. + * One or more filters. + * --Filters.DirectLinkIds: array string + * The IDs of the DirectLinks. + * --Filters.DirectLinkInterfaceIds: array string + * The IDs of the DirectLink interfaces. */ - char *public_ip; + char *filters_str; + int is_set_filters; + struct filters_direct_link_interface filters; /* - * The allocation ID of the public IP. This parameter is required unless - * you use the `PublicIp` parameter. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *public_ip_id; + char *next_page_token; /* - * The ID of the VM.
\n- In the public Cloud, this parameter is - * required.
\n- In a Net, this parameter is required if the VM has - * only one NIC. Otherwise, you need to specify the `NicId` parameter - * instead. You cannot specify both parameters at the same time. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *vm_id; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_link_private_ips_arg { - /* Required: nic_id */ - /* - * If true, allows an IP that is already assigned to another NIC in the - * same Subnet to be assigned to the NIC you specified. - */ - int is_set_allow_relink; - int allow_relink; +struct osc_read_direct_links_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11415,30 +10807,40 @@ struct osc_link_private_ips_arg { int is_set_dry_run; int dry_run; /* - * The ID of the NIC. + * One or more filters. + * --Filters.DirectLinkIds: array string + * The IDs of the DirectLinks. */ - char *nic_id; + char *filters_str; + int is_set_filters; + struct filters_direct_link filters; /* - * The secondary private IP or IPs you want to assign to the NIC within - * the IP range of the Subnet. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *private_ips_str; - char **private_ips; + char *next_page_token; /* - * The number of secondary private IPs to assign to the NIC. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - int is_set_secondary_private_ip_count; - long long int secondary_private_ip_count; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_link_policy_arg { - /* Required: policy_orn, user_name */ +struct osc_read_entities_linked_to_policy_arg { + /* Required: null + */ /* - * If true, checks whether you have the required permissions to perform - * the action. + * The type of entity linked to the policy (`ACCOUNT` \\| `USER` \\| + * `GROUP`) you want to get information about. */ - int is_set_dry_run; - int dry_run; + char *entities_type_str; + char **entities_type; + /* + * The item starting the list of entities requested. + */ + int is_set_first_item; + long long int first_item; /* * The OUTSCALE Resource Name (ORN) of the policy. For more information, * see [Resource @@ -11447,38 +10849,27 @@ struct osc_link_policy_arg { */ char *policy_orn; /* - * The name of the user you want to link the policy to (between 1 and 64 - * characters). + * The maximum number of items that can be returned in a single response + * (by default, 100). */ - char *user_name; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_link_nic_arg { - /* Required: device_number, vm_id, nic_id */ - /* - * The index of the VM device for the NIC attachment (between `1` and - * `7`, both included). - */ - int is_set_device_number; - long long int device_number; +struct osc_read_flexible_gpu_catalog_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; - /* - * The ID of the NIC you want to attach. - */ - char *nic_id; - /* - * The ID of the VM to which you want to attach the NIC. - */ - char *vm_id; }; -struct osc_link_managed_policy_to_user_group_arg { - /* Required: policy_orn, user_group_name */ +struct osc_read_flexible_gpus_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11486,30 +10877,36 @@ struct osc_link_managed_policy_to_user_group_arg { int is_set_dry_run; int dry_run; /* - * The OUTSCALE Resource Name (ORN) of the policy. For more information, - * see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie - * rs.html). - */ - char *policy_orn; - /* - * The name of the group you want to link the policy to. + * One or more filters. + * --Filters.DeleteOnVmDeletion: bool + * Indicates whether the fGPU is deleted when terminating the VM. + * --Filters.FlexibleGpuIds: array string + * One or more IDs of fGPUs. + * --Filters.Generations: array string + * The processor generations that the fGPUs are compatible with. + * --Filters.ModelNames: array string + * One or more models of fGPUs. For more information, see [About + * Flexible + * + * GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html) + * . + * --Filters.States: array string + * The states of the fGPUs (`allocated` \\| `attaching` \\| + * `attached` \\| + * `detaching`). + * --Filters.SubregionNames: array string + * The Subregions where the fGPUs are located. + * --Filters.VmIds: array string + * One or more IDs of VMs. */ - char *user_group_name; + char *filters_str; + int is_set_filters; + struct filters_flexible_gpu filters; }; -struct osc_link_load_balancer_backend_machines_arg { - /* Required: load_balancer_name */ - /* - * One or more public IPs of backend VMs. - */ - char *backend_ips_str; - char **backend_ips; - /* - * One or more IDs of backend VMs. - */ - char *backend_vm_ids_str; - char **backend_vm_ids; +struct osc_read_image_export_tasks_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11517,31 +10914,29 @@ struct osc_link_load_balancer_backend_machines_arg { int is_set_dry_run; int dry_run; /* - * The name of the load balancer. - */ - char *load_balancer_name; -}; - -struct osc_link_internet_service_arg { - /* Required: internet_service_id, net_id */ - /* - * If true, checks whether you have the required permissions to perform - * the action. + * One or more filters. + * --Filters.TaskIds: array string + * The IDs of the export tasks. */ - int is_set_dry_run; - int dry_run; + char *filters_str; + int is_set_filters; + struct filters_export_task filters; /* - * The ID of the Internet service you want to attach. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *internet_service_id; + char *next_page_token; /* - * The ID of the Net to which you want to attach the Internet service. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *net_id; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_link_flexible_gpu_arg { - /* Required: flexible_gpu_id, vm_id */ +struct osc_read_images_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11549,22 +10944,81 @@ struct osc_link_flexible_gpu_arg { int is_set_dry_run; int dry_run; /* - * The ID of the fGPU you want to attach. + * One or more filters. + * --Filters.AccountAliases: array string + * The account aliases of the owners of the OMIs. + * --Filters.AccountIds: array string + * The account IDs of the owners of the OMIs. By default, all the + * OMIs for + * which you have launch permissions are described. + * --Filters.Architectures: array string + * The architectures of the OMIs (`i386` \\| `x86_64`). + * --Filters.BlockDeviceMappingDeleteOnVmDeletion: bool + * Whether the volumes are deleted or not when terminating the VM. + * --Filters.BlockDeviceMappingDeviceNames: array string + * The device names for the volumes. + * --Filters.BlockDeviceMappingSnapshotIds: array string + * The IDs of the snapshots used to create the volumes. + * --Filters.BlockDeviceMappingVolumeSizes: array integer + * The sizes of the volumes, in gibibytes (GiB). + * --Filters.BlockDeviceMappingVolumeTypes: array string + * The types of volumes (`standard` \\| `gp2` \\| `io1`). + * --Filters.Descriptions: array string + * The descriptions of the OMIs, provided when they were created. + * --Filters.FileLocations: array string + * The locations of the buckets where the OMI files are stored. + * --Filters.Hypervisors: array string + * The hypervisor type of the OMI (always `xen`). + * --Filters.ImageIds: array string + * The IDs of the OMIs. + * --Filters.ImageNames: array string + * The names of the OMIs, provided when they were created. + * --Filters.PermissionsToLaunchAccountIds: array string + * The account IDs which have launch permissions for the OMIs. + * --Filters.PermissionsToLaunchGlobalPermission: bool + * If true, lists all public OMIs. If false, lists all private OMIs. + * --Filters.ProductCodeNames: array string + * The names of the product codes associated with the OMI. + * --Filters.ProductCodes: array string + * The product codes associated with the OMI. + * --Filters.RootDeviceNames: array string + * The name of the root device. This value must be /dev/sda1. + * --Filters.RootDeviceTypes: array string + * The types of root device used by the OMIs (`bsu` or `ebs`). + * --Filters.States: array string + * The states of the OMIs (`pending` \\| `available` \\| `failed`). + * --Filters.TagKeys: array string + * The keys of the tags associated with the OMIs. + * --Filters.TagValues: array string + * The values of the tags associated with the OMIs. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the OMIs, + * in the + * following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * --Filters.VirtualizationTypes: array string + * The virtualization types (always `hvm`). */ - char *flexible_gpu_id; + char *filters_str; + int is_set_filters; + struct filters_image filters; /* - * The ID of the VM you want to attach the fGPU to. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *vm_id; -}; - -struct osc_deregister_vms_in_load_balancer_arg { - /* Required: backend_vm_ids, load_balancer_name */ + char *next_page_token; /* - * One or more IDs of backend VMs. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *backend_vm_ids_str; - char **backend_vm_ids; + int is_set_results_per_page; + long long int results_per_page; +}; + +struct osc_read_internet_services_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11572,32 +11026,47 @@ struct osc_deregister_vms_in_load_balancer_arg { int is_set_dry_run; int dry_run; /* - * The name of the load balancer. - */ - char *load_balancer_name; -}; - -struct osc_delete_vpn_connection_route_arg { - /* Required: destination_ip_range, vpn_connection_id */ - /* - * The network prefix of the route to delete, in CIDR notation (for - * example, `10.12.0.0/16`). + * One or more filters. + * --Filters.InternetServiceIds: array string + * The IDs of the Internet services. + * --Filters.LinkNetIds: array string + * The IDs of the Nets the Internet services are attached to. + * --Filters.LinkStates: array string + * The current states of the attachments between the Internet + * services and + * the Nets (only `available`, if the Internet gateway is attached + * to a + * Net). + * --Filters.TagKeys: array string + * The keys of the tags associated with the Internet services. + * --Filters.TagValues: array string + * The values of the tags associated with the Internet services. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the + * Internet + * services, in the following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. */ - char *destination_ip_range; + char *filters_str; + int is_set_filters; + struct filters_internet_service filters; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The token to request the next page of results. Each token refers to a + * specific page. */ - int is_set_dry_run; - int dry_run; + char *next_page_token; /* - * The ID of the target VPN connection of the static route to delete. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *vpn_connection_id; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_vpn_connection_arg { - /* Required: vpn_connection_id */ +struct osc_read_keypairs_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11605,13 +11074,35 @@ struct osc_delete_vpn_connection_arg { int is_set_dry_run; int dry_run; /* - * The ID of the VPN connection you want to delete. + * One or more filters. + * --Filters.KeypairFingerprints: array string + * The fingerprints of the keypairs. + * --Filters.KeypairNames: array string + * The names of the keypairs. + * --Filters.KeypairTypes: array string + * The types of the keypairs (`ssh-rsa`, `ssh-ed25519`, + * `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or + * `ecdsa-sha2-nistp521`). */ - char *vpn_connection_id; + char *filters_str; + int is_set_filters; + struct filters_keypair filters; + /* + * The token to request the next page of results. Each token refers to a + * specific page. + */ + char *next_page_token; + /* + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_volume_arg { - /* Required: volume_id */ +struct osc_read_linked_policies_arg { + /* Required: UserName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11619,28 +11110,35 @@ struct osc_delete_volume_arg { int is_set_dry_run; int dry_run; /* - * The ID of the volume you want to delete. - */ - char *volume_id; -}; - -struct osc_delete_vms_arg { - /* Required: vm_ids */ + * One or more filters. + * --Filters.PathPrefix: string + * The path prefix of the policies. If not specified, it is set to a + * slash + * (`/`). + */ + char *filters_str; + int is_set_filters; + struct read_linked_policies_filters filters; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The item starting the list of policies requested. */ - int is_set_dry_run; - int dry_run; + int is_set_first_item; + long long int first_item; /* - * One or more IDs of VMs. + * The maximum number of items that can be returned in a single response + * (by default, `100`). */ - char *vm_ids_str; - char **vm_ids; + int is_set_results_per_page; + long long int results_per_page; + /* + * The name of the user the policies are linked to. + */ + char *user_name; }; -struct osc_delete_vm_template_arg { - /* Required: vm_template_id */ +struct osc_read_listener_rules_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11648,13 +11146,18 @@ struct osc_delete_vm_template_arg { int is_set_dry_run; int dry_run; /* - * The ID of the VM template you want to delete. + * One or more filters. + * --Filters.ListenerRuleNames: array string + * The names of the listener rules. */ - char *vm_template_id; + char *filters_str; + int is_set_filters; + struct filters_listener_rule filters; }; -struct osc_delete_vm_group_arg { - /* Required: vm_group_id */ +struct osc_read_load_balancer_tags_arg { + /* Required: LoadBalancerNames + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11662,13 +11165,15 @@ struct osc_delete_vm_group_arg { int is_set_dry_run; int dry_run; /* - * The ID of the VM group you want to delete. + * One or more load balancer names. */ - char *vm_group_id; + char *load_balancer_names_str; + char **load_balancer_names; }; -struct osc_delete_virtual_gateway_arg { - /* Required: virtual_gateway_id */ +struct osc_read_load_balancers_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11676,13 +11181,18 @@ struct osc_delete_virtual_gateway_arg { int is_set_dry_run; int dry_run; /* - * The ID of the virtual gateway you want to delete. + * One or more filters. + * --Filters.LoadBalancerNames: array string + * The names of the load balancers. */ - char *virtual_gateway_id; + char *filters_str; + int is_set_filters; + struct filters_load_balancer filters; }; -struct osc_delete_user_group_policy_arg { - /* Required: user_group_name, policy_name */ +struct osc_read_locations_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11690,21 +11200,21 @@ struct osc_delete_user_group_policy_arg { int is_set_dry_run; int dry_run; /* - * The name of the policy document you want to delete. - */ - char *policy_name; - /* - * The name of the group. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *user_group_name; + char *next_page_token; /* - * The path to the group. If not specified, it is set to a slash (`/`). + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *user_group_path; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_user_group_arg { - /* Required: user_group_name */ +struct osc_read_managed_policies_linked_to_user_group_arg { + /* Required: UserGroupName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11712,23 +11222,37 @@ struct osc_delete_user_group_arg { int is_set_dry_run; int dry_run; /* - * If true, forces the deletion of the user group even if it is not - * empty. + * One or more filters. + * --Filters.PathPrefix: string + * The path prefix of the groups. If not specified, it is set to a + * slash + * (`/`). + * --Filters.UserGroupIds: array string + * The IDs of the user groups. */ - int is_set_force; - int force; + char *filters_str; + int is_set_filters; + struct filters_user_group filters; /* - * The path to the group. If not specified, it is set to a slash (`/`). + * The item starting the list of policies requested. */ - char *path; + int is_set_first_item; + long long int first_item; /* - * The name of the group you want to delete. + * The maximum number of items that can be returned in a single response + * (by default, `100`). + */ + int is_set_results_per_page; + long long int results_per_page; + /* + * The name of the group. */ char *user_group_name; }; -struct osc_delete_user_arg { - /* Required: user_name */ +struct osc_read_nat_services_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11736,40 +11260,49 @@ struct osc_delete_user_arg { int is_set_dry_run; int dry_run; /* - * The name of the EIM user you want to delete. - */ - char *user_name; -}; - -struct osc_delete_tags_arg { - /* Required: resource_ids, tags */ - /* - * If true, checks whether you have the required permissions to perform - * the action. + * One or more filters. + * --Filters.ClientTokens: array string + * The idempotency tokens provided when creating the NAT services. + * --Filters.NatServiceIds: array string + * The IDs of the NAT services. + * --Filters.NetIds: array string + * The IDs of the Nets in which the NAT services are. + * --Filters.States: array string + * The states of the NAT services (`pending` \\| `available` \\| + * `deleting` + * \\| `deleted`). + * --Filters.SubnetIds: array string + * The IDs of the Subnets in which the NAT services are. + * --Filters.TagKeys: array string + * The keys of the tags associated with the NAT services. + * --Filters.TagValues: array string + * The values of the tags associated with the NAT services. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the NAT + * services, + * in the following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. */ - int is_set_dry_run; - int dry_run; + char *filters_str; + int is_set_filters; + struct filters_nat_service filters; /* - * One or more resource IDs. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *resource_ids_str; - char **resource_ids; + char *next_page_token; /* - * One or more tags to delete (if you set a tag value, only the tags - * matching exactly this value are deleted). - * Information about the tag. - * --Tags.INDEX.Key: string - * The key of the tag, with a minimum of 1 character. - * --Tags.INDEX.Value: string - * The value of the tag, between 0 and 255 characters. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *tags_str; - int nb_tags; - struct resource_tag *tags; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_subnet_arg { - /* Required: subnet_id */ +struct osc_read_net_access_point_services_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11777,27 +11310,31 @@ struct osc_delete_subnet_arg { int is_set_dry_run; int dry_run; /* - * The ID of the Subnet you want to delete. + * One or more filters. + * --Filters.ServiceIds: array string + * The IDs of the services. + * --Filters.ServiceNames: array string + * The names of the services. */ - char *subnet_id; -}; - -struct osc_delete_snapshot_arg { - /* Required: snapshot_id */ + char *filters_str; + int is_set_filters; + struct filters_service filters; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The token to request the next page of results. Each token refers to a + * specific page. */ - int is_set_dry_run; - int dry_run; + char *next_page_token; /* - * The ID of the snapshot you want to delete. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *snapshot_id; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_server_certificate_arg { - /* Required: name */ +struct osc_read_net_access_points_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11805,13 +11342,48 @@ struct osc_delete_server_certificate_arg { int is_set_dry_run; int dry_run; /* - * The name of the server certificate you want to delete. + * One or more filters. + * --Filters.NetAccessPointIds: array string + * The IDs of the Net access points. + * --Filters.NetIds: array string + * The IDs of the Nets. + * --Filters.ServiceNames: array string + * The names of the services. For more information, see + * [ReadNetAccessPointServices](#readnetaccesspointservices). + * --Filters.States: array string + * The states of the Net access points (`pending` \\| `available` + * \\| + * `deleting` \\| `deleted`). + * --Filters.TagKeys: array string + * The keys of the tags associated with the Net access points. + * --Filters.TagValues: array string + * The values of the tags associated with the Net access points. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the Net + * access + * points, in the following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. */ - char *name; + char *filters_str; + int is_set_filters; + struct filters_net_access_point filters; + /* + * The token to request the next page of results. Each token refers to a + * specific page. + */ + char *next_page_token; + /* + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_security_group_rule_arg { - /* Required: security_group_id, flow */ +struct osc_read_net_peerings_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11819,103 +11391,61 @@ struct osc_delete_security_group_rule_arg { int is_set_dry_run; int dry_run; /* - * The direction of the flow: `Inbound` or `Outbound`. You can specify - * `Outbound` for Nets only. - */ - char *flow; - /* - * The beginning of the port range for the TCP and UDP protocols, or an - * ICMP type number. - */ - int is_set_from_port_range; - long long int from_port_range; - /* - * The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all - * protocols). By default, `-1`. In a Net, this can also be an IP - * protocol number. For more information, see the [IANA.org - * website](https://www.iana.org/assignments/protocol-numbers/protocol-nu - * mbers.xhtml). - */ - char *ip_protocol; - /* - * The IP range for the security group rule, in CIDR notation (for - * example, `10.0.0.0/16`). - */ - char *ip_range; - /* - * One or more rules you want to delete from the security group. - * Information about the security group rule. - * --Rules.INDEX.FromPortRange: long long int - * The beginning of the port range for the TCP and UDP protocols, or - * an - * ICMP type number. - * --Rules.INDEX.IpProtocol: string - * The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all - * protocols). - * By default, `-1`. In a Net, this can also be an IP protocol - * number. For - * more information, see the [IANA.org + * One or more filters. + * --Filters.AccepterNetAccountIds: array string + * The account IDs of the owners of the peer Nets. + * --Filters.AccepterNetIpRanges: array string + * The IP ranges of the peer Nets, in CIDR notation (for example, + * `10.0.0.0/24`). + * --Filters.AccepterNetNetIds: array string + * The IDs of the peer Nets. + * --Filters.ExpirationDates: array string + * The dates and times at which the Net peerings expire, in ISO 8601 + * date-time format (for example, `2020-06-14T00:00:00.000Z`). + * --Filters.NetPeeringIds: array string + * The IDs of the Net peerings. + * --Filters.SourceNetAccountIds: array string + * The account IDs of the owners of the peer Nets. + * --Filters.SourceNetIpRanges: array string + * The IP ranges of the peer Nets. + * --Filters.SourceNetNetIds: array string + * The IDs of the peer Nets. + * --Filters.StateMessages: array string + * Additional information about the states of the Net peerings. + * --Filters.StateNames: array string + * The states of the Net peerings (`pending-acceptance` \\| `active` + * \\| + * `rejected` \\| `failed` \\| `expired` \\| `deleted`). + * --Filters.TagKeys: array string + * The keys of the tags associated with the Net peerings. + * --Filters.TagValues: array string + * The values of the tags associated with the Net peerings. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the Net + * peerings, + * in the following format: * - * website](https://www.iana.org/assignments/protocol-numbers/protocol-nu - * mber - * s.xhtml). - * --Rules.INDEX.IpRanges: array string - * One or more IP ranges for the security group rules, in CIDR - * notation - * (for example, `10.0.0.0/16`). - * --Rules.INDEX.SecurityGroupsMembers: array ref SecurityGroupsMember - * Information about one or more source or destination security - * groups. - * Information about a source or destination security group. - * --Rules.INDEX.SecurityGroupsMembers.INDEX.AccountId: string - * The account ID that owns the source or destination security - * group. - * --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupId: - * string - * The ID of a source or destination security group that you - * want to link - * to the security group of the rule. - * --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupName: - * string - * (Public Cloud only) The name of a source or destination - * security group - * that you want to link to the security group of the rule. - * --Rules.INDEX.ServiceIds: array string - * One or more service IDs to allow traffic from a Net to access the - * corresponding OUTSCALE services. For more information, see - * [ReadNetAccessPointServices](#readnetaccesspointservices). - * --Rules.INDEX.ToPortRange: long long int - * The end of the port range for the TCP and UDP protocols, or an - * ICMP code - * number. - */ - char *rules_str; - int nb_rules; - struct security_group_rule *rules; - /* - * The account ID of the owner of the security group you want to delete - * a rule from. - */ - char *security_group_account_id_to_unlink; - /* - * The ID of the security group you want to delete a rule from. + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. */ - char *security_group_id; + char *filters_str; + int is_set_filters; + struct filters_net_peering filters; /* - * The ID of the source security group. If you are in the Public Cloud, - * you can also specify the name of the source security group. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *security_group_name_to_unlink; + char *next_page_token; /* - * The end of the port range for the TCP and UDP protocols, or an ICMP - * code number. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - int is_set_to_port_range; - long long int to_port_range; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_security_group_arg { - /* Required:none */ +struct osc_read_nets_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11923,35 +11453,48 @@ struct osc_delete_security_group_arg { int is_set_dry_run; int dry_run; /* - * The ID of the security group you want to delete. - */ - char *security_group_id; - /* - * The name of the security group. + * One or more filters. + * --Filters.DhcpOptionsSetIds: array string + * The IDs of the DHCP options sets. + * --Filters.IpRanges: array string + * The IP ranges for the Nets, in CIDR notation (for example, + * `10.0.0.0/16`). + * --Filters.IsDefault: bool + * If true, the Net used is the default one. + * --Filters.NetIds: array string + * The IDs of the Nets. + * --Filters.States: array string + * The states of the Nets (`pending` \\| `available` \\| `deleting`). + * --Filters.TagKeys: array string + * The keys of the tags associated with the Nets. + * --Filters.TagValues: array string + * The values of the tags associated with the Nets. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the Nets, + * in the + * following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. */ - char *security_group_name; -}; - -struct osc_delete_route_table_arg { - /* Required: route_table_id */ + char *filters_str; + int is_set_filters; + struct filters_net filters; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The token to request the next page of results. Each token refers to a + * specific page. */ - int is_set_dry_run; - int dry_run; + char *next_page_token; /* - * The ID of the route table you want to delete. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *route_table_id; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_route_arg { - /* Required: route_table_id, destination_ip_range */ - /* - * The exact IP range for the route. - */ - char *destination_ip_range; +struct osc_read_nics_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11959,13 +11502,90 @@ struct osc_delete_route_arg { int is_set_dry_run; int dry_run; /* - * The ID of the route table from which you want to delete a route. + * One or more filters. + * --Filters.Descriptions: array string + * The descriptions of the NICs. + * --Filters.IsSourceDestCheck: bool + * Whether the source/destination checking is enabled (true) or + * disabled + * (false). + * --Filters.LinkNicDeleteOnVmDeletion: bool + * Whether the NICs are deleted when the VMs they are attached to + * are + * terminated. + * --Filters.LinkNicDeviceNumbers: array integer + * The device numbers the NICs are attached to. + * --Filters.LinkNicLinkNicIds: array string + * The attachment IDs of the NICs. + * --Filters.LinkNicStates: array string + * The states of the attachments. + * --Filters.LinkNicVmAccountIds: array string + * The account IDs of the owners of the VMs the NICs are attached to. + * --Filters.LinkNicVmIds: array string + * The IDs of the VMs the NICs are attached to. + * --Filters.LinkPublicIpAccountIds: array string + * The account IDs of the owners of the public IPs associated with + * the + * NICs. + * --Filters.LinkPublicIpLinkPublicIpIds: array string + * The association IDs returned when the public IPs were associated + * with + * the NICs. + * --Filters.LinkPublicIpPublicDnsNames: array string + * The public DNS names associated with the public IPs. + * --Filters.LinkPublicIpPublicIpIds: array string + * The allocation IDs returned when the public IPs were allocated to + * their + * accounts. + * --Filters.LinkPublicIpPublicIps: array string + * The public IPs associated with the NICs. + * --Filters.MacAddresses: array string + * The Media Access Control (MAC) addresses of the NICs. + * --Filters.NetIds: array string + * The IDs of the Nets where the NICs are located. + * --Filters.NicIds: array string + * The IDs of the NICs. + * --Filters.PrivateDnsNames: array string + * The private DNS names associated with the primary private IPs. + * --Filters.PrivateIpsLinkPublicIpAccountIds: array string + * The account IDs of the owner of the public IPs associated with + * the + * private IPs. + * --Filters.PrivateIpsLinkPublicIpPublicIps: array string + * The public IPs associated with the private IPs. + * --Filters.PrivateIpsPrimaryIp: bool + * Whether the private IP is the primary IP associated with the NIC. + * --Filters.PrivateIpsPrivateIps: array string + * The private IPs of the NICs. + * --Filters.SecurityGroupIds: array string + * The IDs of the security groups associated with the NICs. + * --Filters.SecurityGroupNames: array string + * The names of the security groups associated with the NICs. + * --Filters.States: array string + * The states of the NICs. + * --Filters.SubnetIds: array string + * The IDs of the Subnets for the NICs. + * --Filters.SubregionNames: array string + * The Subregions where the NICs are located. + * --Filters.TagKeys: array string + * The keys of the tags associated with the NICs. + * --Filters.TagValues: array string + * The values of the tags associated with the NICs. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the NICs, + * in the + * following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. */ - char *route_table_id; + char *filters_str; + int is_set_filters; + struct filters_nic filters; }; -struct osc_delete_public_ip_arg { - /* Required:none */ +struct osc_read_policies_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -11973,18 +11593,35 @@ struct osc_delete_public_ip_arg { int is_set_dry_run; int dry_run; /* - * The public IP. In the public Cloud, this parameter is required. + * One or more filters. + * --Filters.OnlyLinked: bool + * If set to true, lists only the policies attached to a user. + * --Filters.PathPrefix: string + * The path prefix you can use to filter the results. If not + * specified, it + * is set to a slash (`/`). + * --Filters.Scope: string + * The scope to filter policies (`OWS` \\| `LOCAL`). */ - char *public_ip; + char *filters_str; + int is_set_filters; + struct read_policies_filters filters; /* - * The ID representing the association of the public IP with the VM or - * the NIC. In a Net, this parameter is required. + * The item starting the list of policies requested. */ - char *public_ip_id; + int is_set_first_item; + long long int first_item; + /* + * The maximum number of items that can be returned in a single response + * (by default, `100`). + */ + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_policy_version_arg { - /* Required: policy_orn, version_id */ +struct osc_read_policy_arg { + /* Required: PolicyOrn + */ /* * The OUTSCALE Resource Name (ORN) of the policy. For more information, * see [Resource @@ -11992,73 +11629,50 @@ struct osc_delete_policy_version_arg { * rs.html). */ char *policy_orn; - /* - * The ID of the version of the policy you want to delete. - */ - char *version_id; }; -struct osc_delete_policy_arg { - /* Required: policy_orn */ - /* - * If true, checks whether you have the required permissions to perform - * the action. - */ - int is_set_dry_run; - int dry_run; +struct osc_read_policy_version_arg { + /* Required: PolicyOrn VersionId + */ /* - * The OUTSCALE Resource Name (ORN) of the policy you want to delete. - * For more information, see [Resource + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie * rs.html). */ char *policy_orn; -}; - -struct osc_delete_nic_arg { - /* Required: nic_id */ /* - * If true, checks whether you have the required permissions to perform - * the action. - */ - int is_set_dry_run; - int dry_run; - /* - * The ID of the NIC you want to delete. + * The ID of the policy version. */ - char *nic_id; + char *version_id; }; -struct osc_delete_net_peering_arg { - /* Required: net_peering_id */ - /* - * If true, checks whether you have the required permissions to perform - * the action. - */ - int is_set_dry_run; - int dry_run; +struct osc_read_policy_versions_arg { + /* Required: PolicyOrn + */ /* - * The ID of the Net peering you want to delete. + * The item starting the list of policies requested. */ - char *net_peering_id; -}; - -struct osc_delete_net_access_point_arg { - /* Required: net_access_point_id */ + int is_set_first_item; + long long int first_item; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). */ - int is_set_dry_run; - int dry_run; + char *policy_orn; /* - * The ID of the Net access point. + * The maximum number of items that can be returned in a single response + * (by default, `100`). */ - char *net_access_point_id; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_net_arg { - /* Required: net_id */ +struct osc_read_product_types_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -12066,51 +11680,40 @@ struct osc_delete_net_arg { int is_set_dry_run; int dry_run; /* - * The ID of the Net you want to delete. + * One or more filters. + * --Filters.ProductTypeIds: array string + * The IDs of the product types. */ - char *net_id; -}; - -struct osc_delete_nat_service_arg { - /* Required: nat_service_id */ + char *filters_str; + int is_set_filters; + struct filters_product_type filters; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The token to request the next page of results. Each token refers to a + * specific page. */ - int is_set_dry_run; - int dry_run; + char *next_page_token; /* - * The ID of the NAT service you want to delete. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *nat_service_id; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_load_balancer_tags_arg { - /* Required: load_balancer_names, tags */ +struct osc_read_public_catalog_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; - /* - * One or more load balancer names. - */ - char *load_balancer_names_str; - char **load_balancer_names; - /* - * One or more tags to delete from the load balancers. - * Information about the tag. - * --Tags.INDEX.Key: string - * The key of the tag, with a minimum of 1 character. - */ - char *tags_str; - int nb_tags; - struct resource_load_balancer_tag *tags; }; -struct osc_delete_load_balancer_policy_arg { - /* Required: load_balancer_name, policy_name */ +struct osc_read_public_ip_ranges_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -12118,17 +11721,21 @@ struct osc_delete_load_balancer_policy_arg { int is_set_dry_run; int dry_run; /* - * The name of the load balancer for which you want to delete a policy. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *load_balancer_name; + char *next_page_token; /* - * The name of the policy you want to delete. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *policy_name; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_load_balancer_listeners_arg { - /* Required: load_balancer_name, load_balancer_ports */ +struct osc_read_public_ips_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -12136,32 +11743,55 @@ struct osc_delete_load_balancer_listeners_arg { int is_set_dry_run; int dry_run; /* - * The name of the load balancer for which you want to delete listeners. - */ - char *load_balancer_name; - /* - * One or more port numbers of the listeners you want to delete. + * One or more filters. + * --Filters.LinkPublicIpIds: array string + * The IDs representing the associations of public IPs with VMs or + * NICs. + * --Filters.NicAccountIds: array string + * The account IDs of the owners of the NICs. + * --Filters.NicIds: array string + * The IDs of the NICs. + * --Filters.Placements: array string + * Whether the public IPs are for use in the public Cloud or in a + * Net. + * --Filters.PrivateIps: array string + * The private IPs associated with the public IPs. + * --Filters.PublicIpIds: array string + * The IDs of the public IPs. + * --Filters.PublicIps: array string + * The public IPs. + * --Filters.TagKeys: array string + * The keys of the tags associated with the public IPs. + * --Filters.TagValues: array string + * The values of the tags associated with the public IPs. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the public + * IPs, in + * the following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * --Filters.VmIds: array string + * The IDs of the VMs. */ - char *load_balancer_ports_str; - int *load_balancer_ports; -}; - -struct osc_delete_load_balancer_arg { - /* Required: load_balancer_name */ + char *filters_str; + int is_set_filters; + struct filters_public_ip filters; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The token to request the next page of results. Each token refers to a + * specific page. */ - int is_set_dry_run; - int dry_run; + char *next_page_token; /* - * The name of the load balancer you want to delete. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *load_balancer_name; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_listener_rule_arg { - /* Required: listener_rule_name */ +struct osc_read_quotas_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -12169,41 +11799,48 @@ struct osc_delete_listener_rule_arg { int is_set_dry_run; int dry_run; /* - * The name of the rule you want to delete. + * One or more filters. + * --Filters.Collections: array string + * The group names of the quotas. + * --Filters.QuotaNames: array string + * The names of the quotas. + * --Filters.QuotaTypes: array string + * The resource IDs if these are resource-specific quotas, `global` + * if they + * are not. + * --Filters.ShortDescriptions: array string + * The description of the quotas. */ - char *listener_rule_name; -}; - -struct osc_delete_keypair_arg { - /* Required: keypair_name */ + char *filters_str; + int is_set_filters; + struct filters_quota filters; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The token to request the next page of results. Each token refers to a + * specific page. */ - int is_set_dry_run; - int dry_run; + char *next_page_token; /* - * The name of the keypair you want to delete. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *keypair_name; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_internet_service_arg { - /* Required: internet_service_id */ +struct osc_read_regions_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; - /* - * The ID of the Internet service you want to delete. - */ - char *internet_service_id; }; -struct osc_delete_image_arg { - /* Required: image_id */ +struct osc_read_route_tables_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -12211,59 +11848,70 @@ struct osc_delete_image_arg { int is_set_dry_run; int dry_run; /* - * The ID of the OMI you want to delete. - */ - char *image_id; -}; - -struct osc_delete_flexible_gpu_arg { - /* Required: flexible_gpu_id */ - /* - * If true, checks whether you have the required permissions to perform - * the action. - */ - int is_set_dry_run; - int dry_run; - /* - * The ID of the fGPU you want to delete. - */ - char *flexible_gpu_id; -}; - -struct osc_delete_export_task_arg { - /* Required: export_task_id */ - /* - * If true, checks whether you have the required permissions to perform - * the action. - */ - int is_set_dry_run; - int dry_run; - /* - * The ID of the export task to delete. + * One or more filters. + * --Filters.LinkRouteTableIds: array string + * The IDs of the route tables involved in the associations. + * --Filters.LinkRouteTableLinkRouteTableIds: array string + * The IDs of the associations between the route tables and the + * Subnets. + * --Filters.LinkRouteTableMain: bool + * If true, the route tables are the main ones for their Nets. + * --Filters.LinkSubnetIds: array string + * The IDs of the Subnets involved in the associations. + * --Filters.NetIds: array string + * The IDs of the Nets for the route tables. + * --Filters.RouteCreationMethods: array string + * The methods used to create a route. + * --Filters.RouteDestinationIpRanges: array string + * The IP ranges specified in routes in the tables. + * --Filters.RouteDestinationServiceIds: array string + * The service IDs specified in routes in the tables. + * --Filters.RouteGatewayIds: array string + * The IDs of the gateways specified in routes in the tables. + * --Filters.RouteNatServiceIds: array string + * The IDs of the NAT services specified in routes in the tables. + * --Filters.RouteNetPeeringIds: array string + * The IDs of the Net peerings specified in routes in the tables. + * --Filters.RouteStates: array string + * The states of routes in the route tables (always `active`). + * --Filters.RouteTableIds: array string + * The IDs of the route tables. + * --Filters.RouteVmIds: array string + * The IDs of the VMs specified in routes in the tables. + * --Filters.TagKeys: array string + * The keys of the tags associated with the route tables. + * --Filters.TagValues: array string + * The values of the tags associated with the route tables. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the route + * tables, + * in the following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. */ - char *export_task_id; -}; - -struct osc_delete_direct_link_interface_arg { - /* Required: direct_link_interface_id */ + char *filters_str; + int is_set_filters; + struct filters_route_table filters; /* - * The ID of the DirectLink interface you want to delete. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *direct_link_interface_id; + char *next_page_token; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - int is_set_dry_run; - int dry_run; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_direct_link_arg { - /* Required: direct_link_id */ +struct osc_read_secret_access_key_arg { + /* Required: AccessKeyId + */ /* - * The ID of the DirectLink you want to delete. + * The ID of the access key. */ - char *direct_link_id; + char *access_key_id; /* * If true, checks whether you have the required permissions to perform * the action. @@ -12272,109 +11920,151 @@ struct osc_delete_direct_link_arg { int dry_run; }; -struct osc_delete_dhcp_options_arg { - /* Required: dhcp_options_set_id */ - /* - * The ID of the DHCP options set you want to delete. - */ - char *dhcp_options_set_id; +struct osc_read_security_groups_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; -}; - -struct osc_delete_dedicated_group_arg { - /* Required: dedicated_group_id */ /* - * The ID of the dedicated group you want to delete. + * One or more filters. + * --Filters.Descriptions: array string + * The descriptions of the security groups. + * --Filters.InboundRuleAccountIds: array string + * The account IDs that have been granted permissions. + * --Filters.InboundRuleFromPortRanges: array integer + * The beginnings of the port ranges for the TCP and UDP protocols, + * or the + * ICMP type numbers. + * --Filters.InboundRuleIpRanges: array string + * The IP ranges that have been granted permissions, in CIDR + * notation (for + * example, `10.0.0.0/24`). + * --Filters.InboundRuleProtocols: array string + * The IP protocols for the permissions (`tcp` \\| `udp` \\| `icmp`, + * or a + * protocol number, or `-1` for all protocols). + * --Filters.InboundRuleSecurityGroupIds: array string + * The IDs of the security groups that have been granted permissions. + * --Filters.InboundRuleSecurityGroupNames: array string + * The names of the security groups that have been granted + * permissions. + * --Filters.InboundRuleToPortRanges: array integer + * The ends of the port ranges for the TCP and UDP protocols, or the + * ICMP + * code numbers. + * --Filters.NetIds: array string + * The IDs of the Nets specified when the security groups were + * created. + * --Filters.OutboundRuleAccountIds: array string + * The account IDs that have been granted permissions. + * --Filters.OutboundRuleFromPortRanges: array integer + * The beginnings of the port ranges for the TCP and UDP protocols, + * or the + * ICMP type numbers. + * --Filters.OutboundRuleIpRanges: array string + * The IP ranges that have been granted permissions, in CIDR + * notation (for + * example, `10.0.0.0/24`). + * --Filters.OutboundRuleProtocols: array string + * The IP protocols for the permissions (`tcp` \\| `udp` \\| `icmp`, + * or a + * protocol number, or `-1` for all protocols). + * --Filters.OutboundRuleSecurityGroupIds: array string + * The IDs of the security groups that have been granted permissions. + * --Filters.OutboundRuleSecurityGroupNames: array string + * The names of the security groups that have been granted + * permissions. + * --Filters.OutboundRuleToPortRanges: array integer + * The ends of the port ranges for the TCP and UDP protocols, or the + * ICMP + * code numbers. + * --Filters.SecurityGroupIds: array string + * The IDs of the security groups. + * --Filters.SecurityGroupNames: array string + * The names of the security groups. + * --Filters.TagKeys: array string + * The keys of the tags associated with the security groups. + * --Filters.TagValues: array string + * The values of the tags associated with the security groups. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the + * security + * groups, in the following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. */ - char *dedicated_group_id; + char *filters_str; + int is_set_filters; + struct filters_security_group filters; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The token to request the next page of results. Each token refers to a + * specific page. */ - int is_set_dry_run; - int dry_run; + char *next_page_token; /* - * If true, forces the deletion of the dedicated group and all its - * dependencies. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - int is_set_force; - int force; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_delete_client_gateway_arg { - /* Required: client_gateway_id */ - /* - * The ID of the client gateway you want to delete. - */ - char *client_gateway_id; +struct osc_read_server_certificates_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; -}; - -struct osc_delete_ca_arg { - /* Required: ca_id */ - /* - * The ID of the CA you want to delete. - */ - char *ca_id; /* - * If true, checks whether you have the required permissions to perform - * the action. + * One or more filters. + * --Filters.Paths: array string + * The paths to the server certificates. */ - int is_set_dry_run; - int dry_run; + char *filters_str; + int is_set_filters; + struct filters_server_certificate filters; }; -struct osc_delete_api_access_rule_arg { - /* Required: api_access_rule_id */ - /* - * The ID of the API access rule you want to delete. - */ - char *api_access_rule_id; +struct osc_read_snapshot_export_tasks_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; -}; - -struct osc_delete_access_key_arg { - /* Required: access_key_id */ /* - * The ID of the access key you want to delete. + * One or more filters. + * --Filters.TaskIds: array string + * The IDs of the export tasks. */ - char *access_key_id; + char *filters_str; + int is_set_filters; + struct filters_export_task filters; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The token to request the next page of results. Each token refers to a + * specific page. */ - int is_set_dry_run; - int dry_run; + char *next_page_token; /* - * The name of the EIM user the access key you want to delete is - * associated with. By default, the user who sends the request (which - * can be the root account). + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *user_name; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_create_vpn_connection_route_arg { - /* Required: destination_ip_range, vpn_connection_id */ - /* - * The network prefix of the route, in CIDR notation (for example, - * `10.12.0.0/16`). - */ - char *destination_ip_range; +struct osc_read_snapshots_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -12382,21 +12072,70 @@ struct osc_create_vpn_connection_route_arg { int is_set_dry_run; int dry_run; /* - * The ID of the target VPN connection of the static route. - */ - char *vpn_connection_id; -}; - -struct osc_create_vpn_connection_arg { - /* Required: client_gateway_id, connection_type, virtual_gateway_id */ + * One or more filters. + * --Filters.AccountAliases: array string + * The account aliases of the owners of the snapshots. + * --Filters.AccountIds: array string + * The account IDs of the owners of the snapshots. + * --Filters.Descriptions: array string + * The descriptions of the snapshots. + * --Filters.FromCreationDate: string + * The beginning of the time period, in ISO 8601 date-time format + * (for + * example, `2020-06-14T00:00:00.000Z`). + * --Filters.PermissionsToCreateVolumeAccountIds: array string + * The account IDs which have permissions to create volumes. + * --Filters.PermissionsToCreateVolumeGlobalPermission: bool + * If true, lists all public volumes. If false, lists all private + * volumes. + * --Filters.Progresses: array integer + * The progresses of the snapshots, as a percentage. + * --Filters.SnapshotIds: array string + * The IDs of the snapshots. + * --Filters.States: array string + * The states of the snapshots (`in-queue` \\| `pending` \\| + * `completed` + * \\| `error` \\| `deleting`). + * --Filters.TagKeys: array string + * The keys of the tags associated with the snapshots. + * --Filters.TagValues: array string + * The values of the tags associated with the snapshots. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the + * snapshots, in + * the following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * --Filters.ToCreationDate: string + * The end of the time period, in ISO 8601 date-time format (for + * example, + * `2020-06-30T00:00:00.000Z`). + * --Filters.VolumeIds: array string + * The IDs of the volumes used to create the snapshots. + * --Filters.VolumeSizes: array integer + * The sizes of the volumes used to create the snapshots, in + * gibibytes + * (GiB). + */ + char *filters_str; + int is_set_filters; + struct filters_snapshot filters; /* - * The ID of the client gateway. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *client_gateway_id; + char *next_page_token; /* - * The type of VPN connection (always `ipsec.1`). + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *connection_type; + int is_set_results_per_page; + long long int results_per_page; +}; + +struct osc_read_subnets_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -12404,23 +12143,51 @@ struct osc_create_vpn_connection_arg { int is_set_dry_run; int dry_run; /* - * By default or if false, the VPN connection uses dynamic routing with - * Border Gateway Protocol (BGP). If true, routing is controlled using - * static routes. For more information about how to create and delete - * static routes, see - * [CreateVpnConnectionRoute](#createvpnconnectionroute) and - * [DeleteVpnConnectionRoute](#deletevpnconnectionroute). + * One or more filters. + * --Filters.AvailableIpsCounts: array integer + * The number of available IPs. + * --Filters.IpRanges: array string + * The IP ranges in the Subnets, in CIDR notation (for example, + * `10.0.0.0/16`). + * --Filters.NetIds: array string + * The IDs of the Nets in which the Subnets are. + * --Filters.States: array string + * The states of the Subnets (`pending` \\| `available` \\| + * `deleted`). + * --Filters.SubnetIds: array string + * The IDs of the Subnets. + * --Filters.SubregionNames: array string + * The names of the Subregions in which the Subnets are located. + * --Filters.TagKeys: array string + * The keys of the tags associated with the Subnets. + * --Filters.TagValues: array string + * The values of the tags associated with the Subnets. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the + * Subnets, in + * the following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. */ - int is_set_static_routes_only; - int static_routes_only; + char *filters_str; + int is_set_filters; + struct filters_subnet filters; /* - * The ID of the virtual gateway. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *virtual_gateway_id; + char *next_page_token; + /* + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_create_volume_arg { - /* Required: subregion_name */ +struct osc_read_subregions_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -12428,119 +12195,33 @@ struct osc_create_volume_arg { int is_set_dry_run; int dry_run; /* - * The number of I/O operations per second (IOPS). This parameter must - * be specified only if you create an `io1` volume. The maximum number - * of IOPS allowed for `io1` volumes is `13000` with a maximum - * performance ratio of 300 IOPS per gibibyte. - */ - int is_set_iops; - long long int iops; - /* - * The size of the volume, in gibibytes (GiB). The maximum allowed size - * for a volume is 14901 GiB. This parameter is required if the volume - * is not created from a snapshot (`SnapshotId` unspecified). - */ - int is_set_size; - long long int size; - /* - * The ID of the snapshot from which you want to create the volume. + * One or more filters. + * --Filters.RegionNames: array string + * The names of the Regions containing the Subregions. + * --Filters.States: array string + * The states of the Subregions. + * --Filters.SubregionNames: array string + * The names of the Subregions. */ - char *snapshot_id; + char *filters_str; + int is_set_filters; + struct filters_subregion filters; /* - * The Subregion in which you want to create the volume. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *subregion_name; + char *next_page_token; /* - * The type of volume you want to create (`io1` \\| `gp2` \\| - * `standard`). If not specified, a `standard` volume is created.
\nFor more information about volume types, see [About Volumes > - * Volume Types and - * IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volum - * e_types_and_iops). + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *volume_type; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_create_vms_arg { - /* Required: image_id */ - /* - * One or more block device mappings. - * Information about the block device mapping. - * --BlockDeviceMappings.INDEX.Bsu: ref BsuToCreate - * Information about the BSU volume to create. - * --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool - * By default or if set to true, the volume is deleted when - * terminating the - * VM. If false, the volume is not deleted when terminating the - * VM. - * --BlockDeviceMappings.INDEX.Bsu.Iops: long long int - * The number of I/O operations per second (IOPS). This - * parameter must be - * specified only if you create an `io1` volume. The maximum - * number of IOPS - * allowed for `io1` volumes is `13000` with a maximum - * performance ratio of - * 300 IOPS per gibibyte. - * --BlockDeviceMappings.INDEX.Bsu.SnapshotId: string - * The ID of the snapshot used to create the volume. - * --BlockDeviceMappings.INDEX.Bsu.VolumeSize: long long int - * The size of the volume, in gibibytes (GiB).
\nIf you - * specify a - * snapshot ID, the volume size must be at least equal to the - * snapshot - * size.
\nIf you specify a snapshot ID but no volume size, - * the volume - * is created with a size similar to the snapshot one. - * --BlockDeviceMappings.INDEX.Bsu.VolumeType: string - * The type of the volume (`standard` \\| `io1` \\| `gp2`). If - * not - * specified in the request, a `standard` volume is created.
\nFor more - * information about volume types, see [About Volumes > Volume - * Types and - * - * IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volum - * e_ty - * pes_and_iops). - * --BlockDeviceMappings.INDEX.DeviceName: string - * The device name for the volume. For a root device, you must use - * `/dev/sda1`. For other volumes, you must use `/dev/sdX`, - * `/dev/sdXX`, - * `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter - * between `b` - * and `z`, and the second `X` is a letter between `a` and `z`). - * --BlockDeviceMappings.INDEX.NoDevice: string - * Removes the device which is included in the block device mapping - * of the - * OMI. - * --BlockDeviceMappings.INDEX.VirtualDeviceName: string - * The name of the virtual device (`ephemeralN`). - */ - char *block_device_mappings_str; - int nb_block_device_mappings; - struct block_device_mapping_vm_creation *block_device_mappings; - /* - * By default or if true, the VM is started on creation. If false, the - * VM is stopped on creation. - */ - int is_set_boot_on_creation; - int boot_on_creation; - /* - * This parameter is not available. It is present in our API for the - * sake of historical compatibility with AWS. - */ - int is_set_bsu_optimized; - int bsu_optimized; - /* - * A unique identifier which enables you to manage the idempotency. - */ - char *client_token; - /* - * If true, you cannot delete the VM unless you change this parameter - * back to false. - */ - int is_set_deletion_protection; - int deletion_protection; +struct osc_read_tags_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -12548,175 +12229,126 @@ struct osc_create_vms_arg { int is_set_dry_run; int dry_run; /* - * The ID of the OMI used to create the VM. You can find the list of - * OMIs by calling the [ReadImages](#readimages) method. - */ - char *image_id; - /* - * The name of the keypair. - */ - char *keypair_name; - /* - * The maximum number of VMs you want to create. If all the VMs cannot - * be created, the largest possible number of VMs above MinVmsCount is - * created. - */ - int is_set_max_vms_count; - long long int max_vms_count; - /* - * The minimum number of VMs you want to create. If this number of VMs - * cannot be created, no VMs are created. - */ - int is_set_min_vms_count; - long long int min_vms_count; - /* - * (dedicated tenancy only) If true, nested virtualization is enabled. - * If false, it is disabled. + * One or more filters. + * --Filters.Keys: array string + * The keys of the tags that are assigned to the resources. You can + * use + * this filter alongside the `Values` filter. In that case, you + * filter the + * resources corresponding to each tag, regardless of the other + * filter. + * --Filters.ResourceIds: array string + * The IDs of the resources with which the tags are associated. + * --Filters.ResourceTypes: array string + * The resource type (`vm` \\| `image` \\| `volume` \\| `snapshot` + * \\| + * `public-ip` \\| `security-group` \\| `route-table` \\| `nic` \\| + * `net` + * \\| `subnet` \\| `net-peering` \\| `net-access-point` \\| + * `nat-service` + * \\| `internet-service` \\| `client-gateway` \\| `virtual-gateway` + * \\| + * `vpn-connection` \\| `dhcp-options` \\| `task`). + * --Filters.Values: array string + * The values of the tags that are assigned to the resources. You + * can use + * this filter alongside the `TagKeys` filter. In that case, you + * filter the + * resources corresponding to each tag, regardless of the other + * filter. */ - int is_set_nested_virtualization; - int nested_virtualization; + char *filters_str; + int is_set_filters; + struct filters_tag filters; /* - * One or more NICs. If you specify this parameter, you must not specify - * the `SubnetId` and `SubregionName` parameters. You also must define - * one NIC as the primary network interface of the VM with `0` as its - * device number. - * Information about the network interface card (NIC) when creating a - * virtual machine (VM). - * --Nics.INDEX.DeleteOnVmDeletion: bool - * If true, the NIC is deleted when the VM is terminated. You can - * specify - * this parameter only for a new NIC. To modify this value for an - * existing - * NIC, see [UpdateNic](#updatenic). - * --Nics.INDEX.Description: string - * The description of the NIC, if you are creating a NIC when - * creating the - * VM. - * --Nics.INDEX.DeviceNumber: long long int - * The index of the VM device for the NIC attachment (between `0` - * and `7`, - * both included). This parameter is required if you create a NIC - * when - * creating the VM. - * --Nics.INDEX.NicId: string - * The ID of the NIC, if you are attaching an existing NIC when - * creating a - * VM. - * --Nics.INDEX.PrivateIps: array ref PrivateIpLight - * One or more private IPs to assign to the NIC, if you create a NIC - * when - * creating a VM. Only one private IP can be the primary private IP. - * Information about the private IP. - * --Nics.INDEX.PrivateIps.INDEX.IsPrimary: bool - * If true, the IP is the primary private IP of the NIC. - * --Nics.INDEX.PrivateIps.INDEX.PrivateIp: string - * The private IP of the NIC. - * --Nics.INDEX.SecondaryPrivateIpCount: long long int - * The number of secondary private IPs, if you create a NIC when - * creating a - * VM. This parameter cannot be specified if you specified more than - * one - * private IP in the `PrivateIps` parameter. - * --Nics.INDEX.SecurityGroupIds: array string - * One or more IDs of security groups for the NIC, if you create a - * NIC when - * creating a VM. - * --Nics.INDEX.SubnetId: string - * The ID of the Subnet for the NIC, if you create a NIC when - * creating a - * VM. This parameter is required if you create a NIC when creating - * the VM. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *nics_str; - int nb_nics; - struct nic_for_vm_creation *nics; + char *next_page_token; /* - * The performance of the VM (`medium` \\| `high` \\| `highest`). By - * default, `high`. This parameter is ignored if you specify a - * performance flag directly in the `VmType` parameter. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *performance; + int is_set_results_per_page; + long long int results_per_page; +}; + +struct osc_read_unit_price_arg { + /* Required: Operation Service Type + */ /* - * Information about the placement of the VM. - * --Placement.SubregionName: string - * The name of the Subregion. If you specify this parameter, you - * must not - * specify the `Nics` parameter. - * --Placement.Tenancy: string - * The tenancy of the VM (`default`, `dedicated`, or a dedicated - * group ID). + * The operation associated with the catalog entry (for example, + * `RunInstances-OD` or `CreateVolume`). */ - char *placement_str; - int is_set_placement; - struct placement placement; + char *operation; /* - * One or more private IPs of the VM. + * The service associated with the catalog entry (for example, + * `TinaOS-FCU` or `TinaOS-OOS`). */ - char *private_ips_str; - char **private_ips; + char *service; /* - * One or more IDs of security group for the VMs. + * The type associated with the catalog entry (for example, + * `BSU:VolumeIOPS:io1` or `BoxUsage:tinav6.c6r16p3`). */ - char *security_group_ids_str; - char **security_group_ids; + char *type; +}; + +struct osc_read_user_group_policies_arg { + /* Required: UserGroupName + */ /* - * One or more names of security groups for the VMs. + * If true, checks whether you have the required permissions to perform + * the action. */ - char *security_groups_str; - char **security_groups; + int is_set_dry_run; + int dry_run; /* - * The ID of the Subnet in which you want to create the VM. If you - * specify this parameter, you must not specify the `Nics` parameter. + * The item starting the list of policies requested. */ - char *subnet_id; + int is_set_first_item; + long long int first_item; /* - * Data or script used to add a specific configuration to the VM. It - * must be Base64-encoded and is limited to 500 kibibytes (KiB). For - * more information about user data, see [Configuring a VM with User - * Data and OUTSCALE - * Tags](https://docs.outscale.com/en/userguide/Configuring-a-VM-with-Use - * r-Data-and-OUTSCALE-Tags.html). + * The maximum number of items that can be returned in a single response + * (by default, `100`). */ - char *user_data; + int is_set_results_per_page; + long long int results_per_page; /* - * The VM behavior when you stop it. By default or if set to `stop`, the - * VM stops. If set to `restart`, the VM stops then automatically - * restarts. If set to `terminate`, the VM stops and is terminated. + * The name of the group. */ - char *vm_initiated_shutdown_behavior; + char *user_group_name; /* - * The type of VM. You can specify a TINA type (in the `tinavW.cXrYpZ` - * or `tinavW.cXrY` format), or an AWS type (for example, `t2.small`, - * which is the default value).
\nIf you specify an AWS type, it is - * converted in the background to its corresponding TINA type, but the - * AWS type is still returned. If the specified or converted TINA type - * includes a performance flag, this performance flag is applied - * regardless of the value you may have provided in the `Performance` - * parameter. For more information, see [VM - * Types](https://docs.outscale.com/en/userguide/VM-Types.html). + * The path to the group. If not specified, it is set to a slash (`/`). */ - char *vm_type; + char *user_group_path; }; -struct osc_create_vm_template_arg { - /* Required: cpu_cores, cpu_generation, image_id, ram, vm_template_name */ +struct osc_read_user_group_policy_arg { + /* Required: PolicyName UserGroupName + */ /* - * The number of vCores to use for each VM. + * If true, checks whether you have the required permissions to perform + * the action. */ - int is_set_cpu_cores; - long long int cpu_cores; + int is_set_dry_run; + int dry_run; /* - * The processor generation to use for each VM (for example, `v4`). + * The name of the policy. */ - char *cpu_generation; + char *policy_name; /* - * The performance of the VMs (`medium` \\| `high` \\| `highest`). + * The name of the group. */ - char *cpu_performance; + char *user_group_name; /* - * A description for the VM template. + * The path to the group. If not specified, it is set to a slash (`/`). */ - char *description; + char *user_group_path; +}; + +struct osc_read_user_group_arg { + /* Required: UserGroupName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -12724,42 +12356,37 @@ struct osc_create_vm_template_arg { int is_set_dry_run; int dry_run; /* - * The ID of the OMI to use for each VM. You can find a list of OMIs by - * calling the [ReadImages](#readimages) method. + * The path to the group. If not specified, it is set to a slash (`/`). */ - char *image_id; + char *path; /* - * The name of the keypair to use for each VM. + * The name of the group. */ - char *keypair_name; + char *user_group_name; +}; + +struct osc_read_user_groups_per_user_arg { + /* Required: UserName + */ /* - * The amount of RAM to use for each VM. + * If true, checks whether you have the required permissions to perform + * the action. */ - int is_set_ram; - long long int ram; + int is_set_dry_run; + int dry_run; /* - * One or more tags to add to the VM template. - * Information about the tag. - * --Tags.INDEX.Key: string - * The key of the tag, with a minimum of 1 character. - * --Tags.INDEX.Value: string - * The value of the tag, between 0 and 255 characters. + * The name of the user. */ - char *tags_str; - int nb_tags; - struct resource_tag *tags; + char *user_name; /* - * The name of the VM template. + * The path to the user (by default, `/`). */ - char *vm_template_name; + char *user_path; }; -struct osc_create_vm_group_arg { - /* Required: security_group_ids, subnet_id, vm_group_name, vm_template_id, vm_count */ - /* - * A description for the VM group. - */ - char *description; +struct osc_read_user_groups_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -12767,84 +12394,63 @@ struct osc_create_vm_group_arg { int is_set_dry_run; int dry_run; /* - * The positioning strategy of VMs on hypervisors. By default, or if set - * to `no-strategy` our orchestrator determines the most adequate - * position for your VMs. If set to `attract`, your VMs are deployed on - * the same hypervisor, which improves network performance. If set to - * `repulse`, your VMs are deployed on a different hypervisor, which - * improves fault tolerance. - */ - char *positioning_strategy; - /* - * One or more IDs of security groups for the VM group. - */ - char *security_group_ids_str; - char **security_group_ids; - /* - * The ID of the Subnet in which you want to create the VM group. - */ - char *subnet_id; - /* - * One or more tags to add to the VM group. - * Information about the tag. - * --Tags.INDEX.Key: string - * The key of the tag, with a minimum of 1 character. - * --Tags.INDEX.Value: string - * The value of the tag, between 0 and 255 characters. - */ - char *tags_str; - int nb_tags; - struct resource_tag *tags; - /* - * The number of VMs deployed in the VM group. + * One or more filters. + * --Filters.PathPrefix: string + * The path prefix of the groups. If not specified, it is set to a + * slash + * (`/`). + * --Filters.UserGroupIds: array string + * The IDs of the user groups. */ - int is_set_vm_count; - long long int vm_count; + char *filters_str; + int is_set_filters; + struct filters_user_group filters; /* - * The name of the VM group. + * The item starting the list of groups requested. */ - char *vm_group_name; + int is_set_first_item; + long long int first_item; /* - * The ID of the VM template used to launch VMs in the VM group. + * The maximum number of items that can be returned in a single response + * (by default, `100`). */ - char *vm_template_id; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_create_virtual_gateway_arg { - /* Required: connection_type */ - /* - * The type of VPN connection supported by the virtual gateway (always - * `ipsec.1`). - */ - char *connection_type; +struct osc_read_users_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; -}; - -struct osc_create_user_group_arg { - /* Required: user_group_name */ /* - * If true, checks whether you have the required permissions to perform - * the action. + * One or more filters. + * --Filters.UserIds: array string + * The IDs of the users. */ - int is_set_dry_run; - int dry_run; + char *filters_str; + int is_set_filters; + struct filters_users filters; /* - * The path to the group. If not specified, it is set to a slash (`/`). + * The item starting the list of users requested. */ - char *path; + int is_set_first_item; + long long int first_item; /* - * The name of the group. + * The maximum number of items that can be returned in a single response + * (by default, `100`). */ - char *user_group_name; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_create_user_arg { - /* Required: user_name */ +struct osc_read_virtual_gateways_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -12852,27 +12458,50 @@ struct osc_create_user_arg { int is_set_dry_run; int dry_run; /* - * The path to the EIM user you want to create (by default, `/`). This - * path name must begin and end with a slash (`/`), and contain between - * 1 and 512 alphanumeric characters and/or slashes (`/`), or - * underscores (`_`). + * One or more filters. + * --Filters.ConnectionTypes: array string + * The types of the virtual gateways (always `ipsec.1`). + * --Filters.LinkNetIds: array string + * The IDs of the Nets the virtual gateways are attached to. + * --Filters.LinkStates: array string + * The current states of the attachments between the virtual + * gateways and + * the Nets (`attaching` \\| `attached` \\| `detaching` \\| + * `detached`). + * --Filters.States: array string + * The states of the virtual gateways (`pending` \\| `available` \\| + * `deleting` \\| `deleted`). + * --Filters.TagKeys: array string + * The keys of the tags associated with the virtual gateways. + * --Filters.TagValues: array string + * The values of the tags associated with the virtual gateways. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the virtual + * gateways, in the following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * --Filters.VirtualGatewayIds: array string + * The IDs of the virtual gateways. */ - char *path; + char *filters_str; + int is_set_filters; + struct filters_virtual_gateway filters; /* - * The email address of the EIM user. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *user_email; + char *next_page_token; /* - * The name of the EIM user. This user name must contain between 1 and - * 64 alphanumeric characters and/or pluses (`+`), equals (`=`), commas - * (`,`), periods (`.`), at signs (`@`), dashes (`-`), or underscores - * (`_`). + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *user_name; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_create_tags_arg { - /* Required: resource_ids, tags */ +struct osc_read_vm_groups_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -12880,25 +12509,40 @@ struct osc_create_tags_arg { int is_set_dry_run; int dry_run; /* - * One or more resource IDs. - */ - char *resource_ids_str; - char **resource_ids; - /* - * One or more tags to add to the specified resources. - * Information about the tag. - * --Tags.INDEX.Key: string - * The key of the tag, with a minimum of 1 character. - * --Tags.INDEX.Value: string - * The value of the tag, between 0 and 255 characters. + * One or more filters. + * --Filters.Descriptions: array string + * The descriptions of the VM groups. + * --Filters.SecurityGroupIds: array string + * The IDs of the security groups. + * --Filters.SubnetIds: array string + * The IDs of the Subnets. + * --Filters.TagKeys: array string + * The keys of the tags associated with the VM groups. + * --Filters.TagValues: array string + * The values of the tags associated with the VM groups. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the VMs, in + * the + * following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * --Filters.VmCounts: array integer + * The number of VMs in the VM group. + * --Filters.VmGroupIds: array string + * The IDs of the VM groups. + * --Filters.VmGroupNames: array string + * The names of the VM groups. + * --Filters.VmTemplateIds: array string + * The IDs of the VM templates. */ - char *tags_str; - int nb_tags; - struct resource_tag *tags; + char *filters_str; + int is_set_filters; + struct filters_vm_group filters; }; -struct osc_create_subnet_arg { - /* Required: ip_range, net_id */ +struct osc_read_vm_templates_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -12906,27 +12550,44 @@ struct osc_create_subnet_arg { int is_set_dry_run; int dry_run; /* - * The IP range in the Subnet, in CIDR notation (for example, - * `10.0.0.0/16`).
\nThe IP range of the Subnet can be either the - * same as the Net one if you create only a single Subnet in this Net, - * or a subset of the Net one. In case of several Subnets in a Net, - * their IP ranges must not overlap. The smallest Subnet you can create - * uses a /29 netmask (eight IPs). For more information, see [About - * Nets](https://docs.outscale.com/en/userguide/About-Nets.html). - */ - char *ip_range; - /* - * The ID of the Net for which you want to create a Subnet. - */ - char *net_id; - /* - * The name of the Subregion in which you want to create the Subnet. + * One or more filters. + * --Filters.CpuCores: array integer + * The number of vCores. + * --Filters.CpuGenerations: array string + * The processor generations (for example, `v4`). + * --Filters.CpuPerformances: array string + * The performances of the VMs. + * --Filters.Descriptions: array string + * The descriptions of the VM templates. + * --Filters.ImageIds: array string + * The IDs of the OMIs. + * --Filters.KeypairNames: array string + * The names of the keypairs. + * --Filters.Rams: array integer + * The amount of RAM. + * --Filters.TagKeys: array string + * The keys of the tags associated with the VM templates. + * --Filters.TagValues: array string + * The values of the tags associated with the VM templates. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the VM + * templates, + * in the following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * --Filters.VmTemplateIds: array string + * The IDs of the VM templates. + * --Filters.VmTemplateNames: array string + * The names of the VM templates. */ - char *subregion_name; + char *filters_str; + int is_set_filters; + struct filters_vm_template filters; }; -struct osc_create_snapshot_export_task_arg { - /* Required: osu_export, snapshot_id */ +struct osc_read_vm_types_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -12934,254 +12595,53 @@ struct osc_create_snapshot_export_task_arg { int is_set_dry_run; int dry_run; /* - * Information about the OOS export task to create. - * --OsuExport.DiskImageFormat: string - * The format of the export disk (`qcow2` \\| `raw`). - * --OsuExport.OsuApiKey: ref OsuApiKey - * Information about the OOS API key. - * --OsuExport.OsuApiKey.ApiKeyId: string - * The API key of the OOS account that enables you to access the - * bucket. - * --OsuExport.OsuApiKey.SecretKey: string - * The secret key of the OOS account that enables you to access - * the bucket. - * --OsuExport.OsuBucket: string - * The name of the OOS bucket where you want to export the object. - * --OsuExport.OsuManifestUrl: string - * The URL of the manifest file. - * --OsuExport.OsuPrefix: string - * The prefix for the key of the OOS object. - */ - char *osu_export_str; - int is_set_osu_export; - struct osu_export_to_create osu_export; - /* - * The ID of the snapshot to export. - */ - char *snapshot_id; -}; - -struct osc_create_snapshot_arg { - /* Required:none */ - /* - * A description for the snapshot. - */ - char *description; - /* - * If true, checks whether you have the required permissions to perform - * the action. - */ - int is_set_dry_run; - int dry_run; - /* - * **(when importing from a bucket)** The pre-signed URL of the snapshot - * you want to import. For more information, see [Creating a Pre-signed - * URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL. - * html). - */ - char *file_location; - /* - * **(when importing from a bucket)** The size of the snapshot you want - * to create in your account, in bytes. This size must be greater than - * or equal to the size of the original, uncompressed snapshot. - */ - int is_set_snapshot_size; - long long int snapshot_size; - /* - * **(when copying a snapshot)** The name of the source Region, which - * must be the same as the Region of your account. - */ - char *source_region_name; - /* - * **(when copying a snapshot)** The ID of the snapshot you want to copy. - */ - char *source_snapshot_id; - /* - * **(when creating from a volume)** The ID of the volume you want to - * create a snapshot of. - */ - char *volume_id; -}; - -struct osc_create_server_certificate_arg { - /* Required: body, private_key, name */ - /* - * The PEM-encoded X509 certificate.
With OSC CLI, use the - * following syntax to make sure your certificate file is correctly - * parsed: `--Body="$(cat FILENAME)"`. - */ - char *body; - /* - * The PEM-encoded intermediate certification authorities.
With OSC - * CLI, use the following syntax to make sure your certificate chain - * file is correctly parsed: `--Chain="$(cat FILENAME)"`. - */ - char *chain; - /* - * If true, checks whether you have the required permissions to perform - * the action. - */ - int is_set_dry_run; - int dry_run; - /* - * A unique name for the certificate. Constraints: 1-128 alphanumeric - * characters, pluses (`+`), equals (`=`), commas (`,`), periods (`.`), - * at signs (`@`), minuses (`-`), or underscores (`_`). - */ - char *name; - /* - * The path to the server certificate, set to a slash (`/`) if not - * specified. - */ - char *path; - /* - * The PEM-encoded private key matching the certificate.
With OSC - * CLI, use the following syntax to make sure your key file is correctly - * parsed: `--PrivateKey="$(cat FILENAME)"`. - */ - char *private_key; -}; - -struct osc_create_security_group_rule_arg { - /* Required: security_group_id, flow */ - /* - * If true, checks whether you have the required permissions to perform - * the action. - */ - int is_set_dry_run; - int dry_run; - /* - * The direction of the flow: `Inbound` or `Outbound`. You can specify - * `Outbound` for Nets only. - */ - char *flow; - /* - * The beginning of the port range for the TCP and UDP protocols, or an - * ICMP type number. If you specify this parameter, you cannot specify - * the `Rules` parameter and its subparameters. - */ - int is_set_from_port_range; - long long int from_port_range; - /* - * The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all - * protocols). By default, `-1`. In a Net, this can also be an IP - * protocol number. For more information, see the [IANA.org - * website](https://www.iana.org/assignments/protocol-numbers/protocol-nu - * mbers.xhtml). If you specify this parameter, you cannot specify the - * `Rules` parameter and its subparameters. - */ - char *ip_protocol; - /* - * The IP range for the security group rule, in CIDR notation (for - * example, 10.0.0.0/16). If you specify this parameter, you cannot - * specify the `Rules` parameter and its subparameters. - */ - char *ip_range; - /* - * Information about the security group rule to create. If you specify - * this parent parameter and its subparameters, you cannot specify the - * following parent parameters: `FromPortRange`, `IpProtocol`, - * `IpRange`, and `ToPortRange`. - * Information about the security group rule. - * --Rules.INDEX.FromPortRange: long long int - * The beginning of the port range for the TCP and UDP protocols, or - * an - * ICMP type number. - * --Rules.INDEX.IpProtocol: string - * The IP protocol name (`tcp`, `udp`, `icmp`, or `-1` for all - * protocols). - * By default, `-1`. In a Net, this can also be an IP protocol - * number. For - * more information, see the [IANA.org - * - * website](https://www.iana.org/assignments/protocol-numbers/protocol-nu - * mber - * s.xhtml). - * --Rules.INDEX.IpRanges: array string - * One or more IP ranges for the security group rules, in CIDR - * notation - * (for example, `10.0.0.0/16`). - * --Rules.INDEX.SecurityGroupsMembers: array ref SecurityGroupsMember - * Information about one or more source or destination security - * groups. - * Information about a source or destination security group. - * --Rules.INDEX.SecurityGroupsMembers.INDEX.AccountId: string - * The account ID that owns the source or destination security - * group. - * --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupId: - * string - * The ID of a source or destination security group that you - * want to link - * to the security group of the rule. - * --Rules.INDEX.SecurityGroupsMembers.INDEX.SecurityGroupName: - * string - * (Public Cloud only) The name of a source or destination - * security group - * that you want to link to the security group of the rule. - * --Rules.INDEX.ServiceIds: array string - * One or more service IDs to allow traffic from a Net to access the - * corresponding OUTSCALE services. For more information, see - * [ReadNetAccessPointServices](#readnetaccesspointservices). - * --Rules.INDEX.ToPortRange: long long int - * The end of the port range for the TCP and UDP protocols, or an - * ICMP code - * number. - */ - char *rules_str; - int nb_rules; - struct security_group_rule *rules; - /* - * The account ID that owns the source or destination security group - * specified in the `SecurityGroupNameToLink` parameter. - */ - char *security_group_account_id_to_link; - /* - * The ID of the security group for which you want to create a rule. + * One or more filters. + * --Filters.BsuOptimized: bool + * This parameter is not available. It is present in our API for the + * sake + * of historical compatibility with AWS. + * --Filters.EphemeralsTypes: array string + * The types of ephemeral storage disk. + * --Filters.Eths: array integer + * The number of Ethernet interfaces available. + * --Filters.Gpus: array integer + * The number of GPUs available. + * --Filters.MemorySizes: array double + * The amounts of memory, in gibibytes (GiB). + * --Filters.VcoreCounts: array integer + * The numbers of vCores. + * --Filters.VmTypeNames: array string + * The names of the VM types. For more information, see [VM + * Types](https://docs.outscale.com/en/userguide/VM-Types.html). + * --Filters.VolumeCounts: array integer + * The maximum number of ephemeral storage disks. + * --Filters.VolumeSizes: array integer + * The size of one ephemeral storage disk, in gibibytes (GiB). */ - char *security_group_id; + char *filters_str; + int is_set_filters; + struct filters_vm_type filters; /* - * The ID of a source or destination security group that you want to - * link to the security group of the rule. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *security_group_name_to_link; + char *next_page_token; /* - * The end of the port range for the TCP and UDP protocols, or an ICMP - * code number. If you specify this parameter, you cannot specify the - * `Rules` parameter and its subparameters. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - int is_set_to_port_range; - long long int to_port_range; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_create_security_group_arg { - /* Required: description, security_group_name */ - /* - * A description for the security group.
\nThis description can - * contain between 1 and 255 characters. Allowed characters are `a-z`, - * `A-Z`, `0-9`, accented letters, spaces, and `_.-:/()#,@[]+=&;{}!$*`. - */ - char *description; - /* - * If true, checks whether you have the required permissions to perform - * the action. - */ - int is_set_dry_run; - int dry_run; - /* - * The ID of the Net for the security group. - */ - char *net_id; +struct osc_read_vms_health_arg { + /* Required: LoadBalancerName + */ /* - * The name of the security group.
\nThis name must not start with - * `sg-`.
\nThis name must be unique and contain between 1 and 255 - * characters. Allowed characters are `a-z`, `A-Z`, `0-9`, spaces, and - * `_.-:/()#,@[]+=&;{}!$*`. + * One or more IDs of backend VMs. */ - char *security_group_name; -}; - -struct osc_create_route_table_arg { - /* Required: net_id */ + char *backend_vm_ids_str; + char **backend_vm_ids; /* * If true, checks whether you have the required permissions to perform * the action. @@ -13189,18 +12649,14 @@ struct osc_create_route_table_arg { int is_set_dry_run; int dry_run; /* - * The ID of the Net for which you want to create a route table. + * The name of the load balancer. */ - char *net_id; + char *load_balancer_name; }; -struct osc_create_route_arg { - /* Required: destination_ip_range, route_table_id */ - /* - * The IP range used for the destination match, in CIDR notation (for - * example, `10.0.0.0/24`). - */ - char *destination_ip_range; +struct osc_read_vms_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -13208,100 +12664,319 @@ struct osc_create_route_arg { int is_set_dry_run; int dry_run; /* - * The ID of an Internet service or virtual gateway attached to your Net. - */ - char *gateway_id; - /* - * The ID of a NAT service. - */ - char *nat_service_id; - /* - * The ID of a Net peering. - */ - char *net_peering_id; - /* - * The ID of a NIC. + * One or more filters. + * --Filters.Architectures: array string + * The architectures of the VMs (`i386` \\| `x86_64`). + * --Filters.BlockDeviceMappingDeleteOnVmDeletion: bool + * Whether the BSU volumes are deleted when terminating the VMs. + * --Filters.BlockDeviceMappingDeviceNames: array string + * The device names for the BSU volumes (in the format `/dev/sdX`, + * `/dev/sdXX`, `/dev/xvdX`, or `/dev/xvdXX`). + * --Filters.BlockDeviceMappingLinkDates: array string + * The link dates for the BSU volumes mapped to the VMs (for + * example, + * `2016-01-23T18:45:30.000Z`). + * --Filters.BlockDeviceMappingStates: array string + * The states for the BSU volumes (`attaching` \\| `attached` \\| + * `detaching` \\| `detached`). + * --Filters.BlockDeviceMappingVolumeIds: array string + * The volume IDs of the BSU volumes. + * --Filters.ClientTokens: array string + * The idempotency tokens provided when launching the VMs. + * --Filters.CreationDates: array string + * The dates when the VMs were launched. + * --Filters.ImageIds: array string + * The IDs of the OMIs used to launch the VMs. + * --Filters.IsSourceDestChecked: bool + * Whether the source/destination checking is enabled (true) or + * disabled + * (false). + * --Filters.KeypairNames: array string + * The names of the keypairs used when launching the VMs. + * --Filters.LaunchNumbers: array integer + * The numbers for the VMs when launching a group of several VMs + * (for + * example, `0`, `1`, `2`, and so on). + * --Filters.Lifecycles: array string + * Whether the VMs are Spot Instances (spot). + * --Filters.NetIds: array string + * The IDs of the Nets in which the VMs are running. + * --Filters.NicAccountIds: array string + * The IDs of the NICs. + * --Filters.NicDescriptions: array string + * The descriptions of the NICs. + * --Filters.NicIsSourceDestChecked: bool + * Whether the source/destination checking is enabled (true) or + * disabled + * (false). + * --Filters.NicLinkNicDeleteOnVmDeletion: bool + * Whether the NICs are deleted when the VMs they are attached to + * are + * deleted. + * --Filters.NicLinkNicDeviceNumbers: array integer + * The device numbers the NICs are attached to. + * --Filters.NicLinkNicLinkNicDates: array string + * The dates and times (UTC) when the NICs were attached to the VMs. + * --Filters.NicLinkNicLinkNicIds: array string + * The IDs of the NIC attachments. + * --Filters.NicLinkNicStates: array string + * The states of the attachments. + * --Filters.NicLinkNicVmAccountIds: array string + * The account IDs of the owners of the VMs the NICs are attached to. + * --Filters.NicLinkNicVmIds: array string + * The IDs of the VMs the NICs are attached to. + * --Filters.NicLinkPublicIpAccountIds: array string + * The account IDs of the owners of the public IPs associated with + * the + * NICs. + * --Filters.NicLinkPublicIpLinkPublicIpIds: array string + * The association IDs returned when the public IPs were associated + * with + * the NICs. + * --Filters.NicLinkPublicIpPublicIpIds: array string + * The allocation IDs returned when the public IPs were allocated to + * their + * accounts. + * --Filters.NicLinkPublicIpPublicIps: array string + * The public IPs associated with the NICs. + * --Filters.NicMacAddresses: array string + * The Media Access Control (MAC) addresses of the NICs. + * --Filters.NicNetIds: array string + * The IDs of the Nets where the NICs are located. + * --Filters.NicNicIds: array string + * The IDs of the NICs. + * --Filters.NicPrivateIpsLinkPublicIpAccountIds: array string + * The account IDs of the owner of the public IPs associated with + * the + * private IPs. + * --Filters.NicPrivateIpsLinkPublicIpIds: array string + * The public IPs associated with the private IPs. + * --Filters.NicPrivateIpsPrimaryIp: bool + * Whether the private IPs are the primary IPs associated with the + * NICs. + * --Filters.NicPrivateIpsPrivateIps: array string + * The private IPs of the NICs. + * --Filters.NicSecurityGroupIds: array string + * The IDs of the security groups associated with the NICs. + * --Filters.NicSecurityGroupNames: array string + * The names of the security groups associated with the NICs. + * --Filters.NicStates: array string + * The states of the NICs (`available` \\| `in-use`). + * --Filters.NicSubnetIds: array string + * The IDs of the Subnets for the NICs. + * --Filters.NicSubregionNames: array string + * The Subregions where the NICs are located. + * --Filters.Platforms: array string + * The platforms. Use windows if you have Windows VMs. Otherwise, + * leave + * this filter blank. + * --Filters.PrivateIps: array string + * The private IPs of the VMs. + * --Filters.ProductCodes: array string + * The product codes associated with the OMI used to create the VMs. + * --Filters.PublicIps: array string + * The public IPs of the VMs. + * --Filters.ReservationIds: array string + * The IDs of the reservation of the VMs, created every time you + * launch + * VMs. These reservation IDs can be associated with several VMs + * when you + * lauch a group of VMs using the same launch request. + * --Filters.RootDeviceNames: array string + * The names of the root devices for the VMs (for example, + * `/dev/sda1`) + * --Filters.RootDeviceTypes: array string + * The root devices types used by the VMs (always `ebs`) + * --Filters.SecurityGroupIds: array string + * The IDs of the security groups for the VMs (only in the public + * Cloud). + * --Filters.SecurityGroupNames: array string + * The names of the security groups for the VMs (only in the public + * Cloud). + * --Filters.StateReasonCodes: array integer + * The reason codes for the state changes. + * --Filters.StateReasonMessages: array string + * The messages describing the state changes. + * --Filters.StateReasons: array string + * The reasons explaining the current states of the VMs. This filter + * is + * like the `StateReasonCodes` one. + * --Filters.SubnetIds: array string + * The IDs of the Subnets for the VMs. + * --Filters.SubregionNames: array string + * The names of the Subregions of the VMs. + * --Filters.TagKeys: array string + * The keys of the tags associated with the VMs. + * --Filters.TagValues: array string + * The values of the tags associated with the VMs. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the VMs, in + * the + * following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * --Filters.Tenancies: array string + * The tenancies of the VMs (`dedicated` \\| `default` \\| `host`). + * --Filters.VmIds: array string + * One or more IDs of VMs. + * --Filters.VmSecurityGroupIds: array string + * The IDs of the security groups for the VMs. + * --Filters.VmSecurityGroupNames: array string + * The names of the security group for the VMs. + * --Filters.VmStateCodes: array integer + * The state codes of the VMs: `-1` (quarantine), `0` (pending), + * `16` + * (running), `32` (shutting-down), `48` (terminated), `64` + * (stopping), and + * `80` (stopped). + * --Filters.VmStateNames: array string + * The state names of the VMs (`pending` \\| `running` \\| + * `stopping` \\| + * `stopped` \\| `shutting-down` \\| `terminated` \\| `quarantine`). + * --Filters.VmTypes: array string + * The VM types (for example, t2.micro). For more information, see + * [VM + * Types](https://docs.outscale.com/en/userguide/VM-Types.html). */ - char *nic_id; + char *filters_str; + int is_set_filters; + struct filters_vm filters; /* - * The ID of the route table for which you want to create a route. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *route_table_id; + char *next_page_token; /* - * The ID of a NAT VM in your Net (attached to exactly one NIC). + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *vm_id; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_create_public_ip_arg { - /* Required:none */ +struct osc_read_vms_state_arg { + /* Required: null + */ + /* + * If true, includes the status of all VMs. By default or if set to + * false, only includes the status of running VMs. + */ + int is_set_all_vms; + int all_vms; /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; -}; - -struct osc_create_product_type_arg { - /* Required: description */ /* - * The description of the product type. + * One or more filters. + * --Filters.MaintenanceEventCodes: array string + * The code for the scheduled event (`system-reboot` \\| + * `system-maintenance`). + * --Filters.MaintenanceEventDescriptions: array string + * The description of the scheduled event. + * --Filters.MaintenanceEventsNotAfter: array string + * The latest date and time (UTC) the event can end. + * --Filters.MaintenanceEventsNotBefore: array string + * The earliest date and time (UTC) the event can start. + * --Filters.SubregionNames: array string + * The names of the Subregions of the VMs. + * --Filters.VmIds: array string + * One or more IDs of VMs. + * --Filters.VmStates: array string + * The states of the VMs (`pending` \\| `running` \\| `stopping` \\| + * `stopped` \\| `shutting-down` \\| `terminated` \\| `quarantine`). */ - char *description; + char *filters_str; + int is_set_filters; + struct filters_vms_state filters; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The token to request the next page of results. Each token refers to a + * specific page. */ - int is_set_dry_run; - int dry_run; + char *next_page_token; /* - * The vendor of the product type. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *vendor; + int is_set_results_per_page; + long long int results_per_page; }; -struct osc_create_policy_version_arg { - /* Required: document, policy_orn */ +struct osc_read_volumes_arg { + /* Required: null + */ /* - * The policy document, corresponding to a JSON string that contains the - * policy. For more information, see [EIM Reference - * Information](https://docs.outscale.com/en/userguide/EIM-Reference-Info - * rmation.html) and [EIM Policy - * Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator - * .html). + * If true, checks whether you have the required permissions to perform + * the action. */ - char *document; + int is_set_dry_run; + int dry_run; /* - * The OUTSCALE Resource Name (ORN) of the policy. For more information, - * see [Resource - * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie - * rs.html). - */ - char *policy_orn; - /* - * If set to true, the new policy version is set as the default version - * and becomes the operative one. + * One or more filters. + * --Filters.CreationDates: array string + * The dates and times at which the volumes were created, in ISO + * 8601 + * date-time format (for example, `2020-06-30T00:00:00.000Z`). + * --Filters.LinkVolumeDeleteOnVmDeletion: bool + * Whether the volumes are deleted or not when terminating the VMs. + * --Filters.LinkVolumeDeviceNames: array string + * The VM device names. + * --Filters.LinkVolumeLinkDates: array string + * The dates and times at which the volumes were attached, in ISO + * 8601 + * date-time format (for example, `2020-06-30T00:00:00.000Z`). + * --Filters.LinkVolumeLinkStates: array string + * The attachment states of the volumes (`attaching` \\| `detaching` + * \\| + * `attached` \\| `detached`). + * --Filters.LinkVolumeVmIds: array string + * One or more IDs of VMs. + * --Filters.SnapshotIds: array string + * The snapshots from which the volumes were created. + * --Filters.SubregionNames: array string + * The names of the Subregions in which the volumes were created. + * --Filters.TagKeys: array string + * The keys of the tags associated with the volumes. + * --Filters.TagValues: array string + * The values of the tags associated with the volumes. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the + * volumes, in + * the following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * --Filters.VolumeIds: array string + * The IDs of the volumes. + * --Filters.VolumeSizes: array integer + * The sizes of the volumes, in gibibytes (GiB). + * --Filters.VolumeStates: array string + * The states of the volumes (`creating` \\| `available` \\| + * `in-use` \\| + * `updating` \\| `deleting` \\| `error`). + * --Filters.VolumeTypes: array string + * The types of the volumes (`standard` \\| `gp2` \\| `io1`). */ - int is_set_set_as_default; - int set_as_default; -}; - -struct osc_create_policy_arg { - /* Required: document, policy_name */ + char *filters_str; + int is_set_filters; + struct filters_volume filters; /* - * A description for the policy. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *description; + char *next_page_token; /* - * The policy document, corresponding to a JSON string that contains the - * policy. For more information, see [EIM Reference - * Information](https://docs.outscale.com/en/userguide/EIM-Reference-Info - * rmation.html) and [EIM Policy - * Generator](https://docs.outscale.com/en/userguide/EIM-Policy-Generator - * .html). + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *document; + int is_set_results_per_page; + long long int results_per_page; +}; + +struct osc_read_vpn_connections_arg { + /* Required: null + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -13309,21 +12984,62 @@ struct osc_create_policy_arg { int is_set_dry_run; int dry_run; /* - * The path of the policy. + * One or more filters. + * --Filters.BgpAsns: array integer + * The Border Gateway Protocol (BGP) Autonomous System Numbers + * (ASNs) of + * the connections. + * --Filters.ClientGatewayIds: array string + * The IDs of the client gateways. + * --Filters.ConnectionTypes: array string + * The types of the VPN connections (always `ipsec.1`). + * --Filters.RouteDestinationIpRanges: array string + * The destination IP ranges. + * --Filters.States: array string + * The states of the VPN connections (`pending` \\| `available` \\| + * `deleting` \\| `deleted`). + * --Filters.StaticRoutesOnly: bool + * If false, the VPN connection uses dynamic routing with Border + * Gateway + * Protocol (BGP). If true, routing is controlled using static + * routes. For + * more information about how to create and delete static routes, + * see + * [CreateVpnConnectionRoute](#createvpnconnectionroute) and + * [DeleteVpnConnectionRoute](#deletevpnconnectionroute). + * --Filters.TagKeys: array string + * The keys of the tags associated with the VPN connections. + * --Filters.TagValues: array string + * The values of the tags associated with the VPN connections. + * --Filters.Tags: array string + * The key/value combination of the tags associated with the VPN + * connections, in the following format: + * + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. + * --Filters.VirtualGatewayIds: array string + * The IDs of the virtual gateways. + * --Filters.VpnConnectionIds: array string + * The IDs of the VPN connections. */ - char *path; + char *filters_str; + int is_set_filters; + struct filters_vpn_connection filters; /* - * The name of the policy. + * The token to request the next page of results. Each token refers to a + * specific page. */ - char *policy_name; -}; - -struct osc_create_nic_arg { - /* Required: subnet_id */ + char *next_page_token; /* - * A description for the NIC. + * The maximum number of logs returned in a single response (between `1` + * and `1000`, both included). By default, `100`. */ - char *description; + int is_set_results_per_page; + long long int results_per_page; +}; + +struct osc_reboot_vms_arg { + /* Required: VmIds + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -13331,42 +13047,21 @@ struct osc_create_nic_arg { int is_set_dry_run; int dry_run; /* - * The primary private IP for the NIC.
\nThis IP must be within the - * IP range of the Subnet that you specify with the `SubnetId` - * attribute.
\nIf you do not specify this attribute, a random - * private IP is selected within the IP range of the Subnet. - * Information about the private IP. - * --PrivateIps.INDEX.IsPrimary: bool - * If true, the IP is the primary private IP of the NIC. - * --PrivateIps.INDEX.PrivateIp: string - * The private IP of the NIC. - */ - char *private_ips_str; - int nb_private_ips; - struct private_ip_light *private_ips; - /* - * One or more IDs of security groups for the NIC. - */ - char *security_group_ids_str; - char **security_group_ids; - /* - * The ID of the Subnet in which you want to create the NIC. + * One or more IDs of the VMs you want to reboot. */ - char *subnet_id; + char *vm_ids_str; + char **vm_ids; }; -struct osc_create_net_peering_arg { - /* Required: accepter_net_id, source_net_id */ - /* - * The ID of the Net you want to connect with. - */ - char *accepter_net_id; +struct osc_register_vms_in_load_balancer_arg { + /* Required: BackendVmIds LoadBalancerName + */ /* - * The account ID of the owner of the Net you want to connect with. By - * default, the account ID of the owner of the Net from which the - * peering request is sent. + * One or more IDs of backend VMs.
\nSpecifying the same ID several + * times has no effect as each backend VM has equal weight. */ - char *accepter_owner_id; + char *backend_vm_ids_str; + char **backend_vm_ids; /* * If true, checks whether you have the required permissions to perform * the action. @@ -13374,13 +13069,14 @@ struct osc_create_net_peering_arg { int is_set_dry_run; int dry_run; /* - * The ID of the Net you send the peering request from. + * The name of the load balancer. */ - char *source_net_id; + char *load_balancer_name; }; -struct osc_create_net_access_point_arg { - /* Required: service_name, net_id */ +struct osc_reject_net_peering_arg { + /* Required: NetPeeringId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -13388,22 +13084,14 @@ struct osc_create_net_access_point_arg { int is_set_dry_run; int dry_run; /* - * The ID of the Net. - */ - char *net_id; - /* - * One or more IDs of route tables to use for the connection. - */ - char *route_table_ids_str; - char **route_table_ids; - /* - * The name of the service (in the format `com.outscale.region.service`). + * The ID of the Net peering you want to reject. */ - char *service_name; + char *net_peering_id; }; -struct osc_create_net_arg { - /* Required: ip_range */ +struct osc_remove_user_from_user_group_arg { + /* Required: UserGroupName UserName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -13411,26 +13099,26 @@ struct osc_create_net_arg { int is_set_dry_run; int dry_run; /* - * The IP range for the Net, in CIDR notation (for example, - * `10.0.0.0/16`). + * The name of the group you want to remove the user from. */ - char *ip_range; + char *user_group_name; /* - * The tenancy options for the VMs:
\n- `default` if a VM created - * in a Net can be launched with any tenancy.
\n- `dedicated` if it - * can be launched with dedicated tenancy VMs running on single-tenant - * hardware.
\n- `dedicated group ID`: if it can be launched in a - * dedicated group on single-tenant hardware. + * The path to the group. If not specified, it is set to a slash (`/`). */ - char *tenancy; -}; - -struct osc_create_nat_service_arg { - /* Required: public_ip_id, subnet_id */ + char *user_group_path; /* - * A unique identifier which enables you to manage the idempotency. + * The name of the user you want to remove from the group. */ - char *client_token; + char *user_name; + /* + * The path to the user (by default, `/`). + */ + char *user_path; +}; + +struct osc_scale_down_vm_group_arg { + /* Required: VmGroupId VmSubtraction + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -13438,19 +13126,19 @@ struct osc_create_nat_service_arg { int is_set_dry_run; int dry_run; /* - * The allocation ID of the public IP to associate with the NAT - * service.
\nIf the public IP is already associated with another - * resource, you must first disassociate it. + * The ID of the VM group you want to scale down. */ - char *public_ip_id; + char *vm_group_id; /* - * The ID of the Subnet in which you want to create the NAT service. + * The number of VMs you want to delete from the VM group. */ - char *subnet_id; + int is_set_vm_subtraction; + long long int vm_subtraction; }; -struct osc_create_load_balancer_tags_arg { - /* Required: load_balancer_names, tags */ +struct osc_scale_up_vm_group_arg { + /* Required: VmGroupId VmAddition + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -13458,38 +13146,35 @@ struct osc_create_load_balancer_tags_arg { int is_set_dry_run; int dry_run; /* - * One or more load balancer names. + * The number of VMs you want to add to the VM group. */ - char *load_balancer_names_str; - char **load_balancer_names; + int is_set_vm_addition; + long long int vm_addition; /* - * One or more tags to add to the specified load balancers. - * Information about the tag. - * --Tags.INDEX.Key: string - * The key of the tag, with a minimum of 1 character. - * --Tags.INDEX.Value: string - * The value of the tag, between 0 and 255 characters. + * The ID of the VM group you want to scale up. */ - char *tags_str; - int nb_tags; - struct resource_tag *tags; + char *vm_group_id; }; -struct osc_create_load_balancer_policy_arg { - /* Required: policy_type, load_balancer_name, policy_name */ +struct osc_set_default_policy_version_arg { + /* Required: PolicyOrn VersionId + */ /* - * The lifetime of the cookie, in seconds. If not specified, the default - * value of this parameter is `1`, which means that the sticky session - * lasts for the duration of the browser session. + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). */ - int is_set_cookie_expiration_period; - long long int cookie_expiration_period; + char *policy_orn; /* - * The name of the application cookie used for stickiness. This - * parameter is required if you create a stickiness policy based on an - * application-generated cookie. + * The ID of the version. */ - char *cookie_name; + char *version_id; +}; + +struct osc_start_vms_arg { + /* Required: VmIds + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -13497,23 +13182,15 @@ struct osc_create_load_balancer_policy_arg { int is_set_dry_run; int dry_run; /* - * The name of the load balancer for which you want to create a policy. - */ - char *load_balancer_name; - /* - * The unique name of the policy, with a maximum length of 32 - * alphanumeric characters and dashes (`-`). - */ - char *policy_name; - /* - * The type of stickiness policy you want to create: `app` or - * `load_balancer`. + * One or more IDs of VMs. */ - char *policy_type; + char *vm_ids_str; + char **vm_ids; }; -struct osc_create_load_balancer_listeners_arg { - /* Required: listeners, load_balancer_name */ +struct osc_stop_vms_arg { + /* Required: VmIds + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -13521,41 +13198,20 @@ struct osc_create_load_balancer_listeners_arg { int is_set_dry_run; int dry_run; /* - * One or more listeners for the load balancer. - * Information about the listener to create. - * --Listeners.INDEX.BackendPort: long long int - * The port on which the backend VM is listening (between `1` and - * `65535`, - * both included). - * --Listeners.INDEX.BackendProtocol: string - * The protocol for routing traffic to backend VMs (`HTTP` \\| - * `HTTPS` \\| - * `TCP` \\| `SSL`). - * --Listeners.INDEX.LoadBalancerPort: long long int - * The port on which the load balancer is listening (between `1` and - * `65535`, both included). - * --Listeners.INDEX.LoadBalancerProtocol: string - * The routing protocol (`HTTP` \\| `HTTPS` \\| `TCP` \\| `SSL`). - * --Listeners.INDEX.ServerCertificateId: string - * The OUTSCALE Resource Name (ORN) of the server certificate. For - * more - * information, see [Resource Identifiers > OUTSCALE Resource Names - * - * (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.ht - * ml#_ - * outscale_resource_names_orns). + * Forces the VM to stop. */ - char *listeners_str; - int nb_listeners; - struct listener_for_creation *listeners; + int is_set_force_stop; + int force_stop; /* - * The name of the load balancer for which you want to create listeners. + * One or more IDs of VMs. */ - char *load_balancer_name; + char *vm_ids_str; + char **vm_ids; }; -struct osc_create_load_balancer_arg { - /* Required: listeners, load_balancer_name */ +struct osc_unlink_flexible_gpu_arg { + /* Required: FlexibleGpuId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -13563,87 +13219,58 @@ struct osc_create_load_balancer_arg { int is_set_dry_run; int dry_run; /* - * One or more listeners to create. - * Information about the listener to create. - * --Listeners.INDEX.BackendPort: long long int - * The port on which the backend VM is listening (between `1` and - * `65535`, - * both included). - * --Listeners.INDEX.BackendProtocol: string - * The protocol for routing traffic to backend VMs (`HTTP` \\| - * `HTTPS` \\| - * `TCP` \\| `SSL`). - * --Listeners.INDEX.LoadBalancerPort: long long int - * The port on which the load balancer is listening (between `1` and - * `65535`, both included). - * --Listeners.INDEX.LoadBalancerProtocol: string - * The routing protocol (`HTTP` \\| `HTTPS` \\| `TCP` \\| `SSL`). - * --Listeners.INDEX.ServerCertificateId: string - * The OUTSCALE Resource Name (ORN) of the server certificate. For - * more - * information, see [Resource Identifiers > OUTSCALE Resource Names - * - * (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.ht - * ml#_ - * outscale_resource_names_orns). + * The ID of the fGPU you want to detach from your VM. */ - char *listeners_str; - int nb_listeners; - struct listener_for_creation *listeners; + char *flexible_gpu_id; +}; + +struct osc_unlink_internet_service_arg { + /* Required: InternetServiceId NetId + */ /* - * The unique name of the load balancer, with a maximum length of 32 - * alphanumeric characters and dashes (`-`). This name must not start or - * end with a dash. + * If true, checks whether you have the required permissions to perform + * the action. */ - char *load_balancer_name; + int is_set_dry_run; + int dry_run; /* - * The type of load balancer: `internet-facing` or `internal`. Use this - * parameter only for load balancers in a Net. + * The ID of the Internet service you want to detach. */ - char *load_balancer_type; + char *internet_service_id; /* - * (internet-facing only) The public IP you want to associate with the - * load balancer. If not specified, a public IP owned by 3DS OUTSCALE is - * associated. + * The ID of the Net from which you want to detach the Internet service. */ - char *public_ip; + char *net_id; +}; + +struct osc_unlink_load_balancer_backend_machines_arg { + /* Required: LoadBalancerName + */ /* - * (Net only) One or more IDs of security groups you want to assign to - * the load balancer. If not specified, the default security group of - * the Net is assigned to the load balancer. + * One or more public IPs of backend VMs. */ - char *security_groups_str; - char **security_groups; + char *backend_ips_str; + char **backend_ips; /* - * (Net only) The ID of the Subnet in which you want to create the load - * balancer. Regardless of this Subnet, the load balancer can distribute - * traffic to all Subnets. This parameter is required in a Net. + * One or more IDs of backend VMs. */ - char *subnets_str; - char **subnets; + char *backend_vm_ids_str; + char **backend_vm_ids; /* - * (public Cloud only) The Subregion in which you want to create the - * load balancer. Regardless of this Subregion, the load balancer can - * distribute traffic to all Subregions. This parameter is required in - * the public Cloud. + * If true, checks whether you have the required permissions to perform + * the action. */ - char *subregion_names_str; - char **subregion_names; + int is_set_dry_run; + int dry_run; /* - * One or more tags assigned to the load balancer. - * Information about the tag. - * --Tags.INDEX.Key: string - * The key of the tag, with a minimum of 1 character. - * --Tags.INDEX.Value: string - * The value of the tag, between 0 and 255 characters. + * The name of the load balancer. */ - char *tags_str; - int nb_tags; - struct resource_tag *tags; + char *load_balancer_name; }; -struct osc_create_listener_rule_arg { - /* Required: vm_ids, listener, listener_rule */ +struct osc_unlink_managed_policy_from_user_group_arg { + /* Required: PolicyOrn UserGroupName + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -13651,52 +13278,21 @@ struct osc_create_listener_rule_arg { int is_set_dry_run; int dry_run; /* - * Information about the load balancer. - * --Listener.LoadBalancerName: string - * The name of the load balancer to which the listener is attached. - * --Listener.LoadBalancerPort: long long int - * The port of load balancer on which the load balancer is listening - * (between `1` and `65535` both included). - */ - char *listener_str; - int is_set_listener; - struct load_balancer_light listener; - /* - * Information about the listener rule. - * --ListenerRule.Action: string - * The type of action for the rule (always `forward`). - * --ListenerRule.HostNamePattern: string - * A host-name pattern for the rule, with a maximum length of 128 - * characters. This host-name pattern supports maximum three - * wildcards, and - * must not contain any special characters except `-.?`. - * --ListenerRule.ListenerRuleName: string - * A human-readable name for the listener rule. - * --ListenerRule.PathPattern: string - * A path pattern for the rule, with a maximum length of 128 - * characters. - * This path pattern supports maximum three wildcards, and must not - * contain - * any special characters except `_-.$/~"'@:+?`. - * --ListenerRule.Priority: long long int - * The priority level of the listener rule, between `1` and `19999` - * both - * included. Each rule must have a unique priority level. Otherwise, - * an - * error is returned. + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). */ - char *listener_rule_str; - int is_set_listener_rule; - struct listener_rule_for_creation listener_rule; + char *policy_orn; /* - * The IDs of the backend VMs. + * The name of the group you want to unlink the policy from. */ - char *vm_ids_str; - char **vm_ids; + char *user_group_name; }; -struct osc_create_keypair_arg { - /* Required: keypair_name */ +struct osc_unlink_nic_arg { + /* Required: LinkNicId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -13704,30 +13300,36 @@ struct osc_create_keypair_arg { int is_set_dry_run; int dry_run; /* - * A unique name for the keypair, with a maximum length of 255 [ASCII - * printable - * characters](https://en.wikipedia.org/wiki/ASCII#Printable_characters). - */ - char *keypair_name; - /* - * The public key to import in your account, if you are importing an - * existing keypair. This value must be Base64-encoded. + * The ID of the attachment operation. */ - char *public_key; + char *link_nic_id; }; -struct osc_create_internet_service_arg { - /* Required:none */ +struct osc_unlink_policy_arg { + /* Required: PolicyOrn UserName + */ /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; + /* + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). + */ + char *policy_orn; + /* + * The name of the user you want to detach the policy from. + */ + char *user_name; }; -struct osc_create_image_export_task_arg { - /* Required: osu_export, image_id */ +struct osc_unlink_private_ips_arg { + /* Required: NicId PrivateIps + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -13735,99 +13337,41 @@ struct osc_create_image_export_task_arg { int is_set_dry_run; int dry_run; /* - * The ID of the OMI to export. + * The ID of the NIC. */ - char *image_id; + char *nic_id; /* - * Information about the OOS export task to create. - * --OsuExport.DiskImageFormat: string - * The format of the export disk (`qcow2` \\| `raw`). - * --OsuExport.OsuApiKey: ref OsuApiKey - * Information about the OOS API key. - * --OsuExport.OsuApiKey.ApiKeyId: string - * The API key of the OOS account that enables you to access the - * bucket. - * --OsuExport.OsuApiKey.SecretKey: string - * The secret key of the OOS account that enables you to access - * the bucket. - * --OsuExport.OsuBucket: string - * The name of the OOS bucket where you want to export the object. - * --OsuExport.OsuManifestUrl: string - * The URL of the manifest file. - * --OsuExport.OsuPrefix: string - * The prefix for the key of the OOS object. + * One or more secondary private IPs you want to unassign from the NIC. */ - char *osu_export_str; - int is_set_osu_export; - struct osu_export_to_create osu_export; + char *private_ips_str; + char **private_ips; }; -struct osc_create_image_arg { - /* Required:none */ +struct osc_unlink_public_ip_arg { + /* Required: null + */ /* - * **(when registering from a snapshot)** The architecture of the OMI - * (`i386` or `x86_64`). + * If true, checks whether you have the required permissions to perform + * the action. */ - char *architecture; + int is_set_dry_run; + int dry_run; /* - * **(when registering from a snapshot)** One or more block device - * mappings. - * One or more parameters used to automatically set up volumes when - * the VM - * is created. - * --BlockDeviceMappings.INDEX.Bsu: ref BsuToCreate - * Information about the BSU volume to create. - * --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool - * By default or if set to true, the volume is deleted when - * terminating the - * VM. If false, the volume is not deleted when terminating the - * VM. - * --BlockDeviceMappings.INDEX.Bsu.Iops: long long int - * The number of I/O operations per second (IOPS). This - * parameter must be - * specified only if you create an `io1` volume. The maximum - * number of IOPS - * allowed for `io1` volumes is `13000` with a maximum - * performance ratio of - * 300 IOPS per gibibyte. - * --BlockDeviceMappings.INDEX.Bsu.SnapshotId: string - * The ID of the snapshot used to create the volume. - * --BlockDeviceMappings.INDEX.Bsu.VolumeSize: long long int - * The size of the volume, in gibibytes (GiB).
\nIf you - * specify a - * snapshot ID, the volume size must be at least equal to the - * snapshot - * size.
\nIf you specify a snapshot ID but no volume size, - * the volume - * is created with a size similar to the snapshot one. - * --BlockDeviceMappings.INDEX.Bsu.VolumeType: string - * The type of the volume (`standard` \\| `io1` \\| `gp2`). If - * not - * specified in the request, a `standard` volume is created.
\nFor more - * information about volume types, see [About Volumes > Volume - * Types and - * - * IOPS](https://docs.outscale.com/en/userguide/About-Volumes.html#_volum - * e_ty - * pes_and_iops). - * --BlockDeviceMappings.INDEX.DeviceName: string - * The device name for the volume. For a root device, you must use - * `/dev/sda1`. For other volumes, you must use `/dev/sdX`, - * `/dev/sdXX`, - * `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter - * between `b` - * and `z`, and the second `X` is a letter between `a` and `z`). - * --BlockDeviceMappings.INDEX.VirtualDeviceName: string - * The name of the virtual device (`ephemeralN`). + * The ID representing the association of the public IP with the VM or + * the NIC. This parameter is required unless you use the `PublicIp` + * parameter. */ - char *block_device_mappings_str; - int nb_block_device_mappings; - struct block_device_mapping_image *block_device_mappings; + char *link_public_ip_id; /* - * A description for the new OMI. + * The public IP. This parameter is required unless you use the + * `LinkPublicIpId` parameter. */ - char *description; + char *public_ip; +}; + +struct osc_unlink_route_table_arg { + /* Required: LinkRouteTableId + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -13835,58 +13379,58 @@ struct osc_create_image_arg { int is_set_dry_run; int dry_run; /* - * **(when registering from a bucket by using a manifest file)** The - * pre-signed URL of the manifest file for the OMI you want to register. - * For more information, see [Creating a Pre-signed - * URL](https://docs.outscale.com/en/userguide/Creating-a-Pre-Signed-URL. - * html). - */ - char *file_location; - /* - * A unique name for the new OMI.
\nConstraints: 3-128 alphanumeric - * characters, underscores (`_`), spaces (` `), parentheses (`()`), - * slashes (`/`), periods (`.`), or dashes (`-`). + * The ID of the association between the route table and the Subnet. */ - char *image_name; + char *link_route_table_id; +}; + +struct osc_unlink_virtual_gateway_arg { + /* Required: NetId VirtualGatewayId + */ /* - * **(when creating from a VM)** If false, the VM shuts down before - * creating the OMI and then reboots. If true, the VM does not. + * If true, checks whether you have the required permissions to perform + * the action. */ - int is_set_no_reboot; - int no_reboot; + int is_set_dry_run; + int dry_run; /* - * The product codes associated with the OMI. + * The ID of the Net from which you want to detach the virtual gateway. */ - char *product_codes_str; - char **product_codes; + char *net_id; /* - * **(when registering from a snapshot)** The name of the root device - * for the new OMI. + * The ID of the virtual gateway. */ - char *root_device_name; + char *virtual_gateway_id; +}; + +struct osc_unlink_volume_arg { + /* Required: VolumeId + */ /* - * **(when copying an OMI)** The ID of the OMI you want to copy. + * If true, checks whether you have the required permissions to perform + * the action. */ - char *source_image_id; + int is_set_dry_run; + int dry_run; /* - * **(when copying an OMI)** The name of the source Region (always the - * same as the Region of your account). + * Forces the detachment of the volume in case of previous failure. + * Important: This action may damage your data or file systems. */ - char *source_region_name; + int is_set_force_unlink; + int force_unlink; /* - * **(when creating from a VM)** The ID of the VM from which you want to - * create the OMI. + * The ID of the volume you want to detach. */ - char *vm_id; + char *volume_id; }; -struct osc_create_flexible_gpu_arg { - /* Required: model_name, subregion_name */ +struct osc_update_access_key_arg { + /* Required: AccessKeyId State + */ /* - * If true, the fGPU is deleted when the VM is terminated. + * The ID of the access key. */ - int is_set_delete_on_vm_deletion; - int delete_on_vm_deletion; + char *access_key_id; /* * If true, checks whether you have the required permissions to perform * the action. @@ -13894,76 +13438,50 @@ struct osc_create_flexible_gpu_arg { int is_set_dry_run; int dry_run; /* - * The processor generation that the fGPU must be compatible with. If - * not specified, the oldest possible processor generation is selected - * (as provided by [ReadFlexibleGpuCatalog](#readflexiblegpucatalog) for - * the specified model of fGPU). + * The date and time, or the date, at which you want the access key to + * expire, in ISO 8601 format (for example, `2020-06-14T00:00:00.000Z` + * or `2020-06-14`). If not specified, the access key is set to not + * expire. */ - char *generation; + char *expiration_date; /* - * The model of fGPU you want to allocate. For more information, see - * [About Flexible - * GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html) - * . + * The new state for the access key (`ACTIVE` \\| `INACTIVE`). When set + * to `ACTIVE`, the access key is enabled and can be used to send + * requests. When set to `INACTIVE`, the access key is disabled. */ - char *model_name; + char *state; /* - * The Subregion in which you want to create the fGPU. + * The name of the EIM user that the access key you want to modify is + * associated with. If you do not specify a user name, this action + * modifies the access key of the user who sends the request (which can + * be the root account). */ - char *subregion_name; + char *user_name; }; -struct osc_create_direct_link_interface_arg { - /* Required: direct_link_id, direct_link_interface */ - /* - * The ID of the existing DirectLink for which you want to create the - * DirectLink interface. - */ - char *direct_link_id; +struct osc_update_account_arg { + /* Required: null + */ /* - * Information about the DirectLink interface. - * --DirectLinkInterface.BgpAsn: long long int - * The BGP (Border Gateway Protocol) ASN (Autonomous System Number) - * on the - * customer's side of the DirectLink interface. This number must be - * between - * `64512` and `65534`. - * --DirectLinkInterface.BgpKey: string - * The BGP authentication key. - * --DirectLinkInterface.ClientPrivateIp: string - * The IP on the customer's side of the DirectLink interface. - * --DirectLinkInterface.DirectLinkInterfaceName: string - * The name of the DirectLink interface. - * --DirectLinkInterface.OutscalePrivateIp: string - * The IP on the OUTSCALE side of the DirectLink interface. - * --DirectLinkInterface.VirtualGatewayId: string - * The ID of the target virtual gateway. - * --DirectLinkInterface.Vlan: long long int - * The VLAN number associated with the DirectLink interface. This - * number - * must be unique and be between `2` and `4094`. + * One or more additional email addresses for the account. These + * addresses are used for notifications only. If you already have a list + * of additional emails registered, you cannot add to it, only replace + * it. To remove all registered additional emails, specify an empty list. */ - char *direct_link_interface_str; - int is_set_direct_link_interface; - struct direct_link_interface direct_link_interface; + char *additional_emails_str; + char **additional_emails; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The new city of the account owner. */ - int is_set_dry_run; - int dry_run; -}; - -struct osc_create_direct_link_arg { - /* Required: bandwidth, direct_link_name, location */ + char *city; /* - * The bandwidth of the DirectLink (`1Gbps` \\| `10Gbps`). + * The new name of the company for the account. */ - char *bandwidth; + char *company_name; /* - * The name of the DirectLink. + * The new country of the account owner. */ - char *direct_link_name; + char *country; /* * If true, checks whether you have the required permissions to perform * the action. @@ -13971,91 +13489,47 @@ struct osc_create_direct_link_arg { int is_set_dry_run; int dry_run; /* - * The code of the requested location for the DirectLink, returned by - * the [ReadLocations](#readlocations) method. + * The main email address for the account. This address is used for your + * credentials and notifications. */ - char *location; -}; - -struct osc_create_dhcp_options_arg { - /* Required:none */ + char *email; /* - * Specify a domain name (for example, `MyCompany.com`). You can specify - * only one domain name. You must specify at least one of the following - * parameters: `DomainName`, `DomainNameServers`, `LogServers`, or - * `NtpServers`. - */ - char *domain_name; - /* - * The IPs of domain name servers. If no IPs are specified, the - * `OutscaleProvidedDNS` value is set by default. You must specify at - * least one of the following parameters: `DomainName`, - * `DomainNameServers`, `LogServers`, or `NtpServers`. + * The new first name of the account owner. */ - char *domain_name_servers_str; - char **domain_name_servers; + char *first_name; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The new job title of the account owner. */ - int is_set_dry_run; - int dry_run; + char *job_title; /* - * The IPs of the log servers. You must specify at least one of the - * following parameters: `DomainName`, `DomainNameServers`, - * `LogServers`, or `NtpServers`. + * The new last name of the account owner. */ - char *log_servers_str; - char **log_servers; + char *last_name; /* - * The IPs of the Network Time Protocol (NTP) servers. You must specify - * at least one of the following parameters: `DomainName`, - * `DomainNameServers`, `LogServers`, or `NtpServers`. + * The new mobile phone number of the account owner. */ - char *ntp_servers_str; - char **ntp_servers; -}; - -struct osc_create_dedicated_group_arg { - /* Required: cpu_generation, name, subregion_name */ + char *mobile_number; /* - * The processor generation for the VMs in the dedicated group (for - * example, `4`). + * The new landline phone number of the account owner. */ - int is_set_cpu_generation; - long long int cpu_generation; + char *phone_number; /* - * If true, checks whether you have the required permissions to perform - * the action. + * The new state/province of the account owner. */ - int is_set_dry_run; - int dry_run; + char *state_province; /* - * A name for the dedicated group. + * The new value added tax (VAT) number for the account. */ - char *name; + char *vat_number; /* - * The Subregion in which you want to create the dedicated group. + * The new ZIP code of the city. */ - char *subregion_name; + char *zip_code; }; -struct osc_create_client_gateway_arg { - /* Required: bgp_asn, public_ip, connection_type */ - /* - * The Autonomous System Number (ASN) used by the Border Gateway - * Protocol (BGP) to find the path to your client gateway through the - * Internet.
\nThis number must be between `1` and `4294967295`. If - * you do not have an ASN, you can choose one between 64512 and 65534, - * or between 4200000000 and 4294967294. - */ - int is_set_bgp_asn; - long long int bgp_asn; - /* - * The communication protocol used to establish tunnel with your client - * gateway (always `ipsec.1`). - */ - char *connection_type; +struct osc_update_api_access_policy_arg { + /* Required: MaxAccessKeyExpirationSeconds RequireTrustedEnv + */ /* * If true, checks whether you have the required permissions to perform * the action. @@ -14063,46 +13537,48 @@ struct osc_create_client_gateway_arg { int is_set_dry_run; int dry_run; /* - * The public fixed IPv4 address of your client gateway. - */ - char *public_ip; -}; - -struct osc_create_ca_arg { - /* Required: ca_pem */ - /* - * The CA in PEM format.
With OSC CLI, use the following syntax to - * make sure your CA file is correctly parsed: `--CaPem="$(cat - * FILENAME)"`. - */ - char *ca_pem; - /* - * The description of the CA. + * The maximum possible lifetime for your access keys, in seconds + * (between `0` and `3153600000`, both included). If set to `O`, your + * access keys can have unlimited lifetimes, but a trusted session + * cannot be activated. Otherwise, all your access keys must have an + * expiration date. This value must be greater than the remaining + * lifetime of each access key of your account. */ - char *description; + int is_set_max_access_key_expiration_seconds; + long long int max_access_key_expiration_seconds; /* - * If true, checks whether you have the required permissions to perform - * the action. + * If true, a trusted session is activated, provided that you specify + * the `MaxAccessKeyExpirationSeconds` parameter with a value greater + * than `0`.
\nEnabling this will require you and all your users to + * log in to Cockpit v2 using the WebAuthn method for multi-factor + * authentication. For more information, see [About Authentication > + * Multi-Factor + * Authentication](https://docs.outscale.com/en/userguide/About-Authentic + * ation.html#_multi_factor_authentication). */ - int is_set_dry_run; - int dry_run; + int is_set_require_trusted_env; + int require_trusted_env; }; -struct osc_create_api_access_rule_arg { - /* Required:none */ +struct osc_update_api_access_rule_arg { + /* Required: ApiAccessRuleId + */ + /* + * The ID of the API access rule you want to update. + */ + char *api_access_rule_id; /* * One or more IDs of Client Certificate Authorities (CAs). */ char *ca_ids_str; char **ca_ids; /* - * One or more Client Certificate Common Names (CNs). If this parameter - * is specified, you must also specify the `CaIds` parameter. + * One or more Client Certificate Common Names (CNs). */ char *cns_str; char **cns; /* - * A description for the API access rule. + * A new description for the API access rule. */ char *description; /* @@ -14118,79 +13594,32 @@ struct osc_create_api_access_rule_arg { char **ip_ranges; }; -struct osc_create_account_arg { - /* Required: city, company_name, country, customer_id, email, first_name, last_name, zip_code */ - /* - * One or more additional email addresses for the account. These - * addresses are used for notifications only. If you already have a list - * of additional emails registered, you cannot add to it, only replace - * it. To remove all registered additional emails, specify an empty list. - */ - char *additional_emails_str; - char **additional_emails; - /* - * The city of the account owner. - */ - char *city; - /* - * The name of the company for the account. - */ - char *company_name; +struct osc_update_ca_arg { + /* Required: CaId + */ /* - * The country of the account owner. + * The ID of the CA. */ - char *country; + char *ca_id; /* - * The ID of the customer. It must be 8 digits. + * The description of the CA. */ - char *customer_id; + char *description; /* * If true, checks whether you have the required permissions to perform * the action. */ int is_set_dry_run; int dry_run; - /* - * The main email address for the account. This address is used for your - * credentials and notifications. - */ - char *email; - /* - * The first name of the account owner. - */ - char *first_name; - /* - * The job title of the account owner. - */ - char *job_title; - /* - * The last name of the account owner. - */ - char *last_name; - /* - * The mobile phone number of the account owner. - */ - char *mobile_number; - /* - * The landline phone number of the account owner. - */ - char *phone_number; - /* - * The state/province of the account. - */ - char *state_province; - /* - * The value added tax (VAT) number for the account. - */ - char *vat_number; - /* - * The ZIP code of the city. - */ - char *zip_code; }; -struct osc_create_access_key_arg { - /* Required:none */ +struct osc_update_dedicated_group_arg { + /* Required: DedicatedGroupId Name + */ + /* + * The ID of the dedicated group you want to update. + */ + char *dedicated_group_id; /* * If true, checks whether you have the required permissions to perform * the action. @@ -14198,22 +13627,18 @@ struct osc_create_access_key_arg { int is_set_dry_run; int dry_run; /* - * The date and time, or the date, at which you want the access key to - * expire, in ISO 8601 format (for example, `2020-06-14T00:00:00.000Z`, - * or `2020-06-14`). To remove an existing expiration date, use the - * method without specifying this parameter. - */ - char *expiration_date; - /* - * The name of the EIM user that owns the key to be created. If you do - * not specify a user name, this action creates an access key for the - * user who sends the request (which can be the root account). + * The new name of the dedicated group. */ - char *user_name; + char *name; }; -struct osc_check_authentication_arg { - /* Required: login, password */ +struct osc_update_direct_link_interface_arg { + /* Required: DirectLinkInterfaceId Mtu + */ + /* + * The ID of the DirectLink interface you want to update. + */ + char *direct_link_interface_id; /* * If true, checks whether you have the required permissions to perform * the action. @@ -14221,17 +13646,21 @@ struct osc_check_authentication_arg { int is_set_dry_run; int dry_run; /* - * The email address of the account. - */ - char *login; - /* - * The password of the account. + * The maximum transmission unit (MTU) of the DirectLink interface, in + * bytes (always `1500`). */ - char *password; + int is_set_mtu; + long long int mtu; }; -struct osc_add_user_to_user_group_arg { - /* Required: user_group_name, user_name */ +struct osc_update_flexible_gpu_arg { + /* Required: FlexibleGpuId + */ + /* + * If true, the fGPU is deleted when the VM is terminated. + */ + int is_set_delete_on_vm_deletion; + int delete_on_vm_deletion; /* * If true, checks whether you have the required permissions to perform * the action. @@ -14239,25 +13668,18 @@ struct osc_add_user_to_user_group_arg { int is_set_dry_run; int dry_run; /* - * The name of the group you want to add a user to. - */ - char *user_group_name; - /* - * The path to the group. If not specified, it is set to a slash (`/`). - */ - char *user_group_path; - /* - * The name of the user you want to add to the group. - */ - char *user_name; - /* - * The path to the user. If not specified, it is set to a slash (`/`). + * The ID of the fGPU you want to modify. */ - char *user_path; + char *flexible_gpu_id; }; -struct osc_accept_net_peering_arg { - /* Required: net_peering_id */ +struct osc_update_image_arg { + /* Required: ImageId + */ + /* + * A new description for the image. + */ + char *description; /* * If true, checks whether you have the required permissions to perform * the action. @@ -14265,91 +13687,898 @@ struct osc_accept_net_peering_arg { int is_set_dry_run; int dry_run; /* - * The ID of the Net peering you want to accept. + * The ID of the OMI you want to modify. */ - char *net_peering_id; + char *image_id; + /* + * Information about the permissions for the resource.
\nSpecify + * either the `Additions` or the `Removals` parameter. + * --PermissionsToLaunch.Additions: ref PermissionsOnResource + * Permissions for the resource. + * --PermissionsToLaunch.Additions.AccountIds: array string + * One or more account IDs that the permission is associated + * with. + * --PermissionsToLaunch.Additions.GlobalPermission: bool + * A global permission for all accounts.
\n(Request) Set + * this + * parameter to true to make the resource public (if the parent + * parameter is + * `Additions`) or to make the resource private (if the parent + * parameter is + * `Removals`).
\n(Response) If true, the resource is + * public. If false, + * the resource is private. + * --PermissionsToLaunch.Removals: ref PermissionsOnResource + * Permissions for the resource. + * --PermissionsToLaunch.Removals.AccountIds: array string + * One or more account IDs that the permission is associated + * with. + * --PermissionsToLaunch.Removals.GlobalPermission: bool + * A global permission for all accounts.
\n(Request) Set + * this + * parameter to true to make the resource public (if the parent + * parameter is + * `Additions`) or to make the resource private (if the parent + * parameter is + * `Removals`).
\n(Response) If true, the resource is + * public. If false, + * the resource is private. + */ + char *permissions_to_launch_str; + int is_set_permissions_to_launch; + struct permissions_on_resource_creation permissions_to_launch; }; - -int osc_load_ak_sk_from_conf(const char *profile, char **ak, char **sk); -int osc_load_region_from_conf(const char *profile, char **region); -int osc_load_loging_password_from_conf(const char *profile, - char **email, char **password); - -/** - * @brief parse osc config file, and store cred_path/key_path. key is optional. - * - * @return if < 0, an error, otherwise a flag contain OSC_ENV_FREE_CERT, - * OSC_ENV_FREE_SSLKEY, both or 0 +struct osc_update_listener_rule_arg { + /* Required: ListenerRuleName */ -int osc_load_cert_from_conf(const char *profile, char **cert_path, - char **key_path); - -void osc_init_str(struct osc_str *r); -void osc_deinit_str(struct osc_str *r); -int osc_init_sdk(struct osc_env *e, const char *profile, unsigned int flag); -int osc_init_sdk_ext(struct osc_env *e, const char *profile, - unsigned int flag, struct osc_env_conf *cfg); -void osc_deinit_sdk(struct osc_env *e); - -struct json_object; - -typedef struct json_object json_object; + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * A host-name pattern for the rule, with a maximum length of 128 + * characters. This host-name pattern supports maximum three wildcards, + * and must not contain any special characters except `-.?`. + */ + char *host_pattern; + /* + * The name of the listener rule. + */ + char *listener_rule_name; + /* + * A path pattern for the rule, with a maximum length of 128 characters. + * This path pattern supports maximum three wildcards, and must not + * contain any special characters except `_-.$/~"'@:+?`. + */ + char *path_pattern; +}; -void osc_deinit_json_c(json_object **j); +struct osc_update_load_balancer_arg { + /* Required: LoadBalancerName + */ + /* + * Information about access logs. + * --AccessLog.IsEnabled: bool + * If true, access logs are enabled for your load balancer. If + * false, they + * are not. If you set this to true in your request, the + * `OsuBucketName` + * parameter is required. + * --AccessLog.OsuBucketName: string + * The name of the OOS bucket for the access logs. + * --AccessLog.OsuBucketPrefix: string + * The path to the folder of the access logs in your OOS bucket (by + * default, the `root` level of your bucket). + * --AccessLog.PublicationInterval: long long int + * The time interval for the publication of access logs in the OOS + * bucket, + * in minutes. This value can be either `5` or `60` (by default, + * `60`). + */ + char *access_log_str; + int is_set_access_log; + struct access_log access_log; + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * Information about the health check configuration. + * --HealthCheck.CheckInterval: long long int + * The number of seconds between two requests (between `5` and `600` + * both + * included). + * --HealthCheck.HealthyThreshold: long long int + * The number of consecutive successful requests before considering + * the VM + * as healthy (between `2` and `10` both included). + * --HealthCheck.Path: string + * If you use the HTTP or HTTPS protocols, the request URL path. + * --HealthCheck.Port: long long int + * The port number (between `1` and `65535`, both included). + * --HealthCheck.Protocol: string + * The protocol for the URL of the VM (`HTTP` \\| `HTTPS` \\| `TCP` + * \\| + * `SSL`). + * --HealthCheck.Timeout: long long int + * The maximum waiting time for a response before considering the VM + * as + * unhealthy, in seconds (between `2` and `60` both included). + * --HealthCheck.UnhealthyThreshold: long long int + * The number of consecutive failed requests before considering the + * VM as + * unhealthy (between `2` and `10` both included). + */ + char *health_check_str; + int is_set_health_check; + struct health_check health_check; + /* + * The name of the load balancer. + */ + char *load_balancer_name; + /* + * The port on which the load balancer is listening (between `1` and + * `65535`, both included). This parameter is required if you want to + * update the server certificate. + */ + int is_set_load_balancer_port; + long long int load_balancer_port; + /* + * The name of the policy you want to enable for the listener. + */ + char *policy_names_str; + char **policy_names; + /* + * (internet-facing only) The public IP you want to associate with the + * load balancer. The former public IP of the load balancer is then + * disassociated. If you specify an empty string and the former public + * IP belonged to you, it is disassociated and replaced by a public IP + * owned by 3DS OUTSCALE. + */ + char *public_ip; + /* + * If true, secure cookies are enabled for the load balancer. + */ + int is_set_secured_cookies; + int secured_cookies; + /* + * (Net only) One or more IDs of security groups you want to assign to + * the load balancer. You need to specify the already assigned security + * groups that you want to keep along with the new ones you are + * assigning. If the list is empty, the default security group of the + * Net is assigned to the load balancer. + */ + char *security_groups_str; + char **security_groups; + /* + * The OUTSCALE Resource Name (ORN) of the server certificate. For more + * information, see [Resource Identifiers > OUTSCALE Resource Names + * (ORNs)](https://docs.outscale.com/en/userguide/Resource-Identifiers.ht + * ml#_outscale_resource_names_orns). If this parameter is specified, + * you must also specify the `LoadBalancerPort` parameter. + */ + char *server_certificate_id; +}; -int osc_str_append_string(struct osc_str *osc_str, const char *str); -int osc_str_append_n_string(struct osc_str *osc_str, const char *str, int l); +struct osc_update_net_access_point_arg { + /* Required: NetAccessPointId + */ + /* + * One or more IDs of route tables to associate with the specified Net + * access point. + */ + char *add_route_table_ids_str; + char **add_route_table_ids; + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * The ID of the Net access point. + */ + char *net_access_point_id; + /* + * One or more IDs of route tables to disassociate from the specified + * Net access point. + */ + char *remove_route_table_ids_str; + char **remove_route_table_ids; +}; -/* - * osc_new_sdk/str and osc_destroy_sdk/str where made so we can use - * C++'s std::unique_ptr with the lib. - * use it like - * const std::unique_ptr - * e(osc_new_sdk(NULL, 0), &osc_destroy_sdk); +struct osc_update_net_arg { + /* Required: DhcpOptionsSetId NetId */ -static struct osc_env *osc_new_sdk(const char *profile, unsigned int flag) -{ - struct osc_env *e = (struct osc_env *)malloc(sizeof *e); + /* + * The ID of the DHCP options set (or `default` if you want to associate + * the default one). + */ + char *dhcp_options_set_id; + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * The ID of the Net. + */ + char *net_id; +}; - if (osc_init_sdk(e, profile, flag) < 0) { - free(e); - return NULL; - } - return e; -} - -static void osc_destroy_sdk(struct osc_env *e) -{ - osc_deinit_sdk(e); - free(e); -} +struct osc_update_nic_arg { + /* Required: NicId + */ + /* + * A new description for the NIC. + */ + char *description; + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * Information about the NIC attachment. If you are modifying the + * `DeleteOnVmDeletion` attribute, you must specify the ID of the NIC + * attachment. + * --LinkNic.DeleteOnVmDeletion: bool + * If true, the NIC is deleted when the VM is terminated. If false, + * the NIC + * is detached from the VM. + * --LinkNic.LinkNicId: string + * The ID of the NIC attachment. + */ + char *link_nic_str; + int is_set_link_nic; + struct link_nic_to_update link_nic; + /* + * The ID of the NIC you want to modify. + */ + char *nic_id; + /* + * One or more IDs of security groups for the NIC.
\nYou must + * specify at least one group, even if you use the default security + * group in the Net. + */ + char *security_group_ids_str; + char **security_group_ids; +}; -static struct osc_str *osc_new_str(void) -{ - struct osc_str *e = (struct osc_str *)malloc(sizeof *e); +struct osc_update_route_propagation_arg { + /* Required: Enable RouteTableId VirtualGatewayId + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * If true, a virtual gateway can propagate routes to a specified route + * table of a Net. If false, the propagation is disabled. + */ + int is_set_enable; + int enable; + /* + * The ID of the route table. + */ + char *route_table_id; + /* + * The ID of the virtual gateway. + */ + char *virtual_gateway_id; +}; - osc_init_str(e); - return e; -} +struct osc_update_route_arg { + /* Required: RouteTableId DestinationIpRange + */ + /* + * The IP range used for the destination match, in CIDR notation (for + * example, `10.0.0.0/24`). + */ + char *destination_ip_range; + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * The ID of an Internet service or virtual gateway attached to your Net. + */ + char *gateway_id; + /* + * The ID of a NAT service. + */ + char *nat_service_id; + /* + * The ID of a Net peering. + */ + char *net_peering_id; + /* + * The ID of a network interface card (NIC). + */ + char *nic_id; + /* + * The ID of the route table. + */ + char *route_table_id; + /* + * The ID of a NAT VM in your Net. + */ + char *vm_id; +}; -static void osc_destroy_str(struct osc_str *e) -{ - osc_deinit_str(e); - free(e); -} +struct osc_update_route_table_link_arg { + /* Required: RouteTableId LinkRouteTableId + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * The ID of the current route table link. + */ + char *link_route_table_id; + /* + * The ID of the new route table to associate with the Subnet. + */ + char *route_table_id; +}; -int osc_sdk_set_useragent(struct osc_env *e, const char *str); +struct osc_update_server_certificate_arg { + /* Required: Name + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * The name of the server certificate you want to modify. + */ + char *name; + /* + * A new name for the server certificate. + */ + char *new_name; + /* + * A new path for the server certificate. + */ + char *new_path; +}; -void *osc_realloc(void *buf, size_t l); +struct osc_update_snapshot_arg { + /* Required: SnapshotId PermissionsToCreateVolume + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * Information about the permissions for the resource.
\nSpecify + * either the `Additions` or the `Removals` parameter. + * --PermissionsToCreateVolume.Additions: ref PermissionsOnResource + * Permissions for the resource. + * --PermissionsToCreateVolume.Additions.AccountIds: array string + * One or more account IDs that the permission is associated + * with. + * --PermissionsToCreateVolume.Additions.GlobalPermission: bool + * A global permission for all accounts.
\n(Request) Set + * this + * parameter to true to make the resource public (if the parent + * parameter is + * `Additions`) or to make the resource private (if the parent + * parameter is + * `Removals`).
\n(Response) If true, the resource is + * public. If false, + * the resource is private. + * --PermissionsToCreateVolume.Removals: ref PermissionsOnResource + * Permissions for the resource. + * --PermissionsToCreateVolume.Removals.AccountIds: array string + * One or more account IDs that the permission is associated + * with. + * --PermissionsToCreateVolume.Removals.GlobalPermission: bool + * A global permission for all accounts.
\n(Request) Set + * this + * parameter to true to make the resource public (if the parent + * parameter is + * `Additions`) or to make the resource private (if the parent + * parameter is + * `Removals`).
\n(Response) If true, the resource is + * public. If false, + * the resource is private. + */ + char *permissions_to_create_volume_str; + int is_set_permissions_to_create_volume; + struct permissions_on_resource_creation permissions_to_create_volume; + /* + * The ID of the snapshot. + */ + char *snapshot_id; +}; -/* set/get config path, thread safe if -DWITH_C11_THREAD_LOCAL=1 is set */ -void osc_set_cfg_path(const char *cfg); -const char *osc_set_get_path(void); +struct osc_update_subnet_arg { + /* Required: SubnetId MapPublicIpOnLaunch + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * If true, a public IP is assigned to the network interface cards + * (NICs) created in the specified Subnet. + */ + int is_set_map_public_ip_on_launch; + int map_public_ip_on_launch; + /* + * The ID of the Subnet. + */ + char *subnet_id; +}; -#ifdef WITH_DESCRIPTION +struct osc_update_user_group_arg { + /* Required: UserGroupName + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * A new path for the group. If not specified, it is set to a slash + * (`/`). + */ + char *new_path; + /* + * A new name for the user group. + */ + char *new_user_group_name; + /* + * The path to the group. If not specified, it is set to a slash (`/`). + */ + char *path; + /* + * The name of the group you want to update. + */ + char *user_group_name; +}; -const char *osc_find_description(const char *call_name); +struct osc_update_user_arg { + /* Required: UserName + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * A new path for the EIM user. + */ + char *new_path; + /* + * A new email address for the EIM user. + */ + char *new_user_email; + /* + * A new name for the EIM user. + */ + char *new_user_name; + /* + * The name of the EIM user you want to modify. + */ + char *user_name; +}; + +struct osc_update_vm_group_arg { + /* Required: VmGroupId + */ + /* + * A new description for the VM group. + */ + char *description; + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * New tags for your VM group. + * Information about the tag. + * --Tags.INDEX.Key: string + * The key of the tag, with a minimum of 1 character. + * --Tags.INDEX.Value: string + * The value of the tag, between 0 and 255 characters. + */ + char *tags_str; + int nb_tags; + struct resource_tag *tags; + /* + * The ID of the VM group you want to update. + */ + char *vm_group_id; + /* + * A new name for your VM group. + */ + char *vm_group_name; + /* + * A new VM template ID for your VM group. + */ + char *vm_template_id; +}; + +struct osc_update_vm_arg { + /* Required: VmId + */ + /* + * One or more block device mappings of the VM. + * Information about the block device mapping. + * --BlockDeviceMappings.INDEX.Bsu: ref BsuToUpdateVm + * Information about the BSU volume. + * --BlockDeviceMappings.INDEX.Bsu.DeleteOnVmDeletion: bool + * If set to true, the volume is deleted when terminating the + * VM. If set to + * false, the volume is not deleted when terminating the VM. + * --BlockDeviceMappings.INDEX.Bsu.VolumeId: string + * The ID of the volume. + * --BlockDeviceMappings.INDEX.DeviceName: string + * The device name for the volume. For a root device, you must use + * `/dev/sda1`. For other volumes, you must use `/dev/sdX`, + * `/dev/sdXX`, + * `/dev/xvdX`, or `/dev/xvdXX` (where the first `X` is a letter + * between `b` + * and `z`, and the second `X` is a letter between `a` and `z`). + * --BlockDeviceMappings.INDEX.NoDevice: string + * Removes the device which is included in the block device mapping + * of the + * OMI. + * --BlockDeviceMappings.INDEX.VirtualDeviceName: string + * The name of the virtual device (`ephemeralN`). + */ + char *block_device_mappings_str; + int nb_block_device_mappings; + struct block_device_mapping_vm_update *block_device_mappings; + /* + * This parameter is not available. It is present in our API for the + * sake of historical compatibility with AWS. + */ + int is_set_bsu_optimized; + int bsu_optimized; + /* + * If true, you cannot delete the VM unless you change this parameter + * back to false. + */ + int is_set_deletion_protection; + int deletion_protection; + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * (Net only) If true, the source/destination check is enabled. If + * false, it is disabled. + */ + int is_set_is_source_dest_checked; + int is_source_dest_checked; + /* + * The name of a keypair you want to associate with the VM.
\nWhen + * you replace the keypair of a VM with another one, the metadata of the + * VM is modified to reflect the new public key, but the replacement is + * still not effective in the operating system of the VM. To complete + * the replacement and effectively apply the new keypair, you need to + * perform other actions inside the VM. For more information, see + * [Modifying the Keypair of a + * VM](https://docs.outscale.com/en/userguide/Modifying-the-Keypair-of-a- + * VM.html). + */ + char *keypair_name; + /* + * (dedicated tenancy only) If true, nested virtualization is enabled. + * If false, it is disabled. + */ + int is_set_nested_virtualization; + int nested_virtualization; + /* + * The performance of the VM (`medium` \\| `high` \\| `highest`). + */ + char *performance; + /* + * One or more IDs of security groups for the VM. + */ + char *security_group_ids_str; + char **security_group_ids; + /* + * The Base64-encoded MIME user data, limited to 500 kibibytes (KiB). + */ + char *user_data; + /* + * The ID of the VM. + */ + char *vm_id; + /* + * The VM behavior when you stop it. If set to `stop`, the VM stops. If + * set to `restart`, the VM stops then automatically restarts. If set to + * `terminate`, the VM stops and is terminated. + */ + char *vm_initiated_shutdown_behavior; + /* + * The type of VM. For more information, see [VM + * Types](https://docs.outscale.com/en/userguide/VM-Types.html). + */ + char *vm_type; +}; + +struct osc_update_vm_template_arg { + /* Required: VmTemplateId + */ + /* + * A new description for the VM template. + */ + char *description; + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * New tags for your VM template. + * Information about the tag. + * --Tags.INDEX.Key: string + * The key of the tag, with a minimum of 1 character. + * --Tags.INDEX.Value: string + * The value of the tag, between 0 and 255 characters. + */ + char *tags_str; + int nb_tags; + struct resource_tag *tags; + /* + * The ID of the VM template you want to update. + */ + char *vm_template_id; + /* + * A new name for your VM template. + */ + char *vm_template_name; +}; + +struct osc_update_volume_arg { + /* Required: VolumeId + */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * **Cold volume**: the new number of I/O operations per second (IOPS). + * This parameter can be specified only if you update an `io1` volume or + * if you change the type of the volume for an `io1`. This modification + * is instantaneous.
\n**Hot volume**: the new number of I/O + * operations per second (IOPS). This parameter can be specified only if + * you update an `io1` volume. This modification is not instantaneous. + *

\nThe maximum number of IOPS allowed for `io1` volumes is + * `13000` with a maximum performance ratio of 300 IOPS per gibibyte. + */ + int is_set_iops; + long long int iops; + /* + * **Cold volume**: the new size of the volume, in gibibytes (GiB). This + * value must be equal to or greater than the current size of the + * volume. This modification is not instantaneous.
\n**Hot + * volume**: you cannot change the size of a hot volume. + */ + int is_set_size; + long long int size; + /* + * The ID of the volume you want to update. + */ + char *volume_id; + /* + * **Cold volume**: the new type of the volume (`standard` \\| `io1` \\| + * `gp2`). This modification is instantaneous. If you update to an `io1` + * volume, you must also specify the `Iops` parameter.
\n**Hot + * volume**: you cannot change the type of a hot volume. + */ + char *volume_type; +}; + +struct osc_update_vpn_connection_arg { + /* Required: VpnConnectionId + */ + /* + * The ID of the client gateway. + */ + char *client_gateway_id; + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; + /* + * The ID of the virtual gateway. + */ + char *virtual_gateway_id; + /* + * The ID of the VPN connection you want to modify. + */ + char *vpn_connection_id; + /* + * Information about the VPN options. + * --VpnOptions.Phase1Options: ref Phase1Options + * Information about Phase 1 of the Internet Key Exchange (IKE) + * negotiation. When Phase 1 finishes successfully, peers proceed + * to Phase 2 + * negotiations. + * --VpnOptions.Phase1Options.DpdTimeoutAction: string + * The action to carry out after a Dead Peer Detection (DPD) + * timeout + * occurs. + * --VpnOptions.Phase1Options.DpdTimeoutSeconds: long long int + * The maximum waiting time for a Dead Peer Detection (DPD) + * response before + * considering the peer as dead, in seconds. + * --VpnOptions.Phase1Options.IkeVersions: array string + * The Internet Key Exchange (IKE) versions allowed for the VPN + * tunnel. + * --VpnOptions.Phase1Options.Phase1DhGroupNumbers: array integer + * The Diffie-Hellman (DH) group numbers allowed for the VPN + * tunnel for + * phase 1. + * --VpnOptions.Phase1Options.Phase1EncryptionAlgorithms: array + * string + * The encryption algorithms allowed for the VPN tunnel for + * phase 1. + * --VpnOptions.Phase1Options.Phase1IntegrityAlgorithms: array + * string + * The integrity algorithms allowed for the VPN tunnel for phase + * 1. + * --VpnOptions.Phase1Options.Phase1LifetimeSeconds: long long int + * The lifetime for phase 1 of the IKE negotiation process, in + * seconds. + * --VpnOptions.Phase1Options.ReplayWindowSize: long long int + * The number of packets in an IKE replay window. + * --VpnOptions.Phase1Options.StartupAction: string + * The action to carry out when establishing tunnels for a VPN + * connection. + * --VpnOptions.Phase2Options: ref Phase2Options + * Information about Phase 2 of the Internet Key Exchange (IKE) + * negotiation. + * --VpnOptions.Phase2Options.Phase2DhGroupNumbers: array integer + * The Diffie-Hellman (DH) group numbers allowed for the VPN + * tunnel for + * phase 2. + * --VpnOptions.Phase2Options.Phase2EncryptionAlgorithms: array + * string + * The encryption algorithms allowed for the VPN tunnel for + * phase 2. + * --VpnOptions.Phase2Options.Phase2IntegrityAlgorithms: array + * string + * The integrity algorithms allowed for the VPN tunnel for phase + * 2. + * --VpnOptions.Phase2Options.Phase2LifetimeSeconds: long long int + * The lifetime for phase 2 of the Internet Key Exchange (IKE) + * negociation + * process, in seconds. + * --VpnOptions.Phase2Options.PreSharedKey: string + * The pre-shared key to establish the initial authentication + * between the + * client gateway and the virtual gateway. This key can contain + * any + * character except line breaks and double quotes ("). + * --VpnOptions.TunnelInsideIpRange: string + * The range of inside IPs for the tunnel. This must be a /30 CIDR + * block + * from the 169.254.254.0/24 range. + */ + char *vpn_options_str; + int is_set_vpn_options; + struct vpn_options vpn_options; +}; + + +int osc_set_extra_flag_from_conf(const char *profile, unsigned int *flag); +int osc_load_ak_sk_from_conf(const char *profile, char **ak, char **sk); +int osc_load_region_from_conf(const char *profile, char **region); +int osc_load_loging_password_from_conf(const char *profile, + char **email, char **password); + +/** + * @brief parse osc config file, and store cred_path/key_path. key is optional. + * + * @return if < 0, an error, otherwise a flag contain OSC_ENV_FREE_CERT, + * OSC_ENV_FREE_SSLKEY, both or 0 + */ +int osc_load_cert_from_conf(const char *profile, char **cert_path, + char **key_path); + +void osc_init_str(struct osc_str *r); +void osc_deinit_str(struct osc_str *r); +int osc_init_sdk(struct osc_env *e, const char *profile, unsigned int flag); +int osc_init_sdk_ext(struct osc_env *e, const char *profile, + unsigned int flag, struct osc_env_conf *cfg); +void osc_deinit_sdk(struct osc_env *e); + +struct json_object; + +typedef struct json_object json_object; + +void osc_deinit_json_c(json_object **j); + +int osc_str_append_string(struct osc_str *osc_str, const char *str); +int osc_str_append_n_string(struct osc_str *osc_str, const char *str, int l); + +/* + * osc_new_sdk/str and osc_destroy_sdk/str where made so we can use + * C++'s std::unique_ptr with the lib. + * use it like + * const std::unique_ptr + * e(osc_new_sdk(NULL, 0), &osc_destroy_sdk); + */ +static struct osc_env *osc_new_sdk(const char *profile, unsigned int flag) +{ + struct osc_env *e = (struct osc_env *)malloc(sizeof *e); + + if (osc_init_sdk(e, profile, flag) < 0) { + free(e); + return NULL; + } + return e; +} + +static void osc_destroy_sdk(struct osc_env *e) +{ + osc_deinit_sdk(e); + free(e); +} + +static struct osc_str *osc_new_str(void) +{ + struct osc_str *e = (struct osc_str *)malloc(sizeof *e); + + osc_init_str(e); + return e; +} + +static void osc_destroy_str(struct osc_str *e) +{ + osc_deinit_str(e); + free(e); +} + +int osc_sdk_set_useragent(struct osc_env *e, const char *str); + +void *osc_realloc(void *buf, size_t l); + +/* set/get config path, thread safe if -DWITH_C11_THREAD_LOCAL=1 is set */ +void osc_set_cfg_path(const char *cfg); +const char *osc_set_get_path(void); + +#ifdef WITH_DESCRIPTION + +const char *osc_find_description(const char *call_name); const char *osc_find_args_description(const char *call_name); /* Return a list of all calls names, last elem is NULL */ @@ -14357,229 +14586,229 @@ const char **osc_calls_name(void); #endif /* WITH_DESCRIPTION */ -int osc_update_vpn_connection(struct osc_env *e, struct osc_str *out, struct osc_update_vpn_connection_arg *args); -int osc_update_volume(struct osc_env *e, struct osc_str *out, struct osc_update_volume_arg *args); -int osc_update_vm_template(struct osc_env *e, struct osc_str *out, struct osc_update_vm_template_arg *args); -int osc_update_vm_group(struct osc_env *e, struct osc_str *out, struct osc_update_vm_group_arg *args); -int osc_update_vm(struct osc_env *e, struct osc_str *out, struct osc_update_vm_arg *args); -int osc_update_user_group(struct osc_env *e, struct osc_str *out, struct osc_update_user_group_arg *args); -int osc_update_user(struct osc_env *e, struct osc_str *out, struct osc_update_user_arg *args); -int osc_update_subnet(struct osc_env *e, struct osc_str *out, struct osc_update_subnet_arg *args); -int osc_update_snapshot(struct osc_env *e, struct osc_str *out, struct osc_update_snapshot_arg *args); -int osc_update_server_certificate(struct osc_env *e, struct osc_str *out, struct osc_update_server_certificate_arg *args); -int osc_update_route_table_link(struct osc_env *e, struct osc_str *out, struct osc_update_route_table_link_arg *args); -int osc_update_route_propagation(struct osc_env *e, struct osc_str *out, struct osc_update_route_propagation_arg *args); -int osc_update_route(struct osc_env *e, struct osc_str *out, struct osc_update_route_arg *args); -int osc_update_nic(struct osc_env *e, struct osc_str *out, struct osc_update_nic_arg *args); -int osc_update_net_access_point(struct osc_env *e, struct osc_str *out, struct osc_update_net_access_point_arg *args); -int osc_update_net(struct osc_env *e, struct osc_str *out, struct osc_update_net_arg *args); -int osc_update_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_update_load_balancer_arg *args); -int osc_update_listener_rule(struct osc_env *e, struct osc_str *out, struct osc_update_listener_rule_arg *args); -int osc_update_image(struct osc_env *e, struct osc_str *out, struct osc_update_image_arg *args); -int osc_update_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_update_flexible_gpu_arg *args); -int osc_update_direct_link_interface(struct osc_env *e, struct osc_str *out, struct osc_update_direct_link_interface_arg *args); -int osc_update_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_update_dedicated_group_arg *args); -int osc_update_ca(struct osc_env *e, struct osc_str *out, struct osc_update_ca_arg *args); -int osc_update_api_access_rule(struct osc_env *e, struct osc_str *out, struct osc_update_api_access_rule_arg *args); -int osc_update_api_access_policy(struct osc_env *e, struct osc_str *out, struct osc_update_api_access_policy_arg *args); -int osc_update_account(struct osc_env *e, struct osc_str *out, struct osc_update_account_arg *args); -int osc_update_access_key(struct osc_env *e, struct osc_str *out, struct osc_update_access_key_arg *args); -int osc_unlink_volume(struct osc_env *e, struct osc_str *out, struct osc_unlink_volume_arg *args); -int osc_unlink_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_unlink_virtual_gateway_arg *args); -int osc_unlink_route_table(struct osc_env *e, struct osc_str *out, struct osc_unlink_route_table_arg *args); -int osc_unlink_public_ip(struct osc_env *e, struct osc_str *out, struct osc_unlink_public_ip_arg *args); -int osc_unlink_private_ips(struct osc_env *e, struct osc_str *out, struct osc_unlink_private_ips_arg *args); -int osc_unlink_policy(struct osc_env *e, struct osc_str *out, struct osc_unlink_policy_arg *args); -int osc_unlink_nic(struct osc_env *e, struct osc_str *out, struct osc_unlink_nic_arg *args); -int osc_unlink_managed_policy_from_user_group(struct osc_env *e, struct osc_str *out, struct osc_unlink_managed_policy_from_user_group_arg *args); -int osc_unlink_load_balancer_backend_machines(struct osc_env *e, struct osc_str *out, struct osc_unlink_load_balancer_backend_machines_arg *args); -int osc_unlink_internet_service(struct osc_env *e, struct osc_str *out, struct osc_unlink_internet_service_arg *args); -int osc_unlink_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_unlink_flexible_gpu_arg *args); -int osc_stop_vms(struct osc_env *e, struct osc_str *out, struct osc_stop_vms_arg *args); -int osc_start_vms(struct osc_env *e, struct osc_str *out, struct osc_start_vms_arg *args); -int osc_set_default_policy_version(struct osc_env *e, struct osc_str *out, struct osc_set_default_policy_version_arg *args); -int osc_scale_up_vm_group(struct osc_env *e, struct osc_str *out, struct osc_scale_up_vm_group_arg *args); -int osc_scale_down_vm_group(struct osc_env *e, struct osc_str *out, struct osc_scale_down_vm_group_arg *args); -int osc_remove_user_from_user_group(struct osc_env *e, struct osc_str *out, struct osc_remove_user_from_user_group_arg *args); -int osc_reject_net_peering(struct osc_env *e, struct osc_str *out, struct osc_reject_net_peering_arg *args); -int osc_register_vms_in_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_register_vms_in_load_balancer_arg *args); -int osc_reboot_vms(struct osc_env *e, struct osc_str *out, struct osc_reboot_vms_arg *args); -int osc_read_vpn_connections(struct osc_env *e, struct osc_str *out, struct osc_read_vpn_connections_arg *args); -int osc_read_volumes(struct osc_env *e, struct osc_str *out, struct osc_read_volumes_arg *args); -int osc_read_vms_state(struct osc_env *e, struct osc_str *out, struct osc_read_vms_state_arg *args); -int osc_read_vms_health(struct osc_env *e, struct osc_str *out, struct osc_read_vms_health_arg *args); -int osc_read_vms(struct osc_env *e, struct osc_str *out, struct osc_read_vms_arg *args); -int osc_read_vm_types(struct osc_env *e, struct osc_str *out, struct osc_read_vm_types_arg *args); -int osc_read_vm_templates(struct osc_env *e, struct osc_str *out, struct osc_read_vm_templates_arg *args); -int osc_read_vm_groups(struct osc_env *e, struct osc_str *out, struct osc_read_vm_groups_arg *args); -int osc_read_virtual_gateways(struct osc_env *e, struct osc_str *out, struct osc_read_virtual_gateways_arg *args); -int osc_read_users(struct osc_env *e, struct osc_str *out, struct osc_read_users_arg *args); -int osc_read_user_groups_per_user(struct osc_env *e, struct osc_str *out, struct osc_read_user_groups_per_user_arg *args); -int osc_read_user_groups(struct osc_env *e, struct osc_str *out, struct osc_read_user_groups_arg *args); -int osc_read_user_group_policy(struct osc_env *e, struct osc_str *out, struct osc_read_user_group_policy_arg *args); -int osc_read_user_group_policies(struct osc_env *e, struct osc_str *out, struct osc_read_user_group_policies_arg *args); -int osc_read_user_group(struct osc_env *e, struct osc_str *out, struct osc_read_user_group_arg *args); -int osc_read_unit_price(struct osc_env *e, struct osc_str *out, struct osc_read_unit_price_arg *args); -int osc_read_tags(struct osc_env *e, struct osc_str *out, struct osc_read_tags_arg *args); -int osc_read_subregions(struct osc_env *e, struct osc_str *out, struct osc_read_subregions_arg *args); -int osc_read_subnets(struct osc_env *e, struct osc_str *out, struct osc_read_subnets_arg *args); -int osc_read_snapshots(struct osc_env *e, struct osc_str *out, struct osc_read_snapshots_arg *args); -int osc_read_snapshot_export_tasks(struct osc_env *e, struct osc_str *out, struct osc_read_snapshot_export_tasks_arg *args); -int osc_read_server_certificates(struct osc_env *e, struct osc_str *out, struct osc_read_server_certificates_arg *args); -int osc_read_security_groups(struct osc_env *e, struct osc_str *out, struct osc_read_security_groups_arg *args); -int osc_read_secret_access_key(struct osc_env *e, struct osc_str *out, struct osc_read_secret_access_key_arg *args); -int osc_read_route_tables(struct osc_env *e, struct osc_str *out, struct osc_read_route_tables_arg *args); -int osc_read_regions(struct osc_env *e, struct osc_str *out, struct osc_read_regions_arg *args); -int osc_read_quotas(struct osc_env *e, struct osc_str *out, struct osc_read_quotas_arg *args); -int osc_read_public_ips(struct osc_env *e, struct osc_str *out, struct osc_read_public_ips_arg *args); -int osc_read_public_ip_ranges(struct osc_env *e, struct osc_str *out, struct osc_read_public_ip_ranges_arg *args); -int osc_read_public_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_public_catalog_arg *args); -int osc_read_product_types(struct osc_env *e, struct osc_str *out, struct osc_read_product_types_arg *args); -int osc_read_policy_versions(struct osc_env *e, struct osc_str *out, struct osc_read_policy_versions_arg *args); -int osc_read_policy_version(struct osc_env *e, struct osc_str *out, struct osc_read_policy_version_arg *args); -int osc_read_policy(struct osc_env *e, struct osc_str *out, struct osc_read_policy_arg *args); -int osc_read_policies(struct osc_env *e, struct osc_str *out, struct osc_read_policies_arg *args); -int osc_read_nics(struct osc_env *e, struct osc_str *out, struct osc_read_nics_arg *args); -int osc_read_nets(struct osc_env *e, struct osc_str *out, struct osc_read_nets_arg *args); -int osc_read_net_peerings(struct osc_env *e, struct osc_str *out, struct osc_read_net_peerings_arg *args); -int osc_read_net_access_points(struct osc_env *e, struct osc_str *out, struct osc_read_net_access_points_arg *args); -int osc_read_net_access_point_services(struct osc_env *e, struct osc_str *out, struct osc_read_net_access_point_services_arg *args); -int osc_read_nat_services(struct osc_env *e, struct osc_str *out, struct osc_read_nat_services_arg *args); -int osc_read_managed_policies_linked_to_user_group(struct osc_env *e, struct osc_str *out, struct osc_read_managed_policies_linked_to_user_group_arg *args); -int osc_read_locations(struct osc_env *e, struct osc_str *out, struct osc_read_locations_arg *args); -int osc_read_load_balancers(struct osc_env *e, struct osc_str *out, struct osc_read_load_balancers_arg *args); -int osc_read_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct osc_read_load_balancer_tags_arg *args); -int osc_read_listener_rules(struct osc_env *e, struct osc_str *out, struct osc_read_listener_rules_arg *args); -int osc_read_linked_policies(struct osc_env *e, struct osc_str *out, struct osc_read_linked_policies_arg *args); -int osc_read_keypairs(struct osc_env *e, struct osc_str *out, struct osc_read_keypairs_arg *args); -int osc_read_internet_services(struct osc_env *e, struct osc_str *out, struct osc_read_internet_services_arg *args); -int osc_read_images(struct osc_env *e, struct osc_str *out, struct osc_read_images_arg *args); -int osc_read_image_export_tasks(struct osc_env *e, struct osc_str *out, struct osc_read_image_export_tasks_arg *args); -int osc_read_flexible_gpus(struct osc_env *e, struct osc_str *out, struct osc_read_flexible_gpus_arg *args); -int osc_read_flexible_gpu_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_flexible_gpu_catalog_arg *args); -int osc_read_entities_linked_to_policy(struct osc_env *e, struct osc_str *out, struct osc_read_entities_linked_to_policy_arg *args); -int osc_read_direct_links(struct osc_env *e, struct osc_str *out, struct osc_read_direct_links_arg *args); -int osc_read_direct_link_interfaces(struct osc_env *e, struct osc_str *out, struct osc_read_direct_link_interfaces_arg *args); -int osc_read_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_read_dhcp_options_arg *args); -int osc_read_dedicated_groups(struct osc_env *e, struct osc_str *out, struct osc_read_dedicated_groups_arg *args); -int osc_read_consumption_account(struct osc_env *e, struct osc_str *out, struct osc_read_consumption_account_arg *args); -int osc_read_console_output(struct osc_env *e, struct osc_str *out, struct osc_read_console_output_arg *args); -int osc_read_client_gateways(struct osc_env *e, struct osc_str *out, struct osc_read_client_gateways_arg *args); -int osc_read_catalogs(struct osc_env *e, struct osc_str *out, struct osc_read_catalogs_arg *args); -int osc_read_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_catalog_arg *args); -int osc_read_cas(struct osc_env *e, struct osc_str *out, struct osc_read_cas_arg *args); -int osc_read_api_logs(struct osc_env *e, struct osc_str *out, struct osc_read_api_logs_arg *args); -int osc_read_api_access_rules(struct osc_env *e, struct osc_str *out, struct osc_read_api_access_rules_arg *args); -int osc_read_api_access_policy(struct osc_env *e, struct osc_str *out, struct osc_read_api_access_policy_arg *args); -int osc_read_admin_password(struct osc_env *e, struct osc_str *out, struct osc_read_admin_password_arg *args); -int osc_read_accounts(struct osc_env *e, struct osc_str *out, struct osc_read_accounts_arg *args); -int osc_read_access_keys(struct osc_env *e, struct osc_str *out, struct osc_read_access_keys_arg *args); -int osc_put_user_group_policy(struct osc_env *e, struct osc_str *out, struct osc_put_user_group_policy_arg *args); -int osc_link_volume(struct osc_env *e, struct osc_str *out, struct osc_link_volume_arg *args); -int osc_link_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_link_virtual_gateway_arg *args); -int osc_link_route_table(struct osc_env *e, struct osc_str *out, struct osc_link_route_table_arg *args); -int osc_link_public_ip(struct osc_env *e, struct osc_str *out, struct osc_link_public_ip_arg *args); -int osc_link_private_ips(struct osc_env *e, struct osc_str *out, struct osc_link_private_ips_arg *args); -int osc_link_policy(struct osc_env *e, struct osc_str *out, struct osc_link_policy_arg *args); -int osc_link_nic(struct osc_env *e, struct osc_str *out, struct osc_link_nic_arg *args); -int osc_link_managed_policy_to_user_group(struct osc_env *e, struct osc_str *out, struct osc_link_managed_policy_to_user_group_arg *args); -int osc_link_load_balancer_backend_machines(struct osc_env *e, struct osc_str *out, struct osc_link_load_balancer_backend_machines_arg *args); -int osc_link_internet_service(struct osc_env *e, struct osc_str *out, struct osc_link_internet_service_arg *args); -int osc_link_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_link_flexible_gpu_arg *args); -int osc_deregister_vms_in_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_deregister_vms_in_load_balancer_arg *args); -int osc_delete_vpn_connection_route(struct osc_env *e, struct osc_str *out, struct osc_delete_vpn_connection_route_arg *args); -int osc_delete_vpn_connection(struct osc_env *e, struct osc_str *out, struct osc_delete_vpn_connection_arg *args); -int osc_delete_volume(struct osc_env *e, struct osc_str *out, struct osc_delete_volume_arg *args); -int osc_delete_vms(struct osc_env *e, struct osc_str *out, struct osc_delete_vms_arg *args); -int osc_delete_vm_template(struct osc_env *e, struct osc_str *out, struct osc_delete_vm_template_arg *args); -int osc_delete_vm_group(struct osc_env *e, struct osc_str *out, struct osc_delete_vm_group_arg *args); -int osc_delete_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_delete_virtual_gateway_arg *args); +int osc_accept_net_peering(struct osc_env *e, struct osc_str *out, struct osc_accept_net_peering_arg *args); +int osc_add_user_to_user_group(struct osc_env *e, struct osc_str *out, struct osc_add_user_to_user_group_arg *args); +int osc_check_authentication(struct osc_env *e, struct osc_str *out, struct osc_check_authentication_arg *args); +int osc_create_access_key(struct osc_env *e, struct osc_str *out, struct osc_create_access_key_arg *args); +int osc_create_account(struct osc_env *e, struct osc_str *out, struct osc_create_account_arg *args); +int osc_create_api_access_rule(struct osc_env *e, struct osc_str *out, struct osc_create_api_access_rule_arg *args); +int osc_create_ca(struct osc_env *e, struct osc_str *out, struct osc_create_ca_arg *args); +int osc_create_client_gateway(struct osc_env *e, struct osc_str *out, struct osc_create_client_gateway_arg *args); +int osc_create_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_create_dedicated_group_arg *args); +int osc_create_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_create_dhcp_options_arg *args); +int osc_create_direct_link_interface(struct osc_env *e, struct osc_str *out, struct osc_create_direct_link_interface_arg *args); +int osc_create_direct_link(struct osc_env *e, struct osc_str *out, struct osc_create_direct_link_arg *args); +int osc_create_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_create_flexible_gpu_arg *args); +int osc_create_image_export_task(struct osc_env *e, struct osc_str *out, struct osc_create_image_export_task_arg *args); +int osc_create_image(struct osc_env *e, struct osc_str *out, struct osc_create_image_arg *args); +int osc_create_internet_service(struct osc_env *e, struct osc_str *out, struct osc_create_internet_service_arg *args); +int osc_create_keypair(struct osc_env *e, struct osc_str *out, struct osc_create_keypair_arg *args); +int osc_create_listener_rule(struct osc_env *e, struct osc_str *out, struct osc_create_listener_rule_arg *args); +int osc_create_load_balancer_listeners(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_listeners_arg *args); +int osc_create_load_balancer_policy(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_policy_arg *args); +int osc_create_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_arg *args); +int osc_create_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_tags_arg *args); +int osc_create_nat_service(struct osc_env *e, struct osc_str *out, struct osc_create_nat_service_arg *args); +int osc_create_net_access_point(struct osc_env *e, struct osc_str *out, struct osc_create_net_access_point_arg *args); +int osc_create_net_peering(struct osc_env *e, struct osc_str *out, struct osc_create_net_peering_arg *args); +int osc_create_net(struct osc_env *e, struct osc_str *out, struct osc_create_net_arg *args); +int osc_create_nic(struct osc_env *e, struct osc_str *out, struct osc_create_nic_arg *args); +int osc_create_policy(struct osc_env *e, struct osc_str *out, struct osc_create_policy_arg *args); +int osc_create_policy_version(struct osc_env *e, struct osc_str *out, struct osc_create_policy_version_arg *args); +int osc_create_product_type(struct osc_env *e, struct osc_str *out, struct osc_create_product_type_arg *args); +int osc_create_public_ip(struct osc_env *e, struct osc_str *out, struct osc_create_public_ip_arg *args); +int osc_create_route(struct osc_env *e, struct osc_str *out, struct osc_create_route_arg *args); +int osc_create_route_table(struct osc_env *e, struct osc_str *out, struct osc_create_route_table_arg *args); +int osc_create_security_group(struct osc_env *e, struct osc_str *out, struct osc_create_security_group_arg *args); +int osc_create_security_group_rule(struct osc_env *e, struct osc_str *out, struct osc_create_security_group_rule_arg *args); +int osc_create_server_certificate(struct osc_env *e, struct osc_str *out, struct osc_create_server_certificate_arg *args); +int osc_create_snapshot_export_task(struct osc_env *e, struct osc_str *out, struct osc_create_snapshot_export_task_arg *args); +int osc_create_snapshot(struct osc_env *e, struct osc_str *out, struct osc_create_snapshot_arg *args); +int osc_create_subnet(struct osc_env *e, struct osc_str *out, struct osc_create_subnet_arg *args); +int osc_create_tags(struct osc_env *e, struct osc_str *out, struct osc_create_tags_arg *args); +int osc_create_user_group(struct osc_env *e, struct osc_str *out, struct osc_create_user_group_arg *args); +int osc_create_user(struct osc_env *e, struct osc_str *out, struct osc_create_user_arg *args); +int osc_create_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_create_virtual_gateway_arg *args); +int osc_create_vm_group(struct osc_env *e, struct osc_str *out, struct osc_create_vm_group_arg *args); +int osc_create_vm_template(struct osc_env *e, struct osc_str *out, struct osc_create_vm_template_arg *args); +int osc_create_vms(struct osc_env *e, struct osc_str *out, struct osc_create_vms_arg *args); +int osc_create_volume(struct osc_env *e, struct osc_str *out, struct osc_create_volume_arg *args); +int osc_create_vpn_connection(struct osc_env *e, struct osc_str *out, struct osc_create_vpn_connection_arg *args); +int osc_create_vpn_connection_route(struct osc_env *e, struct osc_str *out, struct osc_create_vpn_connection_route_arg *args); +int osc_delete_access_key(struct osc_env *e, struct osc_str *out, struct osc_delete_access_key_arg *args); +int osc_delete_api_access_rule(struct osc_env *e, struct osc_str *out, struct osc_delete_api_access_rule_arg *args); +int osc_delete_ca(struct osc_env *e, struct osc_str *out, struct osc_delete_ca_arg *args); +int osc_delete_client_gateway(struct osc_env *e, struct osc_str *out, struct osc_delete_client_gateway_arg *args); +int osc_delete_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_delete_dedicated_group_arg *args); +int osc_delete_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_delete_dhcp_options_arg *args); +int osc_delete_direct_link_interface(struct osc_env *e, struct osc_str *out, struct osc_delete_direct_link_interface_arg *args); +int osc_delete_direct_link(struct osc_env *e, struct osc_str *out, struct osc_delete_direct_link_arg *args); +int osc_delete_export_task(struct osc_env *e, struct osc_str *out, struct osc_delete_export_task_arg *args); +int osc_delete_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_delete_flexible_gpu_arg *args); +int osc_delete_image(struct osc_env *e, struct osc_str *out, struct osc_delete_image_arg *args); +int osc_delete_internet_service(struct osc_env *e, struct osc_str *out, struct osc_delete_internet_service_arg *args); +int osc_delete_keypair(struct osc_env *e, struct osc_str *out, struct osc_delete_keypair_arg *args); +int osc_delete_listener_rule(struct osc_env *e, struct osc_str *out, struct osc_delete_listener_rule_arg *args); +int osc_delete_load_balancer_listeners(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_listeners_arg *args); +int osc_delete_load_balancer_policy(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_policy_arg *args); +int osc_delete_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_arg *args); +int osc_delete_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_tags_arg *args); +int osc_delete_nat_service(struct osc_env *e, struct osc_str *out, struct osc_delete_nat_service_arg *args); +int osc_delete_net_access_point(struct osc_env *e, struct osc_str *out, struct osc_delete_net_access_point_arg *args); +int osc_delete_net_peering(struct osc_env *e, struct osc_str *out, struct osc_delete_net_peering_arg *args); +int osc_delete_net(struct osc_env *e, struct osc_str *out, struct osc_delete_net_arg *args); +int osc_delete_nic(struct osc_env *e, struct osc_str *out, struct osc_delete_nic_arg *args); +int osc_delete_policy(struct osc_env *e, struct osc_str *out, struct osc_delete_policy_arg *args); +int osc_delete_policy_version(struct osc_env *e, struct osc_str *out, struct osc_delete_policy_version_arg *args); +int osc_delete_public_ip(struct osc_env *e, struct osc_str *out, struct osc_delete_public_ip_arg *args); +int osc_delete_route(struct osc_env *e, struct osc_str *out, struct osc_delete_route_arg *args); +int osc_delete_route_table(struct osc_env *e, struct osc_str *out, struct osc_delete_route_table_arg *args); +int osc_delete_security_group(struct osc_env *e, struct osc_str *out, struct osc_delete_security_group_arg *args); +int osc_delete_security_group_rule(struct osc_env *e, struct osc_str *out, struct osc_delete_security_group_rule_arg *args); +int osc_delete_server_certificate(struct osc_env *e, struct osc_str *out, struct osc_delete_server_certificate_arg *args); +int osc_delete_snapshot(struct osc_env *e, struct osc_str *out, struct osc_delete_snapshot_arg *args); +int osc_delete_subnet(struct osc_env *e, struct osc_str *out, struct osc_delete_subnet_arg *args); +int osc_delete_tags(struct osc_env *e, struct osc_str *out, struct osc_delete_tags_arg *args); int osc_delete_user_group_policy(struct osc_env *e, struct osc_str *out, struct osc_delete_user_group_policy_arg *args); int osc_delete_user_group(struct osc_env *e, struct osc_str *out, struct osc_delete_user_group_arg *args); int osc_delete_user(struct osc_env *e, struct osc_str *out, struct osc_delete_user_arg *args); -int osc_delete_tags(struct osc_env *e, struct osc_str *out, struct osc_delete_tags_arg *args); -int osc_delete_subnet(struct osc_env *e, struct osc_str *out, struct osc_delete_subnet_arg *args); -int osc_delete_snapshot(struct osc_env *e, struct osc_str *out, struct osc_delete_snapshot_arg *args); -int osc_delete_server_certificate(struct osc_env *e, struct osc_str *out, struct osc_delete_server_certificate_arg *args); -int osc_delete_security_group_rule(struct osc_env *e, struct osc_str *out, struct osc_delete_security_group_rule_arg *args); -int osc_delete_security_group(struct osc_env *e, struct osc_str *out, struct osc_delete_security_group_arg *args); -int osc_delete_route_table(struct osc_env *e, struct osc_str *out, struct osc_delete_route_table_arg *args); -int osc_delete_route(struct osc_env *e, struct osc_str *out, struct osc_delete_route_arg *args); -int osc_delete_public_ip(struct osc_env *e, struct osc_str *out, struct osc_delete_public_ip_arg *args); -int osc_delete_policy_version(struct osc_env *e, struct osc_str *out, struct osc_delete_policy_version_arg *args); -int osc_delete_policy(struct osc_env *e, struct osc_str *out, struct osc_delete_policy_arg *args); -int osc_delete_nic(struct osc_env *e, struct osc_str *out, struct osc_delete_nic_arg *args); -int osc_delete_net_peering(struct osc_env *e, struct osc_str *out, struct osc_delete_net_peering_arg *args); -int osc_delete_net_access_point(struct osc_env *e, struct osc_str *out, struct osc_delete_net_access_point_arg *args); -int osc_delete_net(struct osc_env *e, struct osc_str *out, struct osc_delete_net_arg *args); -int osc_delete_nat_service(struct osc_env *e, struct osc_str *out, struct osc_delete_nat_service_arg *args); -int osc_delete_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_tags_arg *args); -int osc_delete_load_balancer_policy(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_policy_arg *args); -int osc_delete_load_balancer_listeners(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_listeners_arg *args); -int osc_delete_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_delete_load_balancer_arg *args); -int osc_delete_listener_rule(struct osc_env *e, struct osc_str *out, struct osc_delete_listener_rule_arg *args); -int osc_delete_keypair(struct osc_env *e, struct osc_str *out, struct osc_delete_keypair_arg *args); -int osc_delete_internet_service(struct osc_env *e, struct osc_str *out, struct osc_delete_internet_service_arg *args); -int osc_delete_image(struct osc_env *e, struct osc_str *out, struct osc_delete_image_arg *args); -int osc_delete_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_delete_flexible_gpu_arg *args); -int osc_delete_export_task(struct osc_env *e, struct osc_str *out, struct osc_delete_export_task_arg *args); -int osc_delete_direct_link_interface(struct osc_env *e, struct osc_str *out, struct osc_delete_direct_link_interface_arg *args); -int osc_delete_direct_link(struct osc_env *e, struct osc_str *out, struct osc_delete_direct_link_arg *args); -int osc_delete_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_delete_dhcp_options_arg *args); -int osc_delete_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_delete_dedicated_group_arg *args); -int osc_delete_client_gateway(struct osc_env *e, struct osc_str *out, struct osc_delete_client_gateway_arg *args); -int osc_delete_ca(struct osc_env *e, struct osc_str *out, struct osc_delete_ca_arg *args); -int osc_delete_api_access_rule(struct osc_env *e, struct osc_str *out, struct osc_delete_api_access_rule_arg *args); -int osc_delete_access_key(struct osc_env *e, struct osc_str *out, struct osc_delete_access_key_arg *args); -int osc_create_vpn_connection_route(struct osc_env *e, struct osc_str *out, struct osc_create_vpn_connection_route_arg *args); -int osc_create_vpn_connection(struct osc_env *e, struct osc_str *out, struct osc_create_vpn_connection_arg *args); -int osc_create_volume(struct osc_env *e, struct osc_str *out, struct osc_create_volume_arg *args); -int osc_create_vms(struct osc_env *e, struct osc_str *out, struct osc_create_vms_arg *args); -int osc_create_vm_template(struct osc_env *e, struct osc_str *out, struct osc_create_vm_template_arg *args); -int osc_create_vm_group(struct osc_env *e, struct osc_str *out, struct osc_create_vm_group_arg *args); -int osc_create_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_create_virtual_gateway_arg *args); -int osc_create_user_group(struct osc_env *e, struct osc_str *out, struct osc_create_user_group_arg *args); -int osc_create_user(struct osc_env *e, struct osc_str *out, struct osc_create_user_arg *args); -int osc_create_tags(struct osc_env *e, struct osc_str *out, struct osc_create_tags_arg *args); -int osc_create_subnet(struct osc_env *e, struct osc_str *out, struct osc_create_subnet_arg *args); -int osc_create_snapshot_export_task(struct osc_env *e, struct osc_str *out, struct osc_create_snapshot_export_task_arg *args); -int osc_create_snapshot(struct osc_env *e, struct osc_str *out, struct osc_create_snapshot_arg *args); -int osc_create_server_certificate(struct osc_env *e, struct osc_str *out, struct osc_create_server_certificate_arg *args); -int osc_create_security_group_rule(struct osc_env *e, struct osc_str *out, struct osc_create_security_group_rule_arg *args); -int osc_create_security_group(struct osc_env *e, struct osc_str *out, struct osc_create_security_group_arg *args); -int osc_create_route_table(struct osc_env *e, struct osc_str *out, struct osc_create_route_table_arg *args); -int osc_create_route(struct osc_env *e, struct osc_str *out, struct osc_create_route_arg *args); -int osc_create_public_ip(struct osc_env *e, struct osc_str *out, struct osc_create_public_ip_arg *args); -int osc_create_product_type(struct osc_env *e, struct osc_str *out, struct osc_create_product_type_arg *args); -int osc_create_policy_version(struct osc_env *e, struct osc_str *out, struct osc_create_policy_version_arg *args); -int osc_create_policy(struct osc_env *e, struct osc_str *out, struct osc_create_policy_arg *args); -int osc_create_nic(struct osc_env *e, struct osc_str *out, struct osc_create_nic_arg *args); -int osc_create_net_peering(struct osc_env *e, struct osc_str *out, struct osc_create_net_peering_arg *args); -int osc_create_net_access_point(struct osc_env *e, struct osc_str *out, struct osc_create_net_access_point_arg *args); -int osc_create_net(struct osc_env *e, struct osc_str *out, struct osc_create_net_arg *args); -int osc_create_nat_service(struct osc_env *e, struct osc_str *out, struct osc_create_nat_service_arg *args); -int osc_create_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_tags_arg *args); -int osc_create_load_balancer_policy(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_policy_arg *args); -int osc_create_load_balancer_listeners(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_listeners_arg *args); -int osc_create_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_create_load_balancer_arg *args); -int osc_create_listener_rule(struct osc_env *e, struct osc_str *out, struct osc_create_listener_rule_arg *args); -int osc_create_keypair(struct osc_env *e, struct osc_str *out, struct osc_create_keypair_arg *args); -int osc_create_internet_service(struct osc_env *e, struct osc_str *out, struct osc_create_internet_service_arg *args); -int osc_create_image_export_task(struct osc_env *e, struct osc_str *out, struct osc_create_image_export_task_arg *args); -int osc_create_image(struct osc_env *e, struct osc_str *out, struct osc_create_image_arg *args); -int osc_create_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_create_flexible_gpu_arg *args); -int osc_create_direct_link_interface(struct osc_env *e, struct osc_str *out, struct osc_create_direct_link_interface_arg *args); -int osc_create_direct_link(struct osc_env *e, struct osc_str *out, struct osc_create_direct_link_arg *args); -int osc_create_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_create_dhcp_options_arg *args); -int osc_create_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_create_dedicated_group_arg *args); -int osc_create_client_gateway(struct osc_env *e, struct osc_str *out, struct osc_create_client_gateway_arg *args); -int osc_create_ca(struct osc_env *e, struct osc_str *out, struct osc_create_ca_arg *args); -int osc_create_api_access_rule(struct osc_env *e, struct osc_str *out, struct osc_create_api_access_rule_arg *args); -int osc_create_account(struct osc_env *e, struct osc_str *out, struct osc_create_account_arg *args); -int osc_create_access_key(struct osc_env *e, struct osc_str *out, struct osc_create_access_key_arg *args); -int osc_check_authentication(struct osc_env *e, struct osc_str *out, struct osc_check_authentication_arg *args); -int osc_add_user_to_user_group(struct osc_env *e, struct osc_str *out, struct osc_add_user_to_user_group_arg *args); -int osc_accept_net_peering(struct osc_env *e, struct osc_str *out, struct osc_accept_net_peering_arg *args); +int osc_delete_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_delete_virtual_gateway_arg *args); +int osc_delete_vm_group(struct osc_env *e, struct osc_str *out, struct osc_delete_vm_group_arg *args); +int osc_delete_vm_template(struct osc_env *e, struct osc_str *out, struct osc_delete_vm_template_arg *args); +int osc_delete_vms(struct osc_env *e, struct osc_str *out, struct osc_delete_vms_arg *args); +int osc_delete_volume(struct osc_env *e, struct osc_str *out, struct osc_delete_volume_arg *args); +int osc_delete_vpn_connection(struct osc_env *e, struct osc_str *out, struct osc_delete_vpn_connection_arg *args); +int osc_delete_vpn_connection_route(struct osc_env *e, struct osc_str *out, struct osc_delete_vpn_connection_route_arg *args); +int osc_deregister_vms_in_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_deregister_vms_in_load_balancer_arg *args); +int osc_link_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_link_flexible_gpu_arg *args); +int osc_link_internet_service(struct osc_env *e, struct osc_str *out, struct osc_link_internet_service_arg *args); +int osc_link_load_balancer_backend_machines(struct osc_env *e, struct osc_str *out, struct osc_link_load_balancer_backend_machines_arg *args); +int osc_link_managed_policy_to_user_group(struct osc_env *e, struct osc_str *out, struct osc_link_managed_policy_to_user_group_arg *args); +int osc_link_nic(struct osc_env *e, struct osc_str *out, struct osc_link_nic_arg *args); +int osc_link_policy(struct osc_env *e, struct osc_str *out, struct osc_link_policy_arg *args); +int osc_link_private_ips(struct osc_env *e, struct osc_str *out, struct osc_link_private_ips_arg *args); +int osc_link_public_ip(struct osc_env *e, struct osc_str *out, struct osc_link_public_ip_arg *args); +int osc_link_route_table(struct osc_env *e, struct osc_str *out, struct osc_link_route_table_arg *args); +int osc_link_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_link_virtual_gateway_arg *args); +int osc_link_volume(struct osc_env *e, struct osc_str *out, struct osc_link_volume_arg *args); +int osc_put_user_group_policy(struct osc_env *e, struct osc_str *out, struct osc_put_user_group_policy_arg *args); +int osc_read_access_keys(struct osc_env *e, struct osc_str *out, struct osc_read_access_keys_arg *args); +int osc_read_accounts(struct osc_env *e, struct osc_str *out, struct osc_read_accounts_arg *args); +int osc_read_admin_password(struct osc_env *e, struct osc_str *out, struct osc_read_admin_password_arg *args); +int osc_read_api_access_policy(struct osc_env *e, struct osc_str *out, struct osc_read_api_access_policy_arg *args); +int osc_read_api_access_rules(struct osc_env *e, struct osc_str *out, struct osc_read_api_access_rules_arg *args); +int osc_read_api_logs(struct osc_env *e, struct osc_str *out, struct osc_read_api_logs_arg *args); +int osc_read_cas(struct osc_env *e, struct osc_str *out, struct osc_read_cas_arg *args); +int osc_read_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_catalog_arg *args); +int osc_read_catalogs(struct osc_env *e, struct osc_str *out, struct osc_read_catalogs_arg *args); +int osc_read_client_gateways(struct osc_env *e, struct osc_str *out, struct osc_read_client_gateways_arg *args); +int osc_read_console_output(struct osc_env *e, struct osc_str *out, struct osc_read_console_output_arg *args); +int osc_read_consumption_account(struct osc_env *e, struct osc_str *out, struct osc_read_consumption_account_arg *args); +int osc_read_dedicated_groups(struct osc_env *e, struct osc_str *out, struct osc_read_dedicated_groups_arg *args); +int osc_read_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_read_dhcp_options_arg *args); +int osc_read_direct_link_interfaces(struct osc_env *e, struct osc_str *out, struct osc_read_direct_link_interfaces_arg *args); +int osc_read_direct_links(struct osc_env *e, struct osc_str *out, struct osc_read_direct_links_arg *args); +int osc_read_entities_linked_to_policy(struct osc_env *e, struct osc_str *out, struct osc_read_entities_linked_to_policy_arg *args); +int osc_read_flexible_gpu_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_flexible_gpu_catalog_arg *args); +int osc_read_flexible_gpus(struct osc_env *e, struct osc_str *out, struct osc_read_flexible_gpus_arg *args); +int osc_read_image_export_tasks(struct osc_env *e, struct osc_str *out, struct osc_read_image_export_tasks_arg *args); +int osc_read_images(struct osc_env *e, struct osc_str *out, struct osc_read_images_arg *args); +int osc_read_internet_services(struct osc_env *e, struct osc_str *out, struct osc_read_internet_services_arg *args); +int osc_read_keypairs(struct osc_env *e, struct osc_str *out, struct osc_read_keypairs_arg *args); +int osc_read_linked_policies(struct osc_env *e, struct osc_str *out, struct osc_read_linked_policies_arg *args); +int osc_read_listener_rules(struct osc_env *e, struct osc_str *out, struct osc_read_listener_rules_arg *args); +int osc_read_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct osc_read_load_balancer_tags_arg *args); +int osc_read_load_balancers(struct osc_env *e, struct osc_str *out, struct osc_read_load_balancers_arg *args); +int osc_read_locations(struct osc_env *e, struct osc_str *out, struct osc_read_locations_arg *args); +int osc_read_managed_policies_linked_to_user_group(struct osc_env *e, struct osc_str *out, struct osc_read_managed_policies_linked_to_user_group_arg *args); +int osc_read_nat_services(struct osc_env *e, struct osc_str *out, struct osc_read_nat_services_arg *args); +int osc_read_net_access_point_services(struct osc_env *e, struct osc_str *out, struct osc_read_net_access_point_services_arg *args); +int osc_read_net_access_points(struct osc_env *e, struct osc_str *out, struct osc_read_net_access_points_arg *args); +int osc_read_net_peerings(struct osc_env *e, struct osc_str *out, struct osc_read_net_peerings_arg *args); +int osc_read_nets(struct osc_env *e, struct osc_str *out, struct osc_read_nets_arg *args); +int osc_read_nics(struct osc_env *e, struct osc_str *out, struct osc_read_nics_arg *args); +int osc_read_policies(struct osc_env *e, struct osc_str *out, struct osc_read_policies_arg *args); +int osc_read_policy(struct osc_env *e, struct osc_str *out, struct osc_read_policy_arg *args); +int osc_read_policy_version(struct osc_env *e, struct osc_str *out, struct osc_read_policy_version_arg *args); +int osc_read_policy_versions(struct osc_env *e, struct osc_str *out, struct osc_read_policy_versions_arg *args); +int osc_read_product_types(struct osc_env *e, struct osc_str *out, struct osc_read_product_types_arg *args); +int osc_read_public_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_public_catalog_arg *args); +int osc_read_public_ip_ranges(struct osc_env *e, struct osc_str *out, struct osc_read_public_ip_ranges_arg *args); +int osc_read_public_ips(struct osc_env *e, struct osc_str *out, struct osc_read_public_ips_arg *args); +int osc_read_quotas(struct osc_env *e, struct osc_str *out, struct osc_read_quotas_arg *args); +int osc_read_regions(struct osc_env *e, struct osc_str *out, struct osc_read_regions_arg *args); +int osc_read_route_tables(struct osc_env *e, struct osc_str *out, struct osc_read_route_tables_arg *args); +int osc_read_secret_access_key(struct osc_env *e, struct osc_str *out, struct osc_read_secret_access_key_arg *args); +int osc_read_security_groups(struct osc_env *e, struct osc_str *out, struct osc_read_security_groups_arg *args); +int osc_read_server_certificates(struct osc_env *e, struct osc_str *out, struct osc_read_server_certificates_arg *args); +int osc_read_snapshot_export_tasks(struct osc_env *e, struct osc_str *out, struct osc_read_snapshot_export_tasks_arg *args); +int osc_read_snapshots(struct osc_env *e, struct osc_str *out, struct osc_read_snapshots_arg *args); +int osc_read_subnets(struct osc_env *e, struct osc_str *out, struct osc_read_subnets_arg *args); +int osc_read_subregions(struct osc_env *e, struct osc_str *out, struct osc_read_subregions_arg *args); +int osc_read_tags(struct osc_env *e, struct osc_str *out, struct osc_read_tags_arg *args); +int osc_read_unit_price(struct osc_env *e, struct osc_str *out, struct osc_read_unit_price_arg *args); +int osc_read_user_group_policies(struct osc_env *e, struct osc_str *out, struct osc_read_user_group_policies_arg *args); +int osc_read_user_group_policy(struct osc_env *e, struct osc_str *out, struct osc_read_user_group_policy_arg *args); +int osc_read_user_group(struct osc_env *e, struct osc_str *out, struct osc_read_user_group_arg *args); +int osc_read_user_groups_per_user(struct osc_env *e, struct osc_str *out, struct osc_read_user_groups_per_user_arg *args); +int osc_read_user_groups(struct osc_env *e, struct osc_str *out, struct osc_read_user_groups_arg *args); +int osc_read_users(struct osc_env *e, struct osc_str *out, struct osc_read_users_arg *args); +int osc_read_virtual_gateways(struct osc_env *e, struct osc_str *out, struct osc_read_virtual_gateways_arg *args); +int osc_read_vm_groups(struct osc_env *e, struct osc_str *out, struct osc_read_vm_groups_arg *args); +int osc_read_vm_templates(struct osc_env *e, struct osc_str *out, struct osc_read_vm_templates_arg *args); +int osc_read_vm_types(struct osc_env *e, struct osc_str *out, struct osc_read_vm_types_arg *args); +int osc_read_vms_health(struct osc_env *e, struct osc_str *out, struct osc_read_vms_health_arg *args); +int osc_read_vms(struct osc_env *e, struct osc_str *out, struct osc_read_vms_arg *args); +int osc_read_vms_state(struct osc_env *e, struct osc_str *out, struct osc_read_vms_state_arg *args); +int osc_read_volumes(struct osc_env *e, struct osc_str *out, struct osc_read_volumes_arg *args); +int osc_read_vpn_connections(struct osc_env *e, struct osc_str *out, struct osc_read_vpn_connections_arg *args); +int osc_reboot_vms(struct osc_env *e, struct osc_str *out, struct osc_reboot_vms_arg *args); +int osc_register_vms_in_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_register_vms_in_load_balancer_arg *args); +int osc_reject_net_peering(struct osc_env *e, struct osc_str *out, struct osc_reject_net_peering_arg *args); +int osc_remove_user_from_user_group(struct osc_env *e, struct osc_str *out, struct osc_remove_user_from_user_group_arg *args); +int osc_scale_down_vm_group(struct osc_env *e, struct osc_str *out, struct osc_scale_down_vm_group_arg *args); +int osc_scale_up_vm_group(struct osc_env *e, struct osc_str *out, struct osc_scale_up_vm_group_arg *args); +int osc_set_default_policy_version(struct osc_env *e, struct osc_str *out, struct osc_set_default_policy_version_arg *args); +int osc_start_vms(struct osc_env *e, struct osc_str *out, struct osc_start_vms_arg *args); +int osc_stop_vms(struct osc_env *e, struct osc_str *out, struct osc_stop_vms_arg *args); +int osc_unlink_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_unlink_flexible_gpu_arg *args); +int osc_unlink_internet_service(struct osc_env *e, struct osc_str *out, struct osc_unlink_internet_service_arg *args); +int osc_unlink_load_balancer_backend_machines(struct osc_env *e, struct osc_str *out, struct osc_unlink_load_balancer_backend_machines_arg *args); +int osc_unlink_managed_policy_from_user_group(struct osc_env *e, struct osc_str *out, struct osc_unlink_managed_policy_from_user_group_arg *args); +int osc_unlink_nic(struct osc_env *e, struct osc_str *out, struct osc_unlink_nic_arg *args); +int osc_unlink_policy(struct osc_env *e, struct osc_str *out, struct osc_unlink_policy_arg *args); +int osc_unlink_private_ips(struct osc_env *e, struct osc_str *out, struct osc_unlink_private_ips_arg *args); +int osc_unlink_public_ip(struct osc_env *e, struct osc_str *out, struct osc_unlink_public_ip_arg *args); +int osc_unlink_route_table(struct osc_env *e, struct osc_str *out, struct osc_unlink_route_table_arg *args); +int osc_unlink_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_unlink_virtual_gateway_arg *args); +int osc_unlink_volume(struct osc_env *e, struct osc_str *out, struct osc_unlink_volume_arg *args); +int osc_update_access_key(struct osc_env *e, struct osc_str *out, struct osc_update_access_key_arg *args); +int osc_update_account(struct osc_env *e, struct osc_str *out, struct osc_update_account_arg *args); +int osc_update_api_access_policy(struct osc_env *e, struct osc_str *out, struct osc_update_api_access_policy_arg *args); +int osc_update_api_access_rule(struct osc_env *e, struct osc_str *out, struct osc_update_api_access_rule_arg *args); +int osc_update_ca(struct osc_env *e, struct osc_str *out, struct osc_update_ca_arg *args); +int osc_update_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_update_dedicated_group_arg *args); +int osc_update_direct_link_interface(struct osc_env *e, struct osc_str *out, struct osc_update_direct_link_interface_arg *args); +int osc_update_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_update_flexible_gpu_arg *args); +int osc_update_image(struct osc_env *e, struct osc_str *out, struct osc_update_image_arg *args); +int osc_update_listener_rule(struct osc_env *e, struct osc_str *out, struct osc_update_listener_rule_arg *args); +int osc_update_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_update_load_balancer_arg *args); +int osc_update_net_access_point(struct osc_env *e, struct osc_str *out, struct osc_update_net_access_point_arg *args); +int osc_update_net(struct osc_env *e, struct osc_str *out, struct osc_update_net_arg *args); +int osc_update_nic(struct osc_env *e, struct osc_str *out, struct osc_update_nic_arg *args); +int osc_update_route_propagation(struct osc_env *e, struct osc_str *out, struct osc_update_route_propagation_arg *args); +int osc_update_route(struct osc_env *e, struct osc_str *out, struct osc_update_route_arg *args); +int osc_update_route_table_link(struct osc_env *e, struct osc_str *out, struct osc_update_route_table_link_arg *args); +int osc_update_server_certificate(struct osc_env *e, struct osc_str *out, struct osc_update_server_certificate_arg *args); +int osc_update_snapshot(struct osc_env *e, struct osc_str *out, struct osc_update_snapshot_arg *args); +int osc_update_subnet(struct osc_env *e, struct osc_str *out, struct osc_update_subnet_arg *args); +int osc_update_user_group(struct osc_env *e, struct osc_str *out, struct osc_update_user_group_arg *args); +int osc_update_user(struct osc_env *e, struct osc_str *out, struct osc_update_user_arg *args); +int osc_update_vm_group(struct osc_env *e, struct osc_str *out, struct osc_update_vm_group_arg *args); +int osc_update_vm(struct osc_env *e, struct osc_str *out, struct osc_update_vm_arg *args); +int osc_update_vm_template(struct osc_env *e, struct osc_str *out, struct osc_update_vm_template_arg *args); +int osc_update_volume(struct osc_env *e, struct osc_str *out, struct osc_update_volume_arg *args); +int osc_update_vpn_connection(struct osc_env *e, struct osc_str *out, struct osc_update_vpn_connection_arg *args); #ifdef __cplusplus }