ionoscloud 5.0.0 → 6.0.0.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/docs/AttachedVolumes.md +30 -0
- data/docs/BackupUnit.md +26 -0
- data/docs/BackupUnitProperties.md +22 -0
- data/docs/BackupUnitSSO.md +18 -0
- data/docs/BackupUnits.md +24 -0
- data/docs/BackupUnitsApi.md +594 -0
- data/docs/BalancedNics.md +30 -0
- data/docs/CHANGELOG.md +1 -0
- data/docs/Cdroms.md +30 -0
- data/docs/ConnectableDatacenter.md +22 -0
- data/docs/Contract.md +20 -0
- data/docs/ContractProperties.md +26 -0
- data/docs/ContractResourcesApi.md +89 -0
- data/docs/Contracts.md +24 -0
- data/docs/CpuArchitectureProperties.md +24 -0
- data/docs/DataCenterEntities.md +28 -0
- data/docs/DataCentersApi.md +516 -0
- data/docs/Datacenter.md +28 -0
- data/docs/DatacenterElementMetadata.md +32 -0
- data/docs/DatacenterProperties.md +30 -0
- data/docs/Datacenters.md +30 -0
- data/docs/DefaultApi.md +78 -0
- data/docs/Error.md +20 -0
- data/docs/ErrorMessage.md +20 -0
- data/docs/FirewallRule.md +26 -0
- data/docs/FirewallRules.md +30 -0
- data/docs/FirewallRulesApi.md +552 -0
- data/docs/FirewallruleProperties.md +36 -0
- data/docs/FlowLog.md +26 -0
- data/docs/FlowLogProperties.md +24 -0
- data/docs/FlowLogPut.md +24 -0
- data/docs/FlowLogs.md +30 -0
- data/docs/FlowLogsApi.md +540 -0
- data/docs/Group.md +26 -0
- data/docs/GroupEntities.md +20 -0
- data/docs/GroupMembers.md +24 -0
- data/docs/GroupProperties.md +42 -0
- data/docs/GroupShare.md +24 -0
- data/docs/GroupShareProperties.md +20 -0
- data/docs/GroupShares.md +24 -0
- data/docs/GroupUsers.md +24 -0
- data/docs/Groups.md +24 -0
- data/docs/IPBlocksApi.md +512 -0
- data/docs/IPFailover.md +20 -0
- data/docs/Image.md +26 -0
- data/docs/ImageProperties.md +54 -0
- data/docs/Images.md +24 -0
- data/docs/ImagesApi.md +428 -0
- data/docs/Info.md +22 -0
- data/docs/IpBlock.md +26 -0
- data/docs/IpBlockProperties.md +26 -0
- data/docs/IpBlocks.md +24 -0
- data/docs/IpConsumer.md +34 -0
- data/docs/KubernetesApi.md +1433 -0
- data/docs/KubernetesAutoScaling.md +20 -0
- data/docs/KubernetesCluster.md +28 -0
- data/docs/KubernetesClusterEntities.md +18 -0
- data/docs/KubernetesClusterForPost.md +28 -0
- data/docs/KubernetesClusterForPut.md +28 -0
- data/docs/KubernetesClusterProperties.md +30 -0
- data/docs/KubernetesClusterPropertiesForPost.md +26 -0
- data/docs/KubernetesClusterPropertiesForPut.md +22 -0
- data/docs/KubernetesClusters.md +24 -0
- data/docs/KubernetesMaintenanceWindow.md +20 -0
- data/docs/KubernetesNode.md +26 -0
- data/docs/KubernetesNodeMetadata.md +26 -0
- data/docs/KubernetesNodePool.md +26 -0
- data/docs/KubernetesNodePoolForPost.md +26 -0
- data/docs/KubernetesNodePoolForPut.md +26 -0
- data/docs/KubernetesNodePoolLan.md +22 -0
- data/docs/KubernetesNodePoolLanRoutes.md +20 -0
- data/docs/KubernetesNodePoolProperties.md +50 -0
- data/docs/KubernetesNodePoolPropertiesForPost.md +48 -0
- data/docs/KubernetesNodePoolPropertiesForPut.md +34 -0
- data/docs/KubernetesNodePools.md +24 -0
- data/docs/KubernetesNodeProperties.md +24 -0
- data/docs/KubernetesNodes.md +24 -0
- data/docs/Label.md +26 -0
- data/docs/LabelProperties.md +26 -0
- data/docs/LabelResource.md +26 -0
- data/docs/LabelResourceProperties.md +20 -0
- data/docs/LabelResources.md +30 -0
- data/docs/Labels.md +24 -0
- data/docs/LabelsApi.md +2346 -0
- data/docs/Lan.md +28 -0
- data/docs/LanEntities.md +18 -0
- data/docs/LanNics.md +30 -0
- data/docs/LanPost.md +28 -0
- data/docs/LanProperties.md +24 -0
- data/docs/LanPropertiesPost.md +24 -0
- data/docs/Lans.md +30 -0
- data/docs/LansApi.md +794 -0
- data/docs/LoadBalancersApi.md +885 -0
- data/docs/Loadbalancer.md +28 -0
- data/docs/LoadbalancerEntities.md +18 -0
- data/docs/LoadbalancerProperties.md +22 -0
- data/docs/Loadbalancers.md +30 -0
- data/docs/Location.md +26 -0
- data/docs/LocationProperties.md +24 -0
- data/docs/Locations.md +24 -0
- data/docs/LocationsApi.md +259 -0
- data/docs/NATGatewaysApi.md +1578 -0
- data/docs/NatGateway.md +28 -0
- data/docs/NatGatewayEntities.md +20 -0
- data/docs/NatGatewayLanProperties.md +20 -0
- data/docs/NatGatewayProperties.md +22 -0
- data/docs/NatGatewayPut.md +24 -0
- data/docs/NatGatewayRule.md +26 -0
- data/docs/NatGatewayRuleProperties.md +30 -0
- data/docs/NatGatewayRuleProtocol.md +15 -0
- data/docs/NatGatewayRulePut.md +24 -0
- data/docs/NatGatewayRuleType.md +15 -0
- data/docs/NatGatewayRules.md +24 -0
- data/docs/NatGateways.md +30 -0
- data/docs/NetworkInterfacesApi.md +540 -0
- data/docs/NetworkLoadBalancer.md +28 -0
- data/docs/NetworkLoadBalancerEntities.md +20 -0
- data/docs/NetworkLoadBalancerForwardingRule.md +26 -0
- data/docs/NetworkLoadBalancerForwardingRuleHealthCheck.md +26 -0
- data/docs/NetworkLoadBalancerForwardingRuleProperties.md +30 -0
- data/docs/NetworkLoadBalancerForwardingRulePut.md +24 -0
- data/docs/NetworkLoadBalancerForwardingRuleTarget.md +24 -0
- data/docs/NetworkLoadBalancerForwardingRuleTargetHealthCheck.md +22 -0
- data/docs/NetworkLoadBalancerForwardingRules.md +30 -0
- data/docs/NetworkLoadBalancerProperties.md +26 -0
- data/docs/NetworkLoadBalancerPut.md +24 -0
- data/docs/NetworkLoadBalancers.md +30 -0
- data/docs/NetworkLoadBalancersApi.md +1590 -0
- data/docs/Nic.md +28 -0
- data/docs/NicEntities.md +20 -0
- data/docs/NicProperties.md +34 -0
- data/docs/NicPut.md +24 -0
- data/docs/Nics.md +30 -0
- data/docs/NoStateMetaData.md +30 -0
- data/docs/PaginationLinks.md +22 -0
- data/docs/Peer.md +26 -0
- data/docs/PrivateCrossConnect.md +26 -0
- data/docs/PrivateCrossConnectProperties.md +24 -0
- data/docs/PrivateCrossConnects.md +24 -0
- data/docs/PrivateCrossConnectsApi.md +430 -0
- data/docs/README.md +111 -0
- data/docs/RemoteConsoleUrl.md +18 -0
- data/docs/Request.md +26 -0
- data/docs/RequestMetadata.md +24 -0
- data/docs/RequestProperties.md +24 -0
- data/docs/RequestStatus.md +24 -0
- data/docs/RequestStatusMetadata.md +24 -0
- data/docs/RequestTarget.md +20 -0
- data/docs/Requests.md +30 -0
- data/docs/RequestsApi.md +283 -0
- data/docs/Resource.md +28 -0
- data/docs/ResourceEntities.md +18 -0
- data/docs/ResourceGroups.md +24 -0
- data/docs/ResourceLimits.md +60 -0
- data/docs/ResourceProperties.md +20 -0
- data/docs/ResourceReference.md +22 -0
- data/docs/Resources.md +24 -0
- data/docs/ResourcesUsers.md +24 -0
- data/docs/S3Key.md +26 -0
- data/docs/S3KeyMetadata.md +20 -0
- data/docs/S3KeyProperties.md +20 -0
- data/docs/S3Keys.md +24 -0
- data/docs/S3ObjectStorageSSO.md +18 -0
- data/docs/Server.md +28 -0
- data/docs/ServerEntities.md +22 -0
- data/docs/ServerProperties.md +36 -0
- data/docs/Servers.md +30 -0
- data/docs/ServersApi.md +1908 -0
- data/docs/Snapshot.md +26 -0
- data/docs/SnapshotProperties.md +48 -0
- data/docs/Snapshots.md +24 -0
- data/docs/SnapshotsApi.md +428 -0
- data/docs/TargetPortRange.md +20 -0
- data/docs/Template.md +26 -0
- data/docs/TemplateProperties.md +24 -0
- data/docs/Templates.md +24 -0
- data/docs/TemplatesApi.md +165 -0
- data/docs/Token.md +18 -0
- data/docs/Type.md +15 -0
- data/docs/User.md +28 -0
- data/docs/UserManagementApi.md +2033 -0
- data/docs/UserMetadata.md +22 -0
- data/docs/UserPost.md +18 -0
- data/docs/UserProperties.md +32 -0
- data/docs/UserPropertiesPost.md +32 -0
- data/docs/UserPropertiesPut.md +30 -0
- data/docs/UserPut.md +20 -0
- data/docs/UserS3KeysApi.md +516 -0
- data/docs/Users.md +24 -0
- data/docs/UsersEntities.md +20 -0
- data/docs/Volume.md +26 -0
- data/docs/VolumeProperties.md +54 -0
- data/docs/Volumes.md +30 -0
- data/docs/VolumesApi.md +709 -0
- data/docs/summary.md +395 -0
- data/gitbook.yaml +4 -0
- data/ionoscloud.gemspec +1 -1
- data/lib/ionoscloud.rb +68 -18
- data/lib/ionoscloud/api/_api.rb +1 -1
- data/lib/ionoscloud/api/{backup_unit_api.rb → backup_units_api.rb} +60 -60
- data/lib/ionoscloud/api/{contract_api.rb → contract_resources_api.rb} +12 -12
- data/lib/ionoscloud/api/{data_center_api.rb → data_centers_api.rb} +51 -51
- data/lib/ionoscloud/api/firewall_rules_api.rb +640 -0
- data/lib/ionoscloud/api/flow_logs_api.rb +622 -0
- data/lib/ionoscloud/api/{image_api.rb → images_api.rb} +40 -40
- data/lib/ionoscloud/api/ip_blocks_api.rb +16 -16
- data/lib/ionoscloud/api/kubernetes_api.rb +33 -96
- data/lib/ionoscloud/api/{label_api.rb → labels_api.rb} +269 -287
- data/lib/ionoscloud/api/{lan_api.rb → lans_api.rb} +105 -105
- data/lib/ionoscloud/api/{load_balancer_api.rb → load_balancers_api.rb} +153 -135
- data/lib/ionoscloud/api/{location_api.rb → locations_api.rb} +20 -20
- data/lib/ionoscloud/api/nat_gateways_api.rb +1690 -0
- data/lib/ionoscloud/api/network_interfaces_api.rb +604 -0
- data/lib/ionoscloud/api/network_load_balancers_api.rb +1708 -0
- data/lib/ionoscloud/api/{private_cross_connect_api.rb → private_cross_connects_api.rb} +61 -43
- data/lib/ionoscloud/api/{request_api.rb → requests_api.rb} +56 -32
- data/lib/ionoscloud/api/{server_api.rb → servers_api.rb} +535 -191
- data/lib/ionoscloud/api/{snapshot_api.rb → snapshots_api.rb} +46 -46
- data/lib/ionoscloud/api/templates_api.rb +164 -0
- data/lib/ionoscloud/api/user_management_api.rb +29 -524
- data/lib/ionoscloud/api/user_s3_keys_api.rb +517 -0
- data/lib/ionoscloud/api/{volume_api.rb → volumes_api.rb} +80 -80
- data/lib/ionoscloud/api_client.rb +19 -23
- data/lib/ionoscloud/api_error.rb +1 -1
- data/lib/ionoscloud/configuration.rb +5 -5
- data/lib/ionoscloud/models/attached_volumes.rb +1 -1
- data/lib/ionoscloud/models/backup_unit.rb +1 -1
- data/lib/ionoscloud/models/backup_unit_properties.rb +1 -1
- data/lib/ionoscloud/models/backup_unit_sso.rb +1 -1
- data/lib/ionoscloud/models/backup_units.rb +3 -3
- data/lib/ionoscloud/models/balanced_nics.rb +1 -1
- data/lib/ionoscloud/models/cdroms.rb +1 -1
- data/lib/ionoscloud/models/connectable_datacenter.rb +1 -1
- data/lib/ionoscloud/models/contract.rb +1 -1
- data/lib/ionoscloud/models/contract_properties.rb +1 -1
- data/lib/ionoscloud/models/contracts.rb +249 -0
- data/lib/ionoscloud/models/cpu_architecture_properties.rb +247 -0
- data/lib/ionoscloud/models/data_center_entities.rb +23 -5
- data/lib/ionoscloud/models/datacenter.rb +1 -1
- data/lib/ionoscloud/models/datacenter_element_metadata.rb +1 -1
- data/lib/ionoscloud/models/datacenter_properties.rb +16 -26
- data/lib/ionoscloud/models/datacenters.rb +1 -1
- data/lib/ionoscloud/models/error.rb +1 -1
- data/lib/ionoscloud/models/error_message.rb +1 -1
- data/lib/ionoscloud/models/firewall_rule.rb +1 -1
- data/lib/ionoscloud/models/firewall_rules.rb +1 -1
- data/lib/ionoscloud/models/firewallrule_properties.rb +63 -26
- data/lib/ionoscloud/models/flow_log.rb +260 -0
- data/lib/ionoscloud/models/flow_log_properties.rb +313 -0
- data/lib/ionoscloud/models/flow_log_put.rb +251 -0
- data/lib/ionoscloud/models/flow_logs.rb +278 -0
- data/lib/ionoscloud/models/group.rb +1 -1
- data/lib/ionoscloud/models/group_entities.rb +1 -1
- data/lib/ionoscloud/models/group_members.rb +1 -1
- data/lib/ionoscloud/models/group_properties.rb +35 -5
- data/lib/ionoscloud/models/group_share.rb +1 -1
- data/lib/ionoscloud/models/group_share_properties.rb +1 -1
- data/lib/ionoscloud/models/group_shares.rb +1 -1
- data/lib/ionoscloud/models/group_users.rb +1 -1
- data/lib/ionoscloud/models/groups.rb +1 -1
- data/lib/ionoscloud/models/image.rb +1 -1
- data/lib/ionoscloud/models/image_properties.rb +39 -5
- data/lib/ionoscloud/models/images.rb +1 -1
- data/lib/ionoscloud/models/info.rb +1 -1
- data/lib/ionoscloud/models/ip_block.rb +1 -1
- data/lib/ionoscloud/models/ip_block_properties.rb +1 -1
- data/lib/ionoscloud/models/ip_blocks.rb +1 -1
- data/lib/ionoscloud/models/ip_consumer.rb +23 -5
- data/lib/ionoscloud/models/ip_failover.rb +1 -1
- data/lib/ionoscloud/models/kubernetes_auto_scaling.rb +11 -1
- data/lib/ionoscloud/models/kubernetes_cluster.rb +1 -1
- data/lib/ionoscloud/models/kubernetes_cluster_entities.rb +1 -1
- data/lib/ionoscloud/models/kubernetes_cluster_for_post.rb +303 -0
- data/lib/ionoscloud/models/kubernetes_cluster_for_put.rb +303 -0
- data/lib/ionoscloud/models/kubernetes_cluster_properties.rb +27 -5
- data/lib/ionoscloud/models/kubernetes_cluster_properties_for_post.rb +263 -0
- data/lib/ionoscloud/models/{kubernetes_cluster_properties_for_post_and_put.rb → kubernetes_cluster_properties_for_put.rb} +5 -5
- data/lib/ionoscloud/models/kubernetes_clusters.rb +2 -2
- data/lib/ionoscloud/models/kubernetes_maintenance_window.rb +11 -1
- data/lib/ionoscloud/models/kubernetes_node.rb +3 -3
- data/lib/ionoscloud/models/kubernetes_node_metadata.rb +1 -1
- data/lib/ionoscloud/models/kubernetes_node_pool.rb +1 -1
- data/lib/ionoscloud/models/{kubernetes_config.rb → kubernetes_node_pool_for_post.rb} +17 -8
- data/lib/ionoscloud/models/kubernetes_node_pool_for_put.rb +1 -1
- data/lib/ionoscloud/models/kubernetes_node_pool_lan.rb +27 -5
- data/lib/ionoscloud/models/kubernetes_node_pool_lan_routes.rb +227 -0
- data/lib/ionoscloud/models/kubernetes_node_pool_properties.rb +2 -2
- data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_post.rb +2 -2
- data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_put.rb +2 -153
- data/lib/ionoscloud/models/kubernetes_node_pools.rb +2 -2
- data/lib/ionoscloud/models/kubernetes_node_properties.rb +12 -7
- data/lib/ionoscloud/models/kubernetes_nodes.rb +3 -3
- data/lib/ionoscloud/models/label.rb +1 -1
- data/lib/ionoscloud/models/label_properties.rb +1 -1
- data/lib/ionoscloud/models/label_resource.rb +1 -1
- data/lib/ionoscloud/models/label_resource_properties.rb +1 -1
- data/lib/ionoscloud/models/label_resources.rb +3 -3
- data/lib/ionoscloud/models/labels.rb +3 -3
- data/lib/ionoscloud/models/lan.rb +1 -1
- data/lib/ionoscloud/models/lan_entities.rb +1 -1
- data/lib/ionoscloud/models/lan_nics.rb +1 -1
- data/lib/ionoscloud/models/lan_post.rb +1 -1
- data/lib/ionoscloud/models/lan_properties.rb +1 -1
- data/lib/ionoscloud/models/lan_properties_post.rb +1 -1
- data/lib/ionoscloud/models/lans.rb +2 -2
- data/lib/ionoscloud/models/loadbalancer.rb +1 -1
- data/lib/ionoscloud/models/loadbalancer_entities.rb +1 -1
- data/lib/ionoscloud/models/loadbalancer_properties.rb +13 -30
- data/lib/ionoscloud/models/loadbalancers.rb +1 -1
- data/lib/ionoscloud/models/location.rb +1 -1
- data/lib/ionoscloud/models/location_properties.rb +16 -26
- data/lib/ionoscloud/models/locations.rb +1 -1
- data/lib/ionoscloud/models/nat_gateway.rb +269 -0
- data/lib/ionoscloud/models/nat_gateway_entities.rb +225 -0
- data/lib/ionoscloud/models/nat_gateway_lan_properties.rb +234 -0
- data/lib/ionoscloud/models/nat_gateway_properties.rb +251 -0
- data/lib/ionoscloud/models/nat_gateway_put.rb +251 -0
- data/lib/ionoscloud/models/nat_gateway_rule.rb +260 -0
- data/lib/ionoscloud/models/nat_gateway_rule_properties.rb +291 -0
- data/lib/ionoscloud/models/nat_gateway_rule_protocol.rb +39 -0
- data/lib/ionoscloud/models/nat_gateway_rule_put.rb +251 -0
- data/lib/ionoscloud/models/nat_gateway_rule_type.rb +36 -0
- data/lib/ionoscloud/models/nat_gateway_rules.rb +249 -0
- data/lib/ionoscloud/models/nat_gateways.rb +278 -0
- data/lib/ionoscloud/models/network_load_balancer.rb +269 -0
- data/lib/ionoscloud/models/network_load_balancer_entities.rb +225 -0
- data/lib/ionoscloud/models/network_load_balancer_forwarding_rule.rb +260 -0
- data/lib/ionoscloud/models/network_load_balancer_forwarding_rule_health_check.rb +257 -0
- data/lib/ionoscloud/models/network_load_balancer_forwarding_rule_properties.rb +354 -0
- data/lib/ionoscloud/models/network_load_balancer_forwarding_rule_put.rb +251 -0
- data/lib/ionoscloud/models/network_load_balancer_forwarding_rule_target.rb +261 -0
- data/lib/ionoscloud/models/network_load_balancer_forwarding_rule_target_health_check.rb +237 -0
- data/lib/ionoscloud/models/network_load_balancer_forwarding_rules.rb +278 -0
- data/lib/ionoscloud/models/network_load_balancer_properties.rb +276 -0
- data/lib/ionoscloud/models/network_load_balancer_put.rb +251 -0
- data/lib/ionoscloud/models/network_load_balancers.rb +278 -0
- data/lib/ionoscloud/models/nic.rb +1 -1
- data/lib/ionoscloud/models/nic_entities.rb +11 -2
- data/lib/ionoscloud/models/nic_properties.rb +63 -9
- data/lib/ionoscloud/models/nic_put.rb +251 -0
- data/lib/ionoscloud/models/nics.rb +1 -1
- data/lib/ionoscloud/models/no_state_meta_data.rb +1 -1
- data/lib/ionoscloud/models/pagination_links.rb +1 -1
- data/lib/ionoscloud/models/peer.rb +1 -1
- data/lib/ionoscloud/models/private_cross_connect.rb +1 -1
- data/lib/ionoscloud/models/private_cross_connect_properties.rb +1 -1
- data/lib/ionoscloud/models/private_cross_connects.rb +1 -1
- data/lib/ionoscloud/models/{kubernetes_config_properties.rb → remote_console_url.rb} +12 -12
- data/lib/ionoscloud/models/request.rb +1 -1
- data/lib/ionoscloud/models/request_metadata.rb +1 -1
- data/lib/ionoscloud/models/request_properties.rb +1 -1
- data/lib/ionoscloud/models/request_status.rb +1 -1
- data/lib/ionoscloud/models/request_status_metadata.rb +1 -1
- data/lib/ionoscloud/models/request_target.rb +1 -1
- data/lib/ionoscloud/models/requests.rb +1 -1
- data/lib/ionoscloud/models/resource.rb +1 -1
- data/lib/ionoscloud/models/resource_entities.rb +1 -1
- data/lib/ionoscloud/models/resource_groups.rb +1 -1
- data/lib/ionoscloud/models/resource_limits.rb +80 -5
- data/lib/ionoscloud/models/resource_properties.rb +1 -1
- data/lib/ionoscloud/models/resource_reference.rb +1 -1
- data/lib/ionoscloud/models/resources.rb +1 -1
- data/lib/ionoscloud/models/resources_users.rb +1 -1
- data/lib/ionoscloud/models/s3_key.rb +1 -1
- data/lib/ionoscloud/models/s3_key_metadata.rb +1 -1
- data/lib/ionoscloud/models/s3_key_properties.rb +3 -3
- data/lib/ionoscloud/models/s3_keys.rb +1 -1
- data/lib/ionoscloud/models/s3_object_storage_sso.rb +1 -1
- data/lib/ionoscloud/models/server.rb +1 -1
- data/lib/ionoscloud/models/server_entities.rb +1 -1
- data/lib/ionoscloud/models/server_properties.rb +28 -8
- data/lib/ionoscloud/models/servers.rb +1 -1
- data/lib/ionoscloud/models/snapshot.rb +1 -1
- data/lib/ionoscloud/models/snapshot_properties.rb +1 -1
- data/lib/ionoscloud/models/snapshots.rb +1 -1
- data/lib/ionoscloud/models/target_port_range.rb +227 -0
- data/lib/ionoscloud/models/template.rb +260 -0
- data/lib/ionoscloud/models/template_properties.rb +267 -0
- data/lib/ionoscloud/models/templates.rb +249 -0
- data/lib/ionoscloud/models/token.rb +217 -0
- data/lib/ionoscloud/models/type.rb +10 -1
- data/lib/ionoscloud/models/user.rb +1 -1
- data/lib/ionoscloud/models/user_metadata.rb +1 -1
- data/lib/ionoscloud/models/user_post.rb +221 -0
- data/lib/ionoscloud/models/user_properties.rb +2 -12
- data/lib/ionoscloud/models/user_properties_post.rb +287 -0
- data/lib/ionoscloud/models/user_properties_put.rb +277 -0
- data/lib/ionoscloud/models/user_put.rb +231 -0
- data/lib/ionoscloud/models/users.rb +1 -1
- data/lib/ionoscloud/models/users_entities.rb +1 -1
- data/lib/ionoscloud/models/volume.rb +1 -1
- data/lib/ionoscloud/models/volume_properties.rb +31 -20
- data/lib/ionoscloud/models/volumes.rb +1 -1
- data/lib/ionoscloud/version.rb +2 -2
- data/spec/api/_api_spec.rb +1 -1
- data/spec/api/{backup_unit_api_spec.rb → backup_units_api_spec.rb} +14 -14
- data/spec/api/{contract_api_spec.rb → contract_resources_api_spec.rb} +9 -9
- data/spec/api/{data_center_api_spec.rb → data_centers_api_spec.rb} +10 -10
- data/spec/api/firewall_rules_api_spec.rb +146 -0
- data/spec/api/flow_logs_api_spec.rb +140 -0
- data/spec/api/{image_api_spec.rb → images_api_spec.rb} +9 -9
- data/spec/api/ip_blocks_api_spec.rb +7 -7
- data/spec/api/kubernetes_api_spec.rb +10 -22
- data/spec/api/{label_api_spec.rb → labels_api_spec.rb} +21 -23
- data/spec/api/{lan_api_spec.rb → lans_api_spec.rb} +21 -21
- data/spec/api/{load_balancer_api_spec.rb → load_balancers_api_spec.rb} +27 -25
- data/spec/api/{location_api_spec.rb → locations_api_spec.rb} +7 -7
- data/spec/api/{nic_api_spec.rb → nat_gateways_api_spec.rb} +188 -103
- data/spec/api/network_interfaces_api_spec.rb +140 -0
- data/spec/api/network_load_balancers_api_spec.rb +342 -0
- data/spec/api/{private_cross_connect_api_spec.rb → private_cross_connects_api_spec.rb} +13 -11
- data/spec/api/{request_api_spec.rb → requests_api_spec.rb} +20 -12
- data/spec/api/{server_api_spec.rb → servers_api_spec.rb} +84 -20
- data/spec/api/{snapshot_api_spec.rb → snapshots_api_spec.rb} +12 -12
- data/spec/api/templates_api_spec.rb +60 -0
- data/spec/api/user_management_api_spec.rb +7 -100
- data/spec/api/user_s3_keys_api_spec.rb +128 -0
- data/spec/api/{volume_api_spec.rb → volumes_api_spec.rb} +13 -13
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/attached_volumes_spec.rb +1 -1
- data/spec/models/backup_unit_properties_spec.rb +1 -1
- data/spec/models/backup_unit_spec.rb +1 -1
- data/spec/models/backup_unit_sso_spec.rb +1 -1
- data/spec/models/backup_units_spec.rb +2 -2
- data/spec/models/balanced_nics_spec.rb +1 -1
- data/spec/models/cdroms_spec.rb +1 -1
- data/spec/models/connectable_datacenter_spec.rb +1 -1
- data/spec/models/contract_properties_spec.rb +1 -1
- data/spec/models/contract_spec.rb +1 -1
- data/spec/models/contracts_spec.rb +52 -0
- data/spec/models/cpu_architecture_properties_spec.rb +52 -0
- data/spec/models/data_center_entities_spec.rb +13 -1
- data/spec/models/datacenter_element_metadata_spec.rb +1 -1
- data/spec/models/datacenter_properties_spec.rb +7 -5
- data/spec/models/datacenter_spec.rb +1 -1
- data/spec/models/datacenters_spec.rb +1 -1
- data/spec/models/error_message_spec.rb +1 -1
- data/spec/models/error_spec.rb +1 -1
- data/spec/models/firewall_rule_spec.rb +1 -1
- data/spec/models/firewall_rules_spec.rb +1 -1
- data/spec/models/firewallrule_properties_spec.rb +11 -13
- data/spec/models/flow_log_properties_spec.rb +60 -0
- data/spec/models/flow_log_put_spec.rb +52 -0
- data/spec/models/flow_log_spec.rb +58 -0
- data/spec/models/flow_logs_spec.rb +70 -0
- data/spec/models/group_entities_spec.rb +1 -1
- data/spec/models/group_members_spec.rb +1 -1
- data/spec/models/group_properties_spec.rb +19 -1
- data/spec/models/group_share_properties_spec.rb +1 -1
- data/spec/models/group_share_spec.rb +1 -1
- data/spec/models/group_shares_spec.rb +1 -1
- data/spec/models/group_spec.rb +1 -1
- data/spec/models/group_users_spec.rb +1 -1
- data/spec/models/groups_spec.rb +1 -1
- data/spec/models/image_properties_spec.rb +17 -1
- data/spec/models/image_spec.rb +1 -1
- data/spec/models/images_spec.rb +1 -1
- data/spec/models/info_spec.rb +1 -1
- data/spec/models/ip_block_properties_spec.rb +1 -1
- data/spec/models/ip_block_spec.rb +1 -1
- data/spec/models/ip_blocks_spec.rb +1 -1
- data/spec/models/ip_consumer_spec.rb +13 -1
- data/spec/models/ip_failover_spec.rb +1 -1
- data/spec/models/kubernetes_auto_scaling_spec.rb +1 -1
- data/spec/models/kubernetes_cluster_entities_spec.rb +1 -1
- data/spec/models/kubernetes_cluster_for_post_spec.rb +68 -0
- data/spec/models/kubernetes_cluster_for_put_spec.rb +68 -0
- data/spec/models/kubernetes_cluster_properties_for_post_spec.rb +58 -0
- data/spec/models/{kubernetes_cluster_properties_for_post_and_put_spec.rb → kubernetes_cluster_properties_for_put_spec.rb} +7 -7
- data/spec/models/kubernetes_cluster_properties_spec.rb +13 -1
- data/spec/models/kubernetes_cluster_spec.rb +1 -1
- data/spec/models/kubernetes_clusters_spec.rb +1 -1
- data/spec/models/kubernetes_maintenance_window_spec.rb +1 -1
- data/spec/models/kubernetes_node_metadata_spec.rb +1 -1
- data/spec/models/{kubernetes_config_spec.rb → kubernetes_node_pool_for_post_spec.rb} +14 -8
- data/spec/models/kubernetes_node_pool_for_put_spec.rb +1 -1
- data/spec/models/kubernetes_node_pool_lan_routes_spec.rb +40 -0
- data/spec/models/kubernetes_node_pool_lan_spec.rb +13 -1
- data/spec/models/kubernetes_node_pool_properties_for_post_spec.rb +1 -1
- data/spec/models/kubernetes_node_pool_properties_for_put_spec.rb +1 -51
- data/spec/models/kubernetes_node_pool_properties_spec.rb +1 -1
- data/spec/models/kubernetes_node_pool_spec.rb +1 -1
- data/spec/models/kubernetes_node_pools_spec.rb +1 -1
- data/spec/models/kubernetes_node_properties_spec.rb +7 -1
- data/spec/models/kubernetes_node_spec.rb +2 -2
- data/spec/models/kubernetes_nodes_spec.rb +2 -2
- data/spec/models/label_properties_spec.rb +1 -1
- data/spec/models/label_resource_properties_spec.rb +1 -1
- data/spec/models/label_resource_spec.rb +1 -1
- data/spec/models/label_resources_spec.rb +2 -2
- data/spec/models/label_spec.rb +1 -1
- data/spec/models/labels_spec.rb +2 -2
- data/spec/models/lan_entities_spec.rb +1 -1
- data/spec/models/lan_nics_spec.rb +1 -1
- data/spec/models/lan_post_spec.rb +1 -1
- data/spec/models/lan_properties_post_spec.rb +1 -1
- data/spec/models/lan_properties_spec.rb +1 -1
- data/spec/models/lan_spec.rb +1 -1
- data/spec/models/lans_spec.rb +1 -1
- data/spec/models/loadbalancer_entities_spec.rb +1 -1
- data/spec/models/loadbalancer_properties_spec.rb +1 -5
- data/spec/models/loadbalancer_spec.rb +1 -1
- data/spec/models/loadbalancers_spec.rb +1 -1
- data/spec/models/location_properties_spec.rb +7 -5
- data/spec/models/location_spec.rb +1 -1
- data/spec/models/locations_spec.rb +1 -1
- data/spec/models/nat_gateway_entities_spec.rb +40 -0
- data/spec/models/nat_gateway_lan_properties_spec.rb +40 -0
- data/spec/models/nat_gateway_properties_spec.rb +46 -0
- data/spec/models/nat_gateway_put_spec.rb +52 -0
- data/spec/models/nat_gateway_rule_properties_spec.rb +70 -0
- data/spec/models/nat_gateway_rule_protocol_spec.rb +28 -0
- data/spec/models/nat_gateway_rule_put_spec.rb +52 -0
- data/spec/models/nat_gateway_rule_spec.rb +58 -0
- data/spec/models/nat_gateway_rule_type_spec.rb +28 -0
- data/spec/models/nat_gateway_rules_spec.rb +52 -0
- data/spec/models/nat_gateway_spec.rb +64 -0
- data/spec/models/nat_gateways_spec.rb +70 -0
- data/spec/models/network_load_balancer_entities_spec.rb +40 -0
- data/spec/models/network_load_balancer_forwarding_rule_health_check_spec.rb +58 -0
- data/spec/models/network_load_balancer_forwarding_rule_properties_spec.rb +78 -0
- data/spec/models/network_load_balancer_forwarding_rule_put_spec.rb +52 -0
- data/spec/models/network_load_balancer_forwarding_rule_spec.rb +58 -0
- data/spec/models/network_load_balancer_forwarding_rule_target_health_check_spec.rb +46 -0
- data/spec/models/network_load_balancer_forwarding_rule_target_spec.rb +52 -0
- data/spec/models/network_load_balancer_forwarding_rules_spec.rb +70 -0
- data/spec/models/network_load_balancer_properties_spec.rb +58 -0
- data/spec/models/network_load_balancer_put_spec.rb +52 -0
- data/spec/models/network_load_balancer_spec.rb +64 -0
- data/spec/models/network_load_balancers_spec.rb +70 -0
- data/spec/models/nic_entities_spec.rb +7 -1
- data/spec/models/nic_properties_spec.rb +18 -2
- data/spec/models/nic_put_spec.rb +52 -0
- data/spec/models/nic_spec.rb +1 -1
- data/spec/models/nics_spec.rb +1 -1
- data/spec/models/no_state_meta_data_spec.rb +1 -1
- data/spec/models/pagination_links_spec.rb +1 -1
- data/spec/models/peer_spec.rb +1 -1
- data/spec/models/private_cross_connect_properties_spec.rb +1 -1
- data/spec/models/private_cross_connect_spec.rb +1 -1
- data/spec/models/private_cross_connects_spec.rb +1 -1
- data/spec/models/{kubernetes_config_properties_spec.rb → remote_console_url_spec.rb} +8 -8
- data/spec/models/request_metadata_spec.rb +1 -1
- data/spec/models/request_properties_spec.rb +1 -1
- data/spec/models/request_spec.rb +1 -1
- data/spec/models/request_status_metadata_spec.rb +1 -1
- data/spec/models/request_status_spec.rb +1 -1
- data/spec/models/request_target_spec.rb +1 -1
- data/spec/models/requests_spec.rb +1 -1
- data/spec/models/resource_entities_spec.rb +1 -1
- data/spec/models/resource_groups_spec.rb +1 -1
- data/spec/models/resource_limits_spec.rb +31 -1
- data/spec/models/resource_properties_spec.rb +1 -1
- data/spec/models/resource_reference_spec.rb +1 -1
- data/spec/models/resource_spec.rb +1 -1
- data/spec/models/resources_spec.rb +1 -1
- data/spec/models/resources_users_spec.rb +1 -1
- data/spec/models/s3_key_metadata_spec.rb +1 -1
- data/spec/models/s3_key_properties_spec.rb +1 -1
- data/spec/models/s3_key_spec.rb +1 -1
- data/spec/models/s3_keys_spec.rb +1 -1
- data/spec/models/s3_object_storage_sso_spec.rb +1 -1
- data/spec/models/server_entities_spec.rb +1 -1
- data/spec/models/server_properties_spec.rb +14 -2
- data/spec/models/server_spec.rb +1 -1
- data/spec/models/servers_spec.rb +1 -1
- data/spec/models/snapshot_properties_spec.rb +1 -1
- data/spec/models/snapshot_spec.rb +1 -1
- data/spec/models/snapshots_spec.rb +1 -1
- data/spec/models/target_port_range_spec.rb +40 -0
- data/spec/models/template_properties_spec.rb +52 -0
- data/spec/models/template_spec.rb +58 -0
- data/spec/models/templates_spec.rb +52 -0
- data/spec/models/token_spec.rb +34 -0
- data/spec/models/type_spec.rb +1 -1
- data/spec/models/user_metadata_spec.rb +1 -1
- data/spec/models/user_post_spec.rb +34 -0
- data/spec/models/user_properties_post_spec.rb +76 -0
- data/spec/models/user_properties_put_spec.rb +70 -0
- data/spec/models/user_properties_spec.rb +1 -7
- data/spec/models/user_put_spec.rb +40 -0
- data/spec/models/user_spec.rb +1 -1
- data/spec/models/users_entities_spec.rb +1 -1
- data/spec/models/users_spec.rb +1 -1
- data/spec/models/volume_properties_spec.rb +14 -8
- data/spec/models/volume_spec.rb +1 -1
- data/spec/models/volumes_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +505 -160
- data/DOCS.md +0 -14618
- data/lib/ionoscloud/api/nic_api.rb +0 -1222
@@ -1,1222 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#CLOUD API
|
3
|
-
|
4
|
-
#An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 5.0
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.0.1-SNAPSHOT
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'cgi'
|
14
|
-
|
15
|
-
module Ionoscloud
|
16
|
-
class NicApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client = ApiClient.default)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
# Delete a Nic
|
23
|
-
# Deletes the specified NIC.
|
24
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
25
|
-
# @param server_id [String] The unique ID of the Server
|
26
|
-
# @param nic_id [String] The unique ID of the NIC
|
27
|
-
# @param [Hash] opts the optional parameters
|
28
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
29
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
30
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
31
|
-
# @return [Object]
|
32
|
-
def datacenters_servers_nics_delete(datacenter_id, server_id, nic_id, opts = {})
|
33
|
-
data, _status_code, _headers = datacenters_servers_nics_delete_with_http_info(datacenter_id, server_id, nic_id, opts)
|
34
|
-
data
|
35
|
-
end
|
36
|
-
|
37
|
-
# Delete a Nic
|
38
|
-
# Deletes the specified NIC.
|
39
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
40
|
-
# @param server_id [String] The unique ID of the Server
|
41
|
-
# @param nic_id [String] The unique ID of the NIC
|
42
|
-
# @param [Hash] opts the optional parameters
|
43
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
44
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
45
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
46
|
-
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
47
|
-
def datacenters_servers_nics_delete_with_http_info(datacenter_id, server_id, nic_id, opts = {})
|
48
|
-
if @api_client.config.debugging
|
49
|
-
@api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_delete ...'
|
50
|
-
end
|
51
|
-
# verify the required parameter 'datacenter_id' is set
|
52
|
-
if @api_client.config.client_side_validation && datacenter_id.nil?
|
53
|
-
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_delete"
|
54
|
-
end
|
55
|
-
# verify the required parameter 'server_id' is set
|
56
|
-
if @api_client.config.client_side_validation && server_id.nil?
|
57
|
-
fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_delete"
|
58
|
-
end
|
59
|
-
# verify the required parameter 'nic_id' is set
|
60
|
-
if @api_client.config.client_side_validation && nic_id.nil?
|
61
|
-
fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_delete"
|
62
|
-
end
|
63
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
64
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_delete, must be smaller than or equal to 10.'
|
65
|
-
end
|
66
|
-
|
67
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
68
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_delete, must be greater than or equal to 0.'
|
69
|
-
end
|
70
|
-
|
71
|
-
# resource path
|
72
|
-
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s))
|
73
|
-
|
74
|
-
# query parameters
|
75
|
-
query_params = opts[:query_params] || {}
|
76
|
-
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
77
|
-
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
78
|
-
|
79
|
-
# header parameters
|
80
|
-
header_params = opts[:header_params] || {}
|
81
|
-
# HTTP header 'Accept' (if needed)
|
82
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
83
|
-
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
84
|
-
|
85
|
-
# form parameters
|
86
|
-
form_params = opts[:form_params] || {}
|
87
|
-
|
88
|
-
# http body (model)
|
89
|
-
post_body = opts[:debug_body]
|
90
|
-
|
91
|
-
# return_type
|
92
|
-
return_type = opts[:debug_return_type] || 'Object'
|
93
|
-
|
94
|
-
# auth_names
|
95
|
-
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
96
|
-
|
97
|
-
new_options = opts.merge(
|
98
|
-
:operation => :"NicApi.datacenters_servers_nics_delete",
|
99
|
-
:header_params => header_params,
|
100
|
-
:query_params => query_params,
|
101
|
-
:form_params => form_params,
|
102
|
-
:body => post_body,
|
103
|
-
:auth_names => auth_names,
|
104
|
-
:return_type => return_type
|
105
|
-
)
|
106
|
-
|
107
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
108
|
-
if @api_client.config.debugging
|
109
|
-
@api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
110
|
-
end
|
111
|
-
return data, status_code, headers
|
112
|
-
end
|
113
|
-
|
114
|
-
# Retrieve a Nic
|
115
|
-
# Retrieves the attributes of a given NIC
|
116
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
117
|
-
# @param server_id [String] The unique ID of the Server
|
118
|
-
# @param nic_id [String] The unique ID of the NIC
|
119
|
-
# @param [Hash] opts the optional parameters
|
120
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
121
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
122
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
123
|
-
# @return [Nic]
|
124
|
-
def datacenters_servers_nics_find_by_id(datacenter_id, server_id, nic_id, opts = {})
|
125
|
-
data, _status_code, _headers = datacenters_servers_nics_find_by_id_with_http_info(datacenter_id, server_id, nic_id, opts)
|
126
|
-
data
|
127
|
-
end
|
128
|
-
|
129
|
-
# Retrieve a Nic
|
130
|
-
# Retrieves the attributes of a given NIC
|
131
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
132
|
-
# @param server_id [String] The unique ID of the Server
|
133
|
-
# @param nic_id [String] The unique ID of the NIC
|
134
|
-
# @param [Hash] opts the optional parameters
|
135
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
136
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
137
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
138
|
-
# @return [Array<(Nic, Integer, Hash)>] Nic data, response status code and response headers
|
139
|
-
def datacenters_servers_nics_find_by_id_with_http_info(datacenter_id, server_id, nic_id, opts = {})
|
140
|
-
if @api_client.config.debugging
|
141
|
-
@api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_find_by_id ...'
|
142
|
-
end
|
143
|
-
# verify the required parameter 'datacenter_id' is set
|
144
|
-
if @api_client.config.client_side_validation && datacenter_id.nil?
|
145
|
-
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_find_by_id"
|
146
|
-
end
|
147
|
-
# verify the required parameter 'server_id' is set
|
148
|
-
if @api_client.config.client_side_validation && server_id.nil?
|
149
|
-
fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_find_by_id"
|
150
|
-
end
|
151
|
-
# verify the required parameter 'nic_id' is set
|
152
|
-
if @api_client.config.client_side_validation && nic_id.nil?
|
153
|
-
fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_find_by_id"
|
154
|
-
end
|
155
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
156
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_find_by_id, must be smaller than or equal to 10.'
|
157
|
-
end
|
158
|
-
|
159
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
160
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_find_by_id, must be greater than or equal to 0.'
|
161
|
-
end
|
162
|
-
|
163
|
-
# resource path
|
164
|
-
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s))
|
165
|
-
|
166
|
-
# query parameters
|
167
|
-
query_params = opts[:query_params] || {}
|
168
|
-
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
169
|
-
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
170
|
-
|
171
|
-
# header parameters
|
172
|
-
header_params = opts[:header_params] || {}
|
173
|
-
# HTTP header 'Accept' (if needed)
|
174
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
175
|
-
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
176
|
-
|
177
|
-
# form parameters
|
178
|
-
form_params = opts[:form_params] || {}
|
179
|
-
|
180
|
-
# http body (model)
|
181
|
-
post_body = opts[:debug_body]
|
182
|
-
|
183
|
-
# return_type
|
184
|
-
return_type = opts[:debug_return_type] || 'Nic'
|
185
|
-
|
186
|
-
# auth_names
|
187
|
-
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
188
|
-
|
189
|
-
new_options = opts.merge(
|
190
|
-
:operation => :"NicApi.datacenters_servers_nics_find_by_id",
|
191
|
-
:header_params => header_params,
|
192
|
-
:query_params => query_params,
|
193
|
-
:form_params => form_params,
|
194
|
-
:body => post_body,
|
195
|
-
:auth_names => auth_names,
|
196
|
-
:return_type => return_type
|
197
|
-
)
|
198
|
-
|
199
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
200
|
-
if @api_client.config.debugging
|
201
|
-
@api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
202
|
-
end
|
203
|
-
return data, status_code, headers
|
204
|
-
end
|
205
|
-
|
206
|
-
# Delete a Firewall Rule
|
207
|
-
# Removes the specific Firewall Rule
|
208
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
209
|
-
# @param server_id [String] The unique ID of the Server
|
210
|
-
# @param nic_id [String] The unique ID of the NIC
|
211
|
-
# @param firewallrule_id [String] The unique ID of the Firewall Rule
|
212
|
-
# @param [Hash] opts the optional parameters
|
213
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
214
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
215
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
216
|
-
# @return [Object]
|
217
|
-
def datacenters_servers_nics_firewallrules_delete(datacenter_id, server_id, nic_id, firewallrule_id, opts = {})
|
218
|
-
data, _status_code, _headers = datacenters_servers_nics_firewallrules_delete_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts)
|
219
|
-
data
|
220
|
-
end
|
221
|
-
|
222
|
-
# Delete a Firewall Rule
|
223
|
-
# Removes the specific Firewall Rule
|
224
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
225
|
-
# @param server_id [String] The unique ID of the Server
|
226
|
-
# @param nic_id [String] The unique ID of the NIC
|
227
|
-
# @param firewallrule_id [String] The unique ID of the Firewall Rule
|
228
|
-
# @param [Hash] opts the optional parameters
|
229
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
230
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
231
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
232
|
-
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
233
|
-
def datacenters_servers_nics_firewallrules_delete_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts = {})
|
234
|
-
if @api_client.config.debugging
|
235
|
-
@api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_firewallrules_delete ...'
|
236
|
-
end
|
237
|
-
# verify the required parameter 'datacenter_id' is set
|
238
|
-
if @api_client.config.client_side_validation && datacenter_id.nil?
|
239
|
-
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_firewallrules_delete"
|
240
|
-
end
|
241
|
-
# verify the required parameter 'server_id' is set
|
242
|
-
if @api_client.config.client_side_validation && server_id.nil?
|
243
|
-
fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_firewallrules_delete"
|
244
|
-
end
|
245
|
-
# verify the required parameter 'nic_id' is set
|
246
|
-
if @api_client.config.client_side_validation && nic_id.nil?
|
247
|
-
fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_firewallrules_delete"
|
248
|
-
end
|
249
|
-
# verify the required parameter 'firewallrule_id' is set
|
250
|
-
if @api_client.config.client_side_validation && firewallrule_id.nil?
|
251
|
-
fail ArgumentError, "Missing the required parameter 'firewallrule_id' when calling NicApi.datacenters_servers_nics_firewallrules_delete"
|
252
|
-
end
|
253
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
254
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_delete, must be smaller than or equal to 10.'
|
255
|
-
end
|
256
|
-
|
257
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
258
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_delete, must be greater than or equal to 0.'
|
259
|
-
end
|
260
|
-
|
261
|
-
# resource path
|
262
|
-
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s)).sub('{' + 'firewallruleId' + '}', CGI.escape(firewallrule_id.to_s))
|
263
|
-
|
264
|
-
# query parameters
|
265
|
-
query_params = opts[:query_params] || {}
|
266
|
-
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
267
|
-
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
268
|
-
|
269
|
-
# header parameters
|
270
|
-
header_params = opts[:header_params] || {}
|
271
|
-
# HTTP header 'Accept' (if needed)
|
272
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
273
|
-
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
274
|
-
|
275
|
-
# form parameters
|
276
|
-
form_params = opts[:form_params] || {}
|
277
|
-
|
278
|
-
# http body (model)
|
279
|
-
post_body = opts[:debug_body]
|
280
|
-
|
281
|
-
# return_type
|
282
|
-
return_type = opts[:debug_return_type] || 'Object'
|
283
|
-
|
284
|
-
# auth_names
|
285
|
-
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
286
|
-
|
287
|
-
new_options = opts.merge(
|
288
|
-
:operation => :"NicApi.datacenters_servers_nics_firewallrules_delete",
|
289
|
-
:header_params => header_params,
|
290
|
-
:query_params => query_params,
|
291
|
-
:form_params => form_params,
|
292
|
-
:body => post_body,
|
293
|
-
:auth_names => auth_names,
|
294
|
-
:return_type => return_type
|
295
|
-
)
|
296
|
-
|
297
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
298
|
-
if @api_client.config.debugging
|
299
|
-
@api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_firewallrules_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
300
|
-
end
|
301
|
-
return data, status_code, headers
|
302
|
-
end
|
303
|
-
|
304
|
-
# Retrieve a Firewall Rule
|
305
|
-
# Retrieves the attributes of a given Firewall Rule.
|
306
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
307
|
-
# @param server_id [String] The unique ID of the Server
|
308
|
-
# @param nic_id [String] The unique ID of the NIC
|
309
|
-
# @param firewallrule_id [String] The unique ID of the Firewall Rule
|
310
|
-
# @param [Hash] opts the optional parameters
|
311
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
312
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
313
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
314
|
-
# @return [FirewallRule]
|
315
|
-
def datacenters_servers_nics_firewallrules_find_by_id(datacenter_id, server_id, nic_id, firewallrule_id, opts = {})
|
316
|
-
data, _status_code, _headers = datacenters_servers_nics_firewallrules_find_by_id_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts)
|
317
|
-
data
|
318
|
-
end
|
319
|
-
|
320
|
-
# Retrieve a Firewall Rule
|
321
|
-
# Retrieves the attributes of a given Firewall Rule.
|
322
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
323
|
-
# @param server_id [String] The unique ID of the Server
|
324
|
-
# @param nic_id [String] The unique ID of the NIC
|
325
|
-
# @param firewallrule_id [String] The unique ID of the Firewall Rule
|
326
|
-
# @param [Hash] opts the optional parameters
|
327
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
328
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
329
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
330
|
-
# @return [Array<(FirewallRule, Integer, Hash)>] FirewallRule data, response status code and response headers
|
331
|
-
def datacenters_servers_nics_firewallrules_find_by_id_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts = {})
|
332
|
-
if @api_client.config.debugging
|
333
|
-
@api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_firewallrules_find_by_id ...'
|
334
|
-
end
|
335
|
-
# verify the required parameter 'datacenter_id' is set
|
336
|
-
if @api_client.config.client_side_validation && datacenter_id.nil?
|
337
|
-
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_firewallrules_find_by_id"
|
338
|
-
end
|
339
|
-
# verify the required parameter 'server_id' is set
|
340
|
-
if @api_client.config.client_side_validation && server_id.nil?
|
341
|
-
fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_firewallrules_find_by_id"
|
342
|
-
end
|
343
|
-
# verify the required parameter 'nic_id' is set
|
344
|
-
if @api_client.config.client_side_validation && nic_id.nil?
|
345
|
-
fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_firewallrules_find_by_id"
|
346
|
-
end
|
347
|
-
# verify the required parameter 'firewallrule_id' is set
|
348
|
-
if @api_client.config.client_side_validation && firewallrule_id.nil?
|
349
|
-
fail ArgumentError, "Missing the required parameter 'firewallrule_id' when calling NicApi.datacenters_servers_nics_firewallrules_find_by_id"
|
350
|
-
end
|
351
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
352
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_find_by_id, must be smaller than or equal to 10.'
|
353
|
-
end
|
354
|
-
|
355
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
356
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_find_by_id, must be greater than or equal to 0.'
|
357
|
-
end
|
358
|
-
|
359
|
-
# resource path
|
360
|
-
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s)).sub('{' + 'firewallruleId' + '}', CGI.escape(firewallrule_id.to_s))
|
361
|
-
|
362
|
-
# query parameters
|
363
|
-
query_params = opts[:query_params] || {}
|
364
|
-
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
365
|
-
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
366
|
-
|
367
|
-
# header parameters
|
368
|
-
header_params = opts[:header_params] || {}
|
369
|
-
# HTTP header 'Accept' (if needed)
|
370
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
371
|
-
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
372
|
-
|
373
|
-
# form parameters
|
374
|
-
form_params = opts[:form_params] || {}
|
375
|
-
|
376
|
-
# http body (model)
|
377
|
-
post_body = opts[:debug_body]
|
378
|
-
|
379
|
-
# return_type
|
380
|
-
return_type = opts[:debug_return_type] || 'FirewallRule'
|
381
|
-
|
382
|
-
# auth_names
|
383
|
-
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
384
|
-
|
385
|
-
new_options = opts.merge(
|
386
|
-
:operation => :"NicApi.datacenters_servers_nics_firewallrules_find_by_id",
|
387
|
-
:header_params => header_params,
|
388
|
-
:query_params => query_params,
|
389
|
-
:form_params => form_params,
|
390
|
-
:body => post_body,
|
391
|
-
:auth_names => auth_names,
|
392
|
-
:return_type => return_type
|
393
|
-
)
|
394
|
-
|
395
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
396
|
-
if @api_client.config.debugging
|
397
|
-
@api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_firewallrules_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
398
|
-
end
|
399
|
-
return data, status_code, headers
|
400
|
-
end
|
401
|
-
|
402
|
-
# List Firewall Rules
|
403
|
-
# Retrieves a list of firewall rules associated with a particular NIC
|
404
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
405
|
-
# @param server_id [String] The unique ID of the Server
|
406
|
-
# @param nic_id [String] The unique ID of the NIC
|
407
|
-
# @param [Hash] opts the optional parameters
|
408
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
409
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
410
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
411
|
-
# @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination) (default to 0)
|
412
|
-
# @option opts [Integer] :limit the maximum number of elements to return (use together with <code>offset</code> for pagination) (default to 1000)
|
413
|
-
# @return [FirewallRules]
|
414
|
-
def datacenters_servers_nics_firewallrules_get(datacenter_id, server_id, nic_id, opts = {})
|
415
|
-
data, _status_code, _headers = datacenters_servers_nics_firewallrules_get_with_http_info(datacenter_id, server_id, nic_id, opts)
|
416
|
-
data
|
417
|
-
end
|
418
|
-
|
419
|
-
# List Firewall Rules
|
420
|
-
# Retrieves a list of firewall rules associated with a particular NIC
|
421
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
422
|
-
# @param server_id [String] The unique ID of the Server
|
423
|
-
# @param nic_id [String] The unique ID of the NIC
|
424
|
-
# @param [Hash] opts the optional parameters
|
425
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
426
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
427
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
428
|
-
# @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
|
429
|
-
# @option opts [Integer] :limit the maximum number of elements to return (use together with <code>offset</code> for pagination)
|
430
|
-
# @return [Array<(FirewallRules, Integer, Hash)>] FirewallRules data, response status code and response headers
|
431
|
-
def datacenters_servers_nics_firewallrules_get_with_http_info(datacenter_id, server_id, nic_id, opts = {})
|
432
|
-
if @api_client.config.debugging
|
433
|
-
@api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_firewallrules_get ...'
|
434
|
-
end
|
435
|
-
# verify the required parameter 'datacenter_id' is set
|
436
|
-
if @api_client.config.client_side_validation && datacenter_id.nil?
|
437
|
-
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_firewallrules_get"
|
438
|
-
end
|
439
|
-
# verify the required parameter 'server_id' is set
|
440
|
-
if @api_client.config.client_side_validation && server_id.nil?
|
441
|
-
fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_firewallrules_get"
|
442
|
-
end
|
443
|
-
# verify the required parameter 'nic_id' is set
|
444
|
-
if @api_client.config.client_side_validation && nic_id.nil?
|
445
|
-
fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_firewallrules_get"
|
446
|
-
end
|
447
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
448
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_get, must be smaller than or equal to 10.'
|
449
|
-
end
|
450
|
-
|
451
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
452
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_get, must be greater than or equal to 0.'
|
453
|
-
end
|
454
|
-
|
455
|
-
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
456
|
-
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling NicApi.datacenters_servers_nics_firewallrules_get, must be greater than or equal to 0.'
|
457
|
-
end
|
458
|
-
|
459
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000
|
460
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling NicApi.datacenters_servers_nics_firewallrules_get, must be smaller than or equal to 10000.'
|
461
|
-
end
|
462
|
-
|
463
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
464
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling NicApi.datacenters_servers_nics_firewallrules_get, must be greater than or equal to 1.'
|
465
|
-
end
|
466
|
-
|
467
|
-
# resource path
|
468
|
-
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s))
|
469
|
-
|
470
|
-
# query parameters
|
471
|
-
query_params = opts[:query_params] || {}
|
472
|
-
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
473
|
-
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
474
|
-
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
475
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
476
|
-
|
477
|
-
# header parameters
|
478
|
-
header_params = opts[:header_params] || {}
|
479
|
-
# HTTP header 'Accept' (if needed)
|
480
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
481
|
-
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
482
|
-
|
483
|
-
# form parameters
|
484
|
-
form_params = opts[:form_params] || {}
|
485
|
-
|
486
|
-
# http body (model)
|
487
|
-
post_body = opts[:debug_body]
|
488
|
-
|
489
|
-
# return_type
|
490
|
-
return_type = opts[:debug_return_type] || 'FirewallRules'
|
491
|
-
|
492
|
-
# auth_names
|
493
|
-
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
494
|
-
|
495
|
-
new_options = opts.merge(
|
496
|
-
:operation => :"NicApi.datacenters_servers_nics_firewallrules_get",
|
497
|
-
:header_params => header_params,
|
498
|
-
:query_params => query_params,
|
499
|
-
:form_params => form_params,
|
500
|
-
:body => post_body,
|
501
|
-
:auth_names => auth_names,
|
502
|
-
:return_type => return_type
|
503
|
-
)
|
504
|
-
|
505
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
506
|
-
if @api_client.config.debugging
|
507
|
-
@api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_firewallrules_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
508
|
-
end
|
509
|
-
return data, status_code, headers
|
510
|
-
end
|
511
|
-
|
512
|
-
# Partially modify a Firewall Rule
|
513
|
-
# You can use update attributes of a resource
|
514
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
515
|
-
# @param server_id [String] The unique ID of the Server
|
516
|
-
# @param nic_id [String] The unique ID of the NIC
|
517
|
-
# @param firewallrule_id [String] The unique ID of the Firewall Rule
|
518
|
-
# @param firewallrule [FirewallruleProperties] Modified Firewall Rule
|
519
|
-
# @param [Hash] opts the optional parameters
|
520
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
521
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
522
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
523
|
-
# @return [FirewallRule]
|
524
|
-
def datacenters_servers_nics_firewallrules_patch(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {})
|
525
|
-
data, _status_code, _headers = datacenters_servers_nics_firewallrules_patch_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts)
|
526
|
-
data
|
527
|
-
end
|
528
|
-
|
529
|
-
# Partially modify a Firewall Rule
|
530
|
-
# You can use update attributes of a resource
|
531
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
532
|
-
# @param server_id [String] The unique ID of the Server
|
533
|
-
# @param nic_id [String] The unique ID of the NIC
|
534
|
-
# @param firewallrule_id [String] The unique ID of the Firewall Rule
|
535
|
-
# @param firewallrule [FirewallruleProperties] Modified Firewall Rule
|
536
|
-
# @param [Hash] opts the optional parameters
|
537
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
538
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
539
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
540
|
-
# @return [Array<(FirewallRule, Integer, Hash)>] FirewallRule data, response status code and response headers
|
541
|
-
def datacenters_servers_nics_firewallrules_patch_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {})
|
542
|
-
if @api_client.config.debugging
|
543
|
-
@api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_firewallrules_patch ...'
|
544
|
-
end
|
545
|
-
# verify the required parameter 'datacenter_id' is set
|
546
|
-
if @api_client.config.client_side_validation && datacenter_id.nil?
|
547
|
-
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_firewallrules_patch"
|
548
|
-
end
|
549
|
-
# verify the required parameter 'server_id' is set
|
550
|
-
if @api_client.config.client_side_validation && server_id.nil?
|
551
|
-
fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_firewallrules_patch"
|
552
|
-
end
|
553
|
-
# verify the required parameter 'nic_id' is set
|
554
|
-
if @api_client.config.client_side_validation && nic_id.nil?
|
555
|
-
fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_firewallrules_patch"
|
556
|
-
end
|
557
|
-
# verify the required parameter 'firewallrule_id' is set
|
558
|
-
if @api_client.config.client_side_validation && firewallrule_id.nil?
|
559
|
-
fail ArgumentError, "Missing the required parameter 'firewallrule_id' when calling NicApi.datacenters_servers_nics_firewallrules_patch"
|
560
|
-
end
|
561
|
-
# verify the required parameter 'firewallrule' is set
|
562
|
-
if @api_client.config.client_side_validation && firewallrule.nil?
|
563
|
-
fail ArgumentError, "Missing the required parameter 'firewallrule' when calling NicApi.datacenters_servers_nics_firewallrules_patch"
|
564
|
-
end
|
565
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
566
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_patch, must be smaller than or equal to 10.'
|
567
|
-
end
|
568
|
-
|
569
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
570
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_patch, must be greater than or equal to 0.'
|
571
|
-
end
|
572
|
-
|
573
|
-
# resource path
|
574
|
-
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s)).sub('{' + 'firewallruleId' + '}', CGI.escape(firewallrule_id.to_s))
|
575
|
-
|
576
|
-
# query parameters
|
577
|
-
query_params = opts[:query_params] || {}
|
578
|
-
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
579
|
-
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
580
|
-
|
581
|
-
# header parameters
|
582
|
-
header_params = opts[:header_params] || {}
|
583
|
-
# HTTP header 'Accept' (if needed)
|
584
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
585
|
-
# HTTP header 'Content-Type'
|
586
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
587
|
-
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
588
|
-
|
589
|
-
# form parameters
|
590
|
-
form_params = opts[:form_params] || {}
|
591
|
-
|
592
|
-
# http body (model)
|
593
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(firewallrule)
|
594
|
-
|
595
|
-
# return_type
|
596
|
-
return_type = opts[:debug_return_type] || 'FirewallRule'
|
597
|
-
|
598
|
-
# auth_names
|
599
|
-
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
600
|
-
|
601
|
-
new_options = opts.merge(
|
602
|
-
:operation => :"NicApi.datacenters_servers_nics_firewallrules_patch",
|
603
|
-
:header_params => header_params,
|
604
|
-
:query_params => query_params,
|
605
|
-
:form_params => form_params,
|
606
|
-
:body => post_body,
|
607
|
-
:auth_names => auth_names,
|
608
|
-
:return_type => return_type
|
609
|
-
)
|
610
|
-
|
611
|
-
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
612
|
-
if @api_client.config.debugging
|
613
|
-
@api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_firewallrules_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
614
|
-
end
|
615
|
-
return data, status_code, headers
|
616
|
-
end
|
617
|
-
|
618
|
-
# Create a Firewall Rule
|
619
|
-
# This will add a Firewall Rule to the NIC
|
620
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
621
|
-
# @param server_id [String] The unique ID of the server
|
622
|
-
# @param nic_id [String] The unique ID of the NIC
|
623
|
-
# @param firewallrule [FirewallRule] Firewall Rule to be created
|
624
|
-
# @param [Hash] opts the optional parameters
|
625
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
626
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
627
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
628
|
-
# @return [FirewallRule]
|
629
|
-
def datacenters_servers_nics_firewallrules_post(datacenter_id, server_id, nic_id, firewallrule, opts = {})
|
630
|
-
data, _status_code, _headers = datacenters_servers_nics_firewallrules_post_with_http_info(datacenter_id, server_id, nic_id, firewallrule, opts)
|
631
|
-
data
|
632
|
-
end
|
633
|
-
|
634
|
-
# Create a Firewall Rule
|
635
|
-
# This will add a Firewall Rule to the NIC
|
636
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
637
|
-
# @param server_id [String] The unique ID of the server
|
638
|
-
# @param nic_id [String] The unique ID of the NIC
|
639
|
-
# @param firewallrule [FirewallRule] Firewall Rule to be created
|
640
|
-
# @param [Hash] opts the optional parameters
|
641
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
642
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
643
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
644
|
-
# @return [Array<(FirewallRule, Integer, Hash)>] FirewallRule data, response status code and response headers
|
645
|
-
def datacenters_servers_nics_firewallrules_post_with_http_info(datacenter_id, server_id, nic_id, firewallrule, opts = {})
|
646
|
-
if @api_client.config.debugging
|
647
|
-
@api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_firewallrules_post ...'
|
648
|
-
end
|
649
|
-
# verify the required parameter 'datacenter_id' is set
|
650
|
-
if @api_client.config.client_side_validation && datacenter_id.nil?
|
651
|
-
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_firewallrules_post"
|
652
|
-
end
|
653
|
-
# verify the required parameter 'server_id' is set
|
654
|
-
if @api_client.config.client_side_validation && server_id.nil?
|
655
|
-
fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_firewallrules_post"
|
656
|
-
end
|
657
|
-
# verify the required parameter 'nic_id' is set
|
658
|
-
if @api_client.config.client_side_validation && nic_id.nil?
|
659
|
-
fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_firewallrules_post"
|
660
|
-
end
|
661
|
-
# verify the required parameter 'firewallrule' is set
|
662
|
-
if @api_client.config.client_side_validation && firewallrule.nil?
|
663
|
-
fail ArgumentError, "Missing the required parameter 'firewallrule' when calling NicApi.datacenters_servers_nics_firewallrules_post"
|
664
|
-
end
|
665
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
666
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_post, must be smaller than or equal to 10.'
|
667
|
-
end
|
668
|
-
|
669
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
670
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_post, must be greater than or equal to 0.'
|
671
|
-
end
|
672
|
-
|
673
|
-
# resource path
|
674
|
-
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s))
|
675
|
-
|
676
|
-
# query parameters
|
677
|
-
query_params = opts[:query_params] || {}
|
678
|
-
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
679
|
-
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
680
|
-
|
681
|
-
# header parameters
|
682
|
-
header_params = opts[:header_params] || {}
|
683
|
-
# HTTP header 'Accept' (if needed)
|
684
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
685
|
-
# HTTP header 'Content-Type'
|
686
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
687
|
-
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
688
|
-
|
689
|
-
# form parameters
|
690
|
-
form_params = opts[:form_params] || {}
|
691
|
-
|
692
|
-
# http body (model)
|
693
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(firewallrule)
|
694
|
-
|
695
|
-
# return_type
|
696
|
-
return_type = opts[:debug_return_type] || 'FirewallRule'
|
697
|
-
|
698
|
-
# auth_names
|
699
|
-
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
700
|
-
|
701
|
-
new_options = opts.merge(
|
702
|
-
:operation => :"NicApi.datacenters_servers_nics_firewallrules_post",
|
703
|
-
:header_params => header_params,
|
704
|
-
:query_params => query_params,
|
705
|
-
:form_params => form_params,
|
706
|
-
:body => post_body,
|
707
|
-
:auth_names => auth_names,
|
708
|
-
:return_type => return_type
|
709
|
-
)
|
710
|
-
|
711
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
712
|
-
if @api_client.config.debugging
|
713
|
-
@api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_firewallrules_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
714
|
-
end
|
715
|
-
return data, status_code, headers
|
716
|
-
end
|
717
|
-
|
718
|
-
# Modify a Firewall Rule
|
719
|
-
# You can use update attributes of a resource
|
720
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
721
|
-
# @param server_id [String] The unique ID of the Server
|
722
|
-
# @param nic_id [String] The unique ID of the NIC
|
723
|
-
# @param firewallrule_id [String] The unique ID of the Firewall Rule
|
724
|
-
# @param firewallrule [FirewallRule] Modified Firewall Rule
|
725
|
-
# @param [Hash] opts the optional parameters
|
726
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
727
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
728
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
729
|
-
# @return [FirewallRule]
|
730
|
-
def datacenters_servers_nics_firewallrules_put(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {})
|
731
|
-
data, _status_code, _headers = datacenters_servers_nics_firewallrules_put_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts)
|
732
|
-
data
|
733
|
-
end
|
734
|
-
|
735
|
-
# Modify a Firewall Rule
|
736
|
-
# You can use update attributes of a resource
|
737
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
738
|
-
# @param server_id [String] The unique ID of the Server
|
739
|
-
# @param nic_id [String] The unique ID of the NIC
|
740
|
-
# @param firewallrule_id [String] The unique ID of the Firewall Rule
|
741
|
-
# @param firewallrule [FirewallRule] Modified Firewall Rule
|
742
|
-
# @param [Hash] opts the optional parameters
|
743
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
744
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
745
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
746
|
-
# @return [Array<(FirewallRule, Integer, Hash)>] FirewallRule data, response status code and response headers
|
747
|
-
def datacenters_servers_nics_firewallrules_put_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {})
|
748
|
-
if @api_client.config.debugging
|
749
|
-
@api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_firewallrules_put ...'
|
750
|
-
end
|
751
|
-
# verify the required parameter 'datacenter_id' is set
|
752
|
-
if @api_client.config.client_side_validation && datacenter_id.nil?
|
753
|
-
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_firewallrules_put"
|
754
|
-
end
|
755
|
-
# verify the required parameter 'server_id' is set
|
756
|
-
if @api_client.config.client_side_validation && server_id.nil?
|
757
|
-
fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_firewallrules_put"
|
758
|
-
end
|
759
|
-
# verify the required parameter 'nic_id' is set
|
760
|
-
if @api_client.config.client_side_validation && nic_id.nil?
|
761
|
-
fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_firewallrules_put"
|
762
|
-
end
|
763
|
-
# verify the required parameter 'firewallrule_id' is set
|
764
|
-
if @api_client.config.client_side_validation && firewallrule_id.nil?
|
765
|
-
fail ArgumentError, "Missing the required parameter 'firewallrule_id' when calling NicApi.datacenters_servers_nics_firewallrules_put"
|
766
|
-
end
|
767
|
-
# verify the required parameter 'firewallrule' is set
|
768
|
-
if @api_client.config.client_side_validation && firewallrule.nil?
|
769
|
-
fail ArgumentError, "Missing the required parameter 'firewallrule' when calling NicApi.datacenters_servers_nics_firewallrules_put"
|
770
|
-
end
|
771
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
772
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_put, must be smaller than or equal to 10.'
|
773
|
-
end
|
774
|
-
|
775
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
776
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_put, must be greater than or equal to 0.'
|
777
|
-
end
|
778
|
-
|
779
|
-
# resource path
|
780
|
-
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s)).sub('{' + 'firewallruleId' + '}', CGI.escape(firewallrule_id.to_s))
|
781
|
-
|
782
|
-
# query parameters
|
783
|
-
query_params = opts[:query_params] || {}
|
784
|
-
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
785
|
-
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
786
|
-
|
787
|
-
# header parameters
|
788
|
-
header_params = opts[:header_params] || {}
|
789
|
-
# HTTP header 'Accept' (if needed)
|
790
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
791
|
-
# HTTP header 'Content-Type'
|
792
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
793
|
-
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
794
|
-
|
795
|
-
# form parameters
|
796
|
-
form_params = opts[:form_params] || {}
|
797
|
-
|
798
|
-
# http body (model)
|
799
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(firewallrule)
|
800
|
-
|
801
|
-
# return_type
|
802
|
-
return_type = opts[:debug_return_type] || 'FirewallRule'
|
803
|
-
|
804
|
-
# auth_names
|
805
|
-
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
806
|
-
|
807
|
-
new_options = opts.merge(
|
808
|
-
:operation => :"NicApi.datacenters_servers_nics_firewallrules_put",
|
809
|
-
:header_params => header_params,
|
810
|
-
:query_params => query_params,
|
811
|
-
:form_params => form_params,
|
812
|
-
:body => post_body,
|
813
|
-
:auth_names => auth_names,
|
814
|
-
:return_type => return_type
|
815
|
-
)
|
816
|
-
|
817
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
818
|
-
if @api_client.config.debugging
|
819
|
-
@api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_firewallrules_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
820
|
-
end
|
821
|
-
return data, status_code, headers
|
822
|
-
end
|
823
|
-
|
824
|
-
# List Nics
|
825
|
-
# Retrieves a list of NICs.
|
826
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
827
|
-
# @param server_id [String] The unique ID of the Server
|
828
|
-
# @param [Hash] opts the optional parameters
|
829
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
830
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
831
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
832
|
-
# @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination) (default to 0)
|
833
|
-
# @option opts [Integer] :limit the maximum number of elements to return (use together with <code>offset</code> for pagination) (default to 1000)
|
834
|
-
# @return [Nics]
|
835
|
-
def datacenters_servers_nics_get(datacenter_id, server_id, opts = {})
|
836
|
-
data, _status_code, _headers = datacenters_servers_nics_get_with_http_info(datacenter_id, server_id, opts)
|
837
|
-
data
|
838
|
-
end
|
839
|
-
|
840
|
-
# List Nics
|
841
|
-
# Retrieves a list of NICs.
|
842
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
843
|
-
# @param server_id [String] The unique ID of the Server
|
844
|
-
# @param [Hash] opts the optional parameters
|
845
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
846
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
847
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
848
|
-
# @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
|
849
|
-
# @option opts [Integer] :limit the maximum number of elements to return (use together with <code>offset</code> for pagination)
|
850
|
-
# @return [Array<(Nics, Integer, Hash)>] Nics data, response status code and response headers
|
851
|
-
def datacenters_servers_nics_get_with_http_info(datacenter_id, server_id, opts = {})
|
852
|
-
if @api_client.config.debugging
|
853
|
-
@api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_get ...'
|
854
|
-
end
|
855
|
-
# verify the required parameter 'datacenter_id' is set
|
856
|
-
if @api_client.config.client_side_validation && datacenter_id.nil?
|
857
|
-
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_get"
|
858
|
-
end
|
859
|
-
# verify the required parameter 'server_id' is set
|
860
|
-
if @api_client.config.client_side_validation && server_id.nil?
|
861
|
-
fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_get"
|
862
|
-
end
|
863
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
864
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_get, must be smaller than or equal to 10.'
|
865
|
-
end
|
866
|
-
|
867
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
868
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_get, must be greater than or equal to 0.'
|
869
|
-
end
|
870
|
-
|
871
|
-
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
872
|
-
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling NicApi.datacenters_servers_nics_get, must be greater than or equal to 0.'
|
873
|
-
end
|
874
|
-
|
875
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000
|
876
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling NicApi.datacenters_servers_nics_get, must be smaller than or equal to 10000.'
|
877
|
-
end
|
878
|
-
|
879
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
880
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling NicApi.datacenters_servers_nics_get, must be greater than or equal to 1.'
|
881
|
-
end
|
882
|
-
|
883
|
-
# resource path
|
884
|
-
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s))
|
885
|
-
|
886
|
-
# query parameters
|
887
|
-
query_params = opts[:query_params] || {}
|
888
|
-
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
889
|
-
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
890
|
-
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
891
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
892
|
-
|
893
|
-
# header parameters
|
894
|
-
header_params = opts[:header_params] || {}
|
895
|
-
# HTTP header 'Accept' (if needed)
|
896
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
897
|
-
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
898
|
-
|
899
|
-
# form parameters
|
900
|
-
form_params = opts[:form_params] || {}
|
901
|
-
|
902
|
-
# http body (model)
|
903
|
-
post_body = opts[:debug_body]
|
904
|
-
|
905
|
-
# return_type
|
906
|
-
return_type = opts[:debug_return_type] || 'Nics'
|
907
|
-
|
908
|
-
# auth_names
|
909
|
-
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
910
|
-
|
911
|
-
new_options = opts.merge(
|
912
|
-
:operation => :"NicApi.datacenters_servers_nics_get",
|
913
|
-
:header_params => header_params,
|
914
|
-
:query_params => query_params,
|
915
|
-
:form_params => form_params,
|
916
|
-
:body => post_body,
|
917
|
-
:auth_names => auth_names,
|
918
|
-
:return_type => return_type
|
919
|
-
)
|
920
|
-
|
921
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
922
|
-
if @api_client.config.debugging
|
923
|
-
@api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
924
|
-
end
|
925
|
-
return data, status_code, headers
|
926
|
-
end
|
927
|
-
|
928
|
-
# Partially modify a Nic
|
929
|
-
# You can use update attributes of a Nic
|
930
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
931
|
-
# @param server_id [String] The unique ID of the Server
|
932
|
-
# @param nic_id [String] The unique ID of the NIC
|
933
|
-
# @param nic [NicProperties] Modified properties of Nic
|
934
|
-
# @param [Hash] opts the optional parameters
|
935
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
936
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
937
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
938
|
-
# @return [Nic]
|
939
|
-
def datacenters_servers_nics_patch(datacenter_id, server_id, nic_id, nic, opts = {})
|
940
|
-
data, _status_code, _headers = datacenters_servers_nics_patch_with_http_info(datacenter_id, server_id, nic_id, nic, opts)
|
941
|
-
data
|
942
|
-
end
|
943
|
-
|
944
|
-
# Partially modify a Nic
|
945
|
-
# You can use update attributes of a Nic
|
946
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
947
|
-
# @param server_id [String] The unique ID of the Server
|
948
|
-
# @param nic_id [String] The unique ID of the NIC
|
949
|
-
# @param nic [NicProperties] Modified properties of Nic
|
950
|
-
# @param [Hash] opts the optional parameters
|
951
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
952
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
953
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
954
|
-
# @return [Array<(Nic, Integer, Hash)>] Nic data, response status code and response headers
|
955
|
-
def datacenters_servers_nics_patch_with_http_info(datacenter_id, server_id, nic_id, nic, opts = {})
|
956
|
-
if @api_client.config.debugging
|
957
|
-
@api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_patch ...'
|
958
|
-
end
|
959
|
-
# verify the required parameter 'datacenter_id' is set
|
960
|
-
if @api_client.config.client_side_validation && datacenter_id.nil?
|
961
|
-
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_patch"
|
962
|
-
end
|
963
|
-
# verify the required parameter 'server_id' is set
|
964
|
-
if @api_client.config.client_side_validation && server_id.nil?
|
965
|
-
fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_patch"
|
966
|
-
end
|
967
|
-
# verify the required parameter 'nic_id' is set
|
968
|
-
if @api_client.config.client_side_validation && nic_id.nil?
|
969
|
-
fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_patch"
|
970
|
-
end
|
971
|
-
# verify the required parameter 'nic' is set
|
972
|
-
if @api_client.config.client_side_validation && nic.nil?
|
973
|
-
fail ArgumentError, "Missing the required parameter 'nic' when calling NicApi.datacenters_servers_nics_patch"
|
974
|
-
end
|
975
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
976
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_patch, must be smaller than or equal to 10.'
|
977
|
-
end
|
978
|
-
|
979
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
980
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_patch, must be greater than or equal to 0.'
|
981
|
-
end
|
982
|
-
|
983
|
-
# resource path
|
984
|
-
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s))
|
985
|
-
|
986
|
-
# query parameters
|
987
|
-
query_params = opts[:query_params] || {}
|
988
|
-
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
989
|
-
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
990
|
-
|
991
|
-
# header parameters
|
992
|
-
header_params = opts[:header_params] || {}
|
993
|
-
# HTTP header 'Accept' (if needed)
|
994
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
995
|
-
# HTTP header 'Content-Type'
|
996
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
997
|
-
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
998
|
-
|
999
|
-
# form parameters
|
1000
|
-
form_params = opts[:form_params] || {}
|
1001
|
-
|
1002
|
-
# http body (model)
|
1003
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(nic)
|
1004
|
-
|
1005
|
-
# return_type
|
1006
|
-
return_type = opts[:debug_return_type] || 'Nic'
|
1007
|
-
|
1008
|
-
# auth_names
|
1009
|
-
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
1010
|
-
|
1011
|
-
new_options = opts.merge(
|
1012
|
-
:operation => :"NicApi.datacenters_servers_nics_patch",
|
1013
|
-
:header_params => header_params,
|
1014
|
-
:query_params => query_params,
|
1015
|
-
:form_params => form_params,
|
1016
|
-
:body => post_body,
|
1017
|
-
:auth_names => auth_names,
|
1018
|
-
:return_type => return_type
|
1019
|
-
)
|
1020
|
-
|
1021
|
-
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
1022
|
-
if @api_client.config.debugging
|
1023
|
-
@api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1024
|
-
end
|
1025
|
-
return data, status_code, headers
|
1026
|
-
end
|
1027
|
-
|
1028
|
-
# Create a Nic
|
1029
|
-
# Adds a NIC to the target server. Combine count of Nics and volumes attached to the server should not exceed size 24.
|
1030
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
1031
|
-
# @param server_id [String] The unique ID of the Server
|
1032
|
-
# @param nic [Nic] Nic to be created
|
1033
|
-
# @param [Hash] opts the optional parameters
|
1034
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
1035
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
1036
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1037
|
-
# @return [Nic]
|
1038
|
-
def datacenters_servers_nics_post(datacenter_id, server_id, nic, opts = {})
|
1039
|
-
data, _status_code, _headers = datacenters_servers_nics_post_with_http_info(datacenter_id, server_id, nic, opts)
|
1040
|
-
data
|
1041
|
-
end
|
1042
|
-
|
1043
|
-
# Create a Nic
|
1044
|
-
# Adds a NIC to the target server. Combine count of Nics and volumes attached to the server should not exceed size 24.
|
1045
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
1046
|
-
# @param server_id [String] The unique ID of the Server
|
1047
|
-
# @param nic [Nic] Nic to be created
|
1048
|
-
# @param [Hash] opts the optional parameters
|
1049
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
1050
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
1051
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1052
|
-
# @return [Array<(Nic, Integer, Hash)>] Nic data, response status code and response headers
|
1053
|
-
def datacenters_servers_nics_post_with_http_info(datacenter_id, server_id, nic, opts = {})
|
1054
|
-
if @api_client.config.debugging
|
1055
|
-
@api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_post ...'
|
1056
|
-
end
|
1057
|
-
# verify the required parameter 'datacenter_id' is set
|
1058
|
-
if @api_client.config.client_side_validation && datacenter_id.nil?
|
1059
|
-
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_post"
|
1060
|
-
end
|
1061
|
-
# verify the required parameter 'server_id' is set
|
1062
|
-
if @api_client.config.client_side_validation && server_id.nil?
|
1063
|
-
fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_post"
|
1064
|
-
end
|
1065
|
-
# verify the required parameter 'nic' is set
|
1066
|
-
if @api_client.config.client_side_validation && nic.nil?
|
1067
|
-
fail ArgumentError, "Missing the required parameter 'nic' when calling NicApi.datacenters_servers_nics_post"
|
1068
|
-
end
|
1069
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
1070
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_post, must be smaller than or equal to 10.'
|
1071
|
-
end
|
1072
|
-
|
1073
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
1074
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_post, must be greater than or equal to 0.'
|
1075
|
-
end
|
1076
|
-
|
1077
|
-
# resource path
|
1078
|
-
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s))
|
1079
|
-
|
1080
|
-
# query parameters
|
1081
|
-
query_params = opts[:query_params] || {}
|
1082
|
-
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
1083
|
-
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
1084
|
-
|
1085
|
-
# header parameters
|
1086
|
-
header_params = opts[:header_params] || {}
|
1087
|
-
# HTTP header 'Accept' (if needed)
|
1088
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1089
|
-
# HTTP header 'Content-Type'
|
1090
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1091
|
-
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
1092
|
-
|
1093
|
-
# form parameters
|
1094
|
-
form_params = opts[:form_params] || {}
|
1095
|
-
|
1096
|
-
# http body (model)
|
1097
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(nic)
|
1098
|
-
|
1099
|
-
# return_type
|
1100
|
-
return_type = opts[:debug_return_type] || 'Nic'
|
1101
|
-
|
1102
|
-
# auth_names
|
1103
|
-
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
1104
|
-
|
1105
|
-
new_options = opts.merge(
|
1106
|
-
:operation => :"NicApi.datacenters_servers_nics_post",
|
1107
|
-
:header_params => header_params,
|
1108
|
-
:query_params => query_params,
|
1109
|
-
:form_params => form_params,
|
1110
|
-
:body => post_body,
|
1111
|
-
:auth_names => auth_names,
|
1112
|
-
:return_type => return_type
|
1113
|
-
)
|
1114
|
-
|
1115
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1116
|
-
if @api_client.config.debugging
|
1117
|
-
@api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1118
|
-
end
|
1119
|
-
return data, status_code, headers
|
1120
|
-
end
|
1121
|
-
|
1122
|
-
# Modify a Nic
|
1123
|
-
# You can use update attributes of a Nic
|
1124
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
1125
|
-
# @param server_id [String] The unique ID of the Server
|
1126
|
-
# @param nic_id [String] The unique ID of the NIC
|
1127
|
-
# @param nic [Nic] Modified Nic
|
1128
|
-
# @param [Hash] opts the optional parameters
|
1129
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
|
1130
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
|
1131
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1132
|
-
# @return [Nic]
|
1133
|
-
def datacenters_servers_nics_put(datacenter_id, server_id, nic_id, nic, opts = {})
|
1134
|
-
data, _status_code, _headers = datacenters_servers_nics_put_with_http_info(datacenter_id, server_id, nic_id, nic, opts)
|
1135
|
-
data
|
1136
|
-
end
|
1137
|
-
|
1138
|
-
# Modify a Nic
|
1139
|
-
# You can use update attributes of a Nic
|
1140
|
-
# @param datacenter_id [String] The unique ID of the datacenter
|
1141
|
-
# @param server_id [String] The unique ID of the Server
|
1142
|
-
# @param nic_id [String] The unique ID of the NIC
|
1143
|
-
# @param nic [Nic] Modified Nic
|
1144
|
-
# @param [Hash] opts the optional parameters
|
1145
|
-
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
|
1146
|
-
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
|
1147
|
-
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
|
1148
|
-
# @return [Array<(Nic, Integer, Hash)>] Nic data, response status code and response headers
|
1149
|
-
def datacenters_servers_nics_put_with_http_info(datacenter_id, server_id, nic_id, nic, opts = {})
|
1150
|
-
if @api_client.config.debugging
|
1151
|
-
@api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_put ...'
|
1152
|
-
end
|
1153
|
-
# verify the required parameter 'datacenter_id' is set
|
1154
|
-
if @api_client.config.client_side_validation && datacenter_id.nil?
|
1155
|
-
fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_put"
|
1156
|
-
end
|
1157
|
-
# verify the required parameter 'server_id' is set
|
1158
|
-
if @api_client.config.client_side_validation && server_id.nil?
|
1159
|
-
fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_put"
|
1160
|
-
end
|
1161
|
-
# verify the required parameter 'nic_id' is set
|
1162
|
-
if @api_client.config.client_side_validation && nic_id.nil?
|
1163
|
-
fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_put"
|
1164
|
-
end
|
1165
|
-
# verify the required parameter 'nic' is set
|
1166
|
-
if @api_client.config.client_side_validation && nic.nil?
|
1167
|
-
fail ArgumentError, "Missing the required parameter 'nic' when calling NicApi.datacenters_servers_nics_put"
|
1168
|
-
end
|
1169
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
1170
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_put, must be smaller than or equal to 10.'
|
1171
|
-
end
|
1172
|
-
|
1173
|
-
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
1174
|
-
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_put, must be greater than or equal to 0.'
|
1175
|
-
end
|
1176
|
-
|
1177
|
-
# resource path
|
1178
|
-
local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s))
|
1179
|
-
|
1180
|
-
# query parameters
|
1181
|
-
query_params = opts[:query_params] || {}
|
1182
|
-
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
1183
|
-
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
1184
|
-
|
1185
|
-
# header parameters
|
1186
|
-
header_params = opts[:header_params] || {}
|
1187
|
-
# HTTP header 'Accept' (if needed)
|
1188
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1189
|
-
# HTTP header 'Content-Type'
|
1190
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1191
|
-
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
1192
|
-
|
1193
|
-
# form parameters
|
1194
|
-
form_params = opts[:form_params] || {}
|
1195
|
-
|
1196
|
-
# http body (model)
|
1197
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(nic)
|
1198
|
-
|
1199
|
-
# return_type
|
1200
|
-
return_type = opts[:debug_return_type] || 'Nic'
|
1201
|
-
|
1202
|
-
# auth_names
|
1203
|
-
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
1204
|
-
|
1205
|
-
new_options = opts.merge(
|
1206
|
-
:operation => :"NicApi.datacenters_servers_nics_put",
|
1207
|
-
:header_params => header_params,
|
1208
|
-
:query_params => query_params,
|
1209
|
-
:form_params => form_params,
|
1210
|
-
:body => post_body,
|
1211
|
-
:auth_names => auth_names,
|
1212
|
-
:return_type => return_type
|
1213
|
-
)
|
1214
|
-
|
1215
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1216
|
-
if @api_client.config.debugging
|
1217
|
-
@api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1218
|
-
end
|
1219
|
-
return data, status_code, headers
|
1220
|
-
end
|
1221
|
-
end
|
1222
|
-
end
|