From 4dd67a4fcafae6f4a48108a1f551d909b5956f8e Mon Sep 17 00:00:00 2001 From: oci-dex-release-bot Date: Tue, 7 May 2024 03:14:10 +0000 Subject: [PATCH] Releasing version 2.126.2 --- CHANGELOG.rst | 14 + docs/api/bds.rst | 3 + ...ds.models.BatchingBasedPatchingConfigs.rst | 11 + ...ds.models.DowntimeBasedPatchingConfigs.rst | 11 + .../models/oci.bds.models.PatchingConfigs.rst | 11 + docs/api/core.rst | 16 + ...models.GetIpInventoryVcnOverlapDetails.rst | 11 + ....core.models.InventoryIpAddressSummary.rst | 11 + ...i.core.models.InventoryResourceSummary.rst | 11 + ...models.InventorySubnetCidrBlockSummary.rst | 11 + ...oci.core.models.InventorySubnetSummary.rst | 11 + ...re.models.InventoryVcnCidrBlockSummary.rst | 11 + .../oci.core.models.InventoryVcnSummary.rst | 11 + ...s.IpInventoryCidrUtilizationCollection.rst | 11 + ...dels.IpInventoryCidrUtilizationSummary.rst | 11 + .../oci.core.models.IpInventoryCollection.rst | 11 + ...ls.IpInventorySubnetResourceCollection.rst | 11 + ...odels.IpInventorySubnetResourceSummary.rst | 11 + ...models.IpInventoryVcnOverlapCollection.rst | 11 + ...re.models.IpInventoryVcnOverlapSummary.rst | 11 + docs/api/core/models/oci.core.models.Ipam.rst | 11 + ...oci.core.models.ListIpInventoryDetails.rst | 11 + docs/api/database.rst | 2 + ....models.DefinedFileSystemConfiguration.rst | 11 + ...e.models.FileSystemConfigurationDetail.rst | 11 + docs/api/load_balancer.rst | 2 + ...ancer.models.IpBasedMaxConnectionsRule.rst | 11 + ....load_balancer.models.IpMaxConnections.rst | 11 + examples/object_storage/README.md | 43 +- .../object_storage_list_folders.py | 0 examples/showoci/README.md | 18 + examples/showoci/showoci_output.py | 1 + examples/showoci/showoci_service.py | 14 +- examples/showrewards/README.md | 17 + examples/showsubscription/README.md | 18 +- examples/showusage/README.md | 314 ++-- examples/showusage/showusage.py | 1328 +++++++++++------ examples/tag_resources_in_tenancy/README.md | 18 +- src/oci/bds/bds_client.py | 10 +- src/oci/bds/models/__init__.py | 6 + .../models/batching_based_patching_configs.py | 144 ++ .../models/downtime_based_patching_configs.py | 51 + .../bds/models/install_os_patch_details.py | 31 +- src/oci/bds/models/node.py | 66 +- src/oci/bds/models/patching_configs.py | 109 ++ src/oci/bds/models/work_request_error.py | 8 +- src/oci/core/models/__init__.py | 32 + .../get_ip_inventory_vcn_overlap_details.py | 107 ++ .../models/inventory_ip_address_summary.py | 169 +++ .../core/models/inventory_resource_summary.py | 212 +++ .../inventory_subnet_cidr_block_summary.py | 103 ++ .../core/models/inventory_subnet_summary.py | 309 ++++ .../inventory_vcn_cidr_block_summary.py | 103 ++ src/oci/core/models/inventory_vcn_summary.py | 309 ++++ ...p_inventory_cidr_utilization_collection.py | 202 +++ .../ip_inventory_cidr_utilization_summary.py | 134 ++ .../core/models/ip_inventory_collection.py | 202 +++ ...ip_inventory_subnet_resource_collection.py | 202 +++ .../ip_inventory_subnet_resource_summary.py | 477 ++++++ .../ip_inventory_vcn_overlap_collection.py | 171 +++ .../ip_inventory_vcn_overlap_summary.py | 169 +++ src/oci/core/models/ipam.py | 73 + .../core/models/list_ip_inventory_details.py | 494 ++++++ src/oci/core/virtual_network_client.py | 502 +++++++ ...ual_network_client_composite_operations.py | 77 + src/oci/database/models/__init__.py | 4 + .../models/cloud_exadata_infrastructure.py | 35 +- .../cloud_exadata_infrastructure_summary.py | 35 +- src/oci/database/models/cloud_vm_cluster.py | 35 +- .../models/cloud_vm_cluster_summary.py | 35 +- .../models/create_cloud_vm_cluster_details.py | 35 +- .../defined_file_system_configuration.py | 165 ++ .../file_system_configuration_detail.py | 103 ++ .../models/update_cloud_vm_cluster_details.py | 35 +- .../disaster_recovery/models/dr_plan_group.py | 47 +- .../models/dr_plan_group_execution.py | 10 +- .../models/update_dr_plan_group_details.py | 47 +- .../models/update_dr_plan_step_details.py | 6 + src/oci/load_balancer/load_balancer_client.py | 1 + src/oci/load_balancer/models/__init__.py | 4 + .../models/add_http_request_header_rule.py | 2 +- .../models/add_http_response_header_rule.py | 2 +- src/oci/load_balancer/models/allow_rule.py | 2 +- src/oci/load_balancer/models/backend.py | 35 + .../load_balancer/models/backend_details.py | 35 + src/oci/load_balancer/models/backend_set.py | 37 + .../models/backend_set_details.py | 37 + .../control_access_using_http_methods_rule.py | 2 +- .../models/create_backend_details.py | 35 + .../models/create_backend_set_details.py | 37 + .../models/create_load_balancer_details.py | 49 +- .../models/create_ssl_cipher_suite_details.py | 50 +- .../extend_http_request_header_value_rule.py | 2 +- .../extend_http_response_header_value_rule.py | 2 +- .../load_balancer/models/http_header_rule.py | 2 +- .../models/ip_based_max_connections_rule.py | 118 ++ .../models/ip_max_connections.py | 105 ++ src/oci/load_balancer/models/load_balancer.py | 45 + src/oci/load_balancer/models/redirect_rule.py | 2 +- .../models/remove_http_request_header_rule.py | 2 +- .../remove_http_response_header_rule.py | 2 +- src/oci/load_balancer/models/reserved_ip.py | 22 + src/oci/load_balancer/models/rule.py | 14 +- .../load_balancer/models/ssl_cipher_suite.py | 50 +- .../models/ssl_cipher_suite_details.py | 50 +- .../models/update_backend_details.py | 35 + .../models/update_backend_set_details.py | 37 + .../models/update_load_balancer_details.py | 47 + .../update_load_balancer_shape_details.py | 4 +- .../models/update_ssl_cipher_suite_details.py | 20 +- src/oci/version.py | 2 +- 111 files changed, 7259 insertions(+), 755 deletions(-) create mode 100644 docs/api/bds/models/oci.bds.models.BatchingBasedPatchingConfigs.rst create mode 100644 docs/api/bds/models/oci.bds.models.DowntimeBasedPatchingConfigs.rst create mode 100644 docs/api/bds/models/oci.bds.models.PatchingConfigs.rst create mode 100644 docs/api/core/models/oci.core.models.GetIpInventoryVcnOverlapDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InventoryIpAddressSummary.rst create mode 100644 docs/api/core/models/oci.core.models.InventoryResourceSummary.rst create mode 100644 docs/api/core/models/oci.core.models.InventorySubnetCidrBlockSummary.rst create mode 100644 docs/api/core/models/oci.core.models.InventorySubnetSummary.rst create mode 100644 docs/api/core/models/oci.core.models.InventoryVcnCidrBlockSummary.rst create mode 100644 docs/api/core/models/oci.core.models.InventoryVcnSummary.rst create mode 100644 docs/api/core/models/oci.core.models.IpInventoryCidrUtilizationCollection.rst create mode 100644 docs/api/core/models/oci.core.models.IpInventoryCidrUtilizationSummary.rst create mode 100644 docs/api/core/models/oci.core.models.IpInventoryCollection.rst create mode 100644 docs/api/core/models/oci.core.models.IpInventorySubnetResourceCollection.rst create mode 100644 docs/api/core/models/oci.core.models.IpInventorySubnetResourceSummary.rst create mode 100644 docs/api/core/models/oci.core.models.IpInventoryVcnOverlapCollection.rst create mode 100644 docs/api/core/models/oci.core.models.IpInventoryVcnOverlapSummary.rst create mode 100644 docs/api/core/models/oci.core.models.Ipam.rst create mode 100644 docs/api/core/models/oci.core.models.ListIpInventoryDetails.rst create mode 100644 docs/api/database/models/oci.database.models.DefinedFileSystemConfiguration.rst create mode 100644 docs/api/database/models/oci.database.models.FileSystemConfigurationDetail.rst create mode 100644 docs/api/load_balancer/models/oci.load_balancer.models.IpBasedMaxConnectionsRule.rst create mode 100644 docs/api/load_balancer/models/oci.load_balancer.models.IpMaxConnections.rst mode change 100755 => 100644 examples/object_storage/object_storage_list_folders.py create mode 100644 src/oci/bds/models/batching_based_patching_configs.py create mode 100644 src/oci/bds/models/downtime_based_patching_configs.py create mode 100644 src/oci/bds/models/patching_configs.py create mode 100644 src/oci/core/models/get_ip_inventory_vcn_overlap_details.py create mode 100644 src/oci/core/models/inventory_ip_address_summary.py create mode 100644 src/oci/core/models/inventory_resource_summary.py create mode 100644 src/oci/core/models/inventory_subnet_cidr_block_summary.py create mode 100644 src/oci/core/models/inventory_subnet_summary.py create mode 100644 src/oci/core/models/inventory_vcn_cidr_block_summary.py create mode 100644 src/oci/core/models/inventory_vcn_summary.py create mode 100644 src/oci/core/models/ip_inventory_cidr_utilization_collection.py create mode 100644 src/oci/core/models/ip_inventory_cidr_utilization_summary.py create mode 100644 src/oci/core/models/ip_inventory_collection.py create mode 100644 src/oci/core/models/ip_inventory_subnet_resource_collection.py create mode 100644 src/oci/core/models/ip_inventory_subnet_resource_summary.py create mode 100644 src/oci/core/models/ip_inventory_vcn_overlap_collection.py create mode 100644 src/oci/core/models/ip_inventory_vcn_overlap_summary.py create mode 100644 src/oci/core/models/ipam.py create mode 100644 src/oci/core/models/list_ip_inventory_details.py create mode 100644 src/oci/database/models/defined_file_system_configuration.py create mode 100644 src/oci/database/models/file_system_configuration_detail.py create mode 100644 src/oci/load_balancer/models/ip_based_max_connections_rule.py create mode 100644 src/oci/load_balancer/models/ip_max_connections.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c2d23fca5e..d6b37455ef 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,20 @@ Change Log All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.126.2 - 2024-05-07 +==================== + +Added +----- +* Support for resizing of local file systems in the Database service +* Support for adding user defined pause group in disaster recovery plan in the Disaster Recovery service +* Support for OS patching configs in the Big Data service +* Support for IP inventory and notification feature in the Networking service +* Support for accidental delete protection for load balancers, load balancer listeners, and load balancer backends in the Load Balancer service +* Support for backend max connections for load balancers in the Load Balancer service +* Support for listener max connections for load balancers in the Load Balancer service + ==================== 2.126.1 - 2024-04-30 ==================== diff --git a/docs/api/bds.rst b/docs/api/bds.rst index 453cb0a207..e9f5c5a553 100644 --- a/docs/api/bds.rst +++ b/docs/api/bds.rst @@ -37,6 +37,7 @@ Bds oci.bds.models.AutoScalePolicyRule oci.bds.models.AutoScalingConfiguration oci.bds.models.AutoScalingConfigurationSummary + oci.bds.models.BatchingBasedPatchingConfigs oci.bds.models.BdsApiKey oci.bds.models.BdsApiKeySummary oci.bds.models.BdsInstance @@ -58,6 +59,7 @@ Bds oci.bds.models.DayBasedVerticalScalingScheduleDetails oci.bds.models.DefaultError oci.bds.models.DisableCertificateDetails + oci.bds.models.DowntimeBasedPatchingConfigs oci.bds.models.EnableCertificateDetails oci.bds.models.ExecuteBootstrapScriptDetails oci.bds.models.HorizontalScalingScheduleDetails @@ -80,6 +82,7 @@ Bds oci.bds.models.OsPatchSummary oci.bds.models.PatchHistorySummary oci.bds.models.PatchSummary + oci.bds.models.PatchingConfigs oci.bds.models.RemoveAutoScalingConfigurationDetails oci.bds.models.RemoveCloudSqlDetails oci.bds.models.RemoveKafkaDetails diff --git a/docs/api/bds/models/oci.bds.models.BatchingBasedPatchingConfigs.rst b/docs/api/bds/models/oci.bds.models.BatchingBasedPatchingConfigs.rst new file mode 100644 index 0000000000..301e33ee8a --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.BatchingBasedPatchingConfigs.rst @@ -0,0 +1,11 @@ +BatchingBasedPatchingConfigs +============================ + +.. currentmodule:: oci.bds.models + +.. autoclass:: BatchingBasedPatchingConfigs + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.DowntimeBasedPatchingConfigs.rst b/docs/api/bds/models/oci.bds.models.DowntimeBasedPatchingConfigs.rst new file mode 100644 index 0000000000..1b5f29e4b7 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.DowntimeBasedPatchingConfigs.rst @@ -0,0 +1,11 @@ +DowntimeBasedPatchingConfigs +============================ + +.. currentmodule:: oci.bds.models + +.. autoclass:: DowntimeBasedPatchingConfigs + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/bds/models/oci.bds.models.PatchingConfigs.rst b/docs/api/bds/models/oci.bds.models.PatchingConfigs.rst new file mode 100644 index 0000000000..18cafab742 --- /dev/null +++ b/docs/api/bds/models/oci.bds.models.PatchingConfigs.rst @@ -0,0 +1,11 @@ +PatchingConfigs +=============== + +.. currentmodule:: oci.bds.models + +.. autoclass:: PatchingConfigs + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core.rst b/docs/api/core.rst index c175bc3b32..39cfc598a4 100644 --- a/docs/api/core.rst +++ b/docs/api/core.rst @@ -299,6 +299,7 @@ Core Services oci.core.models.FlowLogCaptureFilterRuleDetails oci.core.models.GenericBmLaunchInstancePlatformConfig oci.core.models.GenericBmPlatformConfig + oci.core.models.GetIpInventoryVcnOverlapDetails oci.core.models.GetPublicIpByIpAddressDetails oci.core.models.GetPublicIpByPrivateIpIdDetails oci.core.models.IPSecConnection @@ -394,6 +395,20 @@ Core Services oci.core.models.IntelVmPlatformConfig oci.core.models.IntelVmUpdateInstancePlatformConfig oci.core.models.InternetGateway + oci.core.models.InventoryIpAddressSummary + oci.core.models.InventoryResourceSummary + oci.core.models.InventorySubnetCidrBlockSummary + oci.core.models.InventorySubnetSummary + oci.core.models.InventoryVcnCidrBlockSummary + oci.core.models.InventoryVcnSummary + oci.core.models.IpInventoryCidrUtilizationCollection + oci.core.models.IpInventoryCidrUtilizationSummary + oci.core.models.IpInventoryCollection + oci.core.models.IpInventorySubnetResourceCollection + oci.core.models.IpInventorySubnetResourceSummary + oci.core.models.IpInventoryVcnOverlapCollection + oci.core.models.IpInventoryVcnOverlapSummary + oci.core.models.Ipam oci.core.models.IpsecTunnelDrgAttachmentNetworkDetails oci.core.models.Ipv6 oci.core.models.Ipv6AddressIpv6SubnetCidrPairDetails @@ -408,6 +423,7 @@ Core Services oci.core.models.LaunchInstanceShapeConfigDetails oci.core.models.LaunchOptions oci.core.models.LetterOfAuthority + oci.core.models.ListIpInventoryDetails oci.core.models.LocalPeeringGateway oci.core.models.LoopBackDrgAttachmentNetworkDetails oci.core.models.MacsecKey diff --git a/docs/api/core/models/oci.core.models.GetIpInventoryVcnOverlapDetails.rst b/docs/api/core/models/oci.core.models.GetIpInventoryVcnOverlapDetails.rst new file mode 100644 index 0000000000..f27b267d37 --- /dev/null +++ b/docs/api/core/models/oci.core.models.GetIpInventoryVcnOverlapDetails.rst @@ -0,0 +1,11 @@ +GetIpInventoryVcnOverlapDetails +=============================== + +.. currentmodule:: oci.core.models + +.. autoclass:: GetIpInventoryVcnOverlapDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.InventoryIpAddressSummary.rst b/docs/api/core/models/oci.core.models.InventoryIpAddressSummary.rst new file mode 100644 index 0000000000..fcf65c7275 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InventoryIpAddressSummary.rst @@ -0,0 +1,11 @@ +InventoryIpAddressSummary +========================= + +.. currentmodule:: oci.core.models + +.. autoclass:: InventoryIpAddressSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.InventoryResourceSummary.rst b/docs/api/core/models/oci.core.models.InventoryResourceSummary.rst new file mode 100644 index 0000000000..3b105a4ba8 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InventoryResourceSummary.rst @@ -0,0 +1,11 @@ +InventoryResourceSummary +======================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InventoryResourceSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.InventorySubnetCidrBlockSummary.rst b/docs/api/core/models/oci.core.models.InventorySubnetCidrBlockSummary.rst new file mode 100644 index 0000000000..7984e2cebc --- /dev/null +++ b/docs/api/core/models/oci.core.models.InventorySubnetCidrBlockSummary.rst @@ -0,0 +1,11 @@ +InventorySubnetCidrBlockSummary +=============================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InventorySubnetCidrBlockSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.InventorySubnetSummary.rst b/docs/api/core/models/oci.core.models.InventorySubnetSummary.rst new file mode 100644 index 0000000000..3a355f67d8 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InventorySubnetSummary.rst @@ -0,0 +1,11 @@ +InventorySubnetSummary +====================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InventorySubnetSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.InventoryVcnCidrBlockSummary.rst b/docs/api/core/models/oci.core.models.InventoryVcnCidrBlockSummary.rst new file mode 100644 index 0000000000..4ff231c3d3 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InventoryVcnCidrBlockSummary.rst @@ -0,0 +1,11 @@ +InventoryVcnCidrBlockSummary +============================ + +.. currentmodule:: oci.core.models + +.. autoclass:: InventoryVcnCidrBlockSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.InventoryVcnSummary.rst b/docs/api/core/models/oci.core.models.InventoryVcnSummary.rst new file mode 100644 index 0000000000..e40eee8f1d --- /dev/null +++ b/docs/api/core/models/oci.core.models.InventoryVcnSummary.rst @@ -0,0 +1,11 @@ +InventoryVcnSummary +=================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InventoryVcnSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.IpInventoryCidrUtilizationCollection.rst b/docs/api/core/models/oci.core.models.IpInventoryCidrUtilizationCollection.rst new file mode 100644 index 0000000000..64eebe1d87 --- /dev/null +++ b/docs/api/core/models/oci.core.models.IpInventoryCidrUtilizationCollection.rst @@ -0,0 +1,11 @@ +IpInventoryCidrUtilizationCollection +==================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: IpInventoryCidrUtilizationCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.IpInventoryCidrUtilizationSummary.rst b/docs/api/core/models/oci.core.models.IpInventoryCidrUtilizationSummary.rst new file mode 100644 index 0000000000..4bbab314aa --- /dev/null +++ b/docs/api/core/models/oci.core.models.IpInventoryCidrUtilizationSummary.rst @@ -0,0 +1,11 @@ +IpInventoryCidrUtilizationSummary +================================= + +.. currentmodule:: oci.core.models + +.. autoclass:: IpInventoryCidrUtilizationSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.IpInventoryCollection.rst b/docs/api/core/models/oci.core.models.IpInventoryCollection.rst new file mode 100644 index 0000000000..659db79ddc --- /dev/null +++ b/docs/api/core/models/oci.core.models.IpInventoryCollection.rst @@ -0,0 +1,11 @@ +IpInventoryCollection +===================== + +.. currentmodule:: oci.core.models + +.. autoclass:: IpInventoryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.IpInventorySubnetResourceCollection.rst b/docs/api/core/models/oci.core.models.IpInventorySubnetResourceCollection.rst new file mode 100644 index 0000000000..46f58f0731 --- /dev/null +++ b/docs/api/core/models/oci.core.models.IpInventorySubnetResourceCollection.rst @@ -0,0 +1,11 @@ +IpInventorySubnetResourceCollection +=================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: IpInventorySubnetResourceCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.IpInventorySubnetResourceSummary.rst b/docs/api/core/models/oci.core.models.IpInventorySubnetResourceSummary.rst new file mode 100644 index 0000000000..e874b617ba --- /dev/null +++ b/docs/api/core/models/oci.core.models.IpInventorySubnetResourceSummary.rst @@ -0,0 +1,11 @@ +IpInventorySubnetResourceSummary +================================ + +.. currentmodule:: oci.core.models + +.. autoclass:: IpInventorySubnetResourceSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.IpInventoryVcnOverlapCollection.rst b/docs/api/core/models/oci.core.models.IpInventoryVcnOverlapCollection.rst new file mode 100644 index 0000000000..be07737d83 --- /dev/null +++ b/docs/api/core/models/oci.core.models.IpInventoryVcnOverlapCollection.rst @@ -0,0 +1,11 @@ +IpInventoryVcnOverlapCollection +=============================== + +.. currentmodule:: oci.core.models + +.. autoclass:: IpInventoryVcnOverlapCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.IpInventoryVcnOverlapSummary.rst b/docs/api/core/models/oci.core.models.IpInventoryVcnOverlapSummary.rst new file mode 100644 index 0000000000..a2ee24441d --- /dev/null +++ b/docs/api/core/models/oci.core.models.IpInventoryVcnOverlapSummary.rst @@ -0,0 +1,11 @@ +IpInventoryVcnOverlapSummary +============================ + +.. currentmodule:: oci.core.models + +.. autoclass:: IpInventoryVcnOverlapSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.Ipam.rst b/docs/api/core/models/oci.core.models.Ipam.rst new file mode 100644 index 0000000000..c5c7473d5e --- /dev/null +++ b/docs/api/core/models/oci.core.models.Ipam.rst @@ -0,0 +1,11 @@ +Ipam +==== + +.. currentmodule:: oci.core.models + +.. autoclass:: Ipam + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.ListIpInventoryDetails.rst b/docs/api/core/models/oci.core.models.ListIpInventoryDetails.rst new file mode 100644 index 0000000000..88c41344b1 --- /dev/null +++ b/docs/api/core/models/oci.core.models.ListIpInventoryDetails.rst @@ -0,0 +1,11 @@ +ListIpInventoryDetails +====================== + +.. currentmodule:: oci.core.models + +.. autoclass:: ListIpInventoryDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/database.rst b/docs/api/database.rst index 43de785392..439a08cf55 100644 --- a/docs/api/database.rst +++ b/docs/api/database.rst @@ -219,6 +219,7 @@ Database oci.database.models.DbSystemUpgradeHistoryEntry oci.database.models.DbSystemUpgradeHistoryEntrySummary oci.database.models.DbVersionSummary + oci.database.models.DefinedFileSystemConfiguration oci.database.models.DeregisterAutonomousDatabaseDataSafeDetails oci.database.models.DisasterRecoveryConfiguration oci.database.models.DiskPerformanceDetails @@ -259,6 +260,7 @@ Database oci.database.models.ExternalPluggableDatabase oci.database.models.ExternalPluggableDatabaseSummary oci.database.models.FailoverDataGuardAssociationDetails + oci.database.models.FileSystemConfigurationDetail oci.database.models.FlexComponentCollection oci.database.models.FlexComponentSummary oci.database.models.GenerateAutonomousDatabaseWalletDetails diff --git a/docs/api/database/models/oci.database.models.DefinedFileSystemConfiguration.rst b/docs/api/database/models/oci.database.models.DefinedFileSystemConfiguration.rst new file mode 100644 index 0000000000..dde4832ac3 --- /dev/null +++ b/docs/api/database/models/oci.database.models.DefinedFileSystemConfiguration.rst @@ -0,0 +1,11 @@ +DefinedFileSystemConfiguration +============================== + +.. currentmodule:: oci.database.models + +.. autoclass:: DefinedFileSystemConfiguration + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/database/models/oci.database.models.FileSystemConfigurationDetail.rst b/docs/api/database/models/oci.database.models.FileSystemConfigurationDetail.rst new file mode 100644 index 0000000000..67cb5297b7 --- /dev/null +++ b/docs/api/database/models/oci.database.models.FileSystemConfigurationDetail.rst @@ -0,0 +1,11 @@ +FileSystemConfigurationDetail +============================= + +.. currentmodule:: oci.database.models + +.. autoclass:: FileSystemConfigurationDetail + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/load_balancer.rst b/docs/api/load_balancer.rst index 73ffb6416b..0a1a6168df 100644 --- a/docs/api/load_balancer.rst +++ b/docs/api/load_balancer.rst @@ -53,6 +53,8 @@ Load Balancer oci.load_balancer.models.HostnameDetails oci.load_balancer.models.HttpHeaderRule oci.load_balancer.models.IpAddress + oci.load_balancer.models.IpBasedMaxConnectionsRule + oci.load_balancer.models.IpMaxConnections oci.load_balancer.models.LBCookieSessionPersistenceConfigurationDetails oci.load_balancer.models.Listener oci.load_balancer.models.ListenerDetails diff --git a/docs/api/load_balancer/models/oci.load_balancer.models.IpBasedMaxConnectionsRule.rst b/docs/api/load_balancer/models/oci.load_balancer.models.IpBasedMaxConnectionsRule.rst new file mode 100644 index 0000000000..f56f704512 --- /dev/null +++ b/docs/api/load_balancer/models/oci.load_balancer.models.IpBasedMaxConnectionsRule.rst @@ -0,0 +1,11 @@ +IpBasedMaxConnectionsRule +========================= + +.. currentmodule:: oci.load_balancer.models + +.. autoclass:: IpBasedMaxConnectionsRule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/load_balancer/models/oci.load_balancer.models.IpMaxConnections.rst b/docs/api/load_balancer/models/oci.load_balancer.models.IpMaxConnections.rst new file mode 100644 index 0000000000..f347e3d5e4 --- /dev/null +++ b/docs/api/load_balancer/models/oci.load_balancer.models.IpMaxConnections.rst @@ -0,0 +1,11 @@ +IpMaxConnections +================ + +.. currentmodule:: oci.load_balancer.models + +.. autoclass:: IpMaxConnections + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/examples/object_storage/README.md b/examples/object_storage/README.md index fc96edab1a..f0e8a2f7a3 100644 --- a/examples/object_storage/README.md +++ b/examples/object_storage/README.md @@ -6,6 +6,22 @@ Object Storage Manipulation Tool allow customer to handle millions of object sto **Developed by Adi Zohar, 2021-2022** +## My Other Projects + +- [ShowOCI](https://github.com/oracle/oci-python-sdk/tree/master/examples/showoci) + +- [ShowUsage](https://github.com/oracle/oci-python-sdk/tree/master/examples/showusage) + +- [ShowSubscription](https://github.com/oracle/oci-python-sdk/tree/master/examples/showsubscription) + +- [ShowRewards](https://github.com/oracle/oci-python-sdk/tree/master/examples/showrewards) + +- [List Resources in Tenancy](https://github.com/oracle/oci-python-sdk/tree/master/examples/list_resources_in_tenancy) + +- [Tag Resources in Tenancy](https://github.com/oracle/oci-python-sdk/tree/master/examples/tag_resources_in_tenancy) + +- [Usage2ADW](https://github.com/oracle-samples/usage-reports-to-adw) + ## Executing using Cloud Shell: ``` 1. install oci sdk package @@ -157,29 +173,4 @@ optional arguments: -sn SOURCE_NAMESPACE Source Namespace (Default current connection) -textrem TEXT_REMOVE text remove prefix (can be used to remove folder) -textadd TEXT_APPEND text append prefix (can be used to add folder) -``` - -## object_storage_list_folders -Bulk list bucket folders sizes and object count - -``` -usage: object_storage_list_folders.py [-h] [-t CONFIG_PROFILE] [-p PROXY] - [-ip] [-dt] [-c CONFIG_FILE] - [-sb SOURCE_BUCKET] [-sp SOURCE_PREFIX] - [-sn SOURCE_NAMESPACE] - [-sr SOURCE_REGION] - [-f FILE] - -optional arguments: - -h, --help show this help message and exit - -t CONFIG_PROFILE Config file section to use (tenancy profile) - -p PROXY Set Proxy (i.e. www-proxy-server.com:80) - -ip Use Instance Principals for Authentication - -dt Use Delegation Token for Authentication - -c CONFIG_FILE Config File (default=~/.oci/config) - -sb SOURCE_BUCKET Source Bucket Name - -sp SOURCE_PREFIX Source Prefix Include - -sr SOURCE_REGION Source Region - -sn SOURCE_NAMESPACE Source Namespace (Default current connection) - -f FILE Output to file (as csv) -``` +``` \ No newline at end of file diff --git a/examples/object_storage/object_storage_list_folders.py b/examples/object_storage/object_storage_list_folders.py old mode 100755 new mode 100644 diff --git a/examples/showoci/README.md b/examples/showoci/README.md index f52576328c..75a5373909 100644 --- a/examples/showoci/README.md +++ b/examples/showoci/README.md @@ -30,6 +30,24 @@ Developed by Adi Zohar, 2018-2024, Contributors: Olaf Heimburger [9. Example of ShowOCI Reports](#9-example-of-showoci-reports) +## My Other Projects + +- [ShowUsage](https://github.com/oracle/oci-python-sdk/tree/master/examples/showusage) + +- [ShowSubscription](https://github.com/oracle/oci-python-sdk/tree/master/examples/showsubscription) + +- [ShowRewards](https://github.com/oracle/oci-python-sdk/tree/master/examples/showrewards) + +- [List Resources in Tenancy](https://github.com/oracle/oci-python-sdk/tree/master/examples/list_resources_in_tenancy) + +- [Object Storage Tools](https://github.com/oracle/oci-python-sdk/tree/master/examples/object_storage) + +- [Tag Resources in Tenancy](https://github.com/oracle/oci-python-sdk/tree/master/examples/tag_resources_in_tenancy) + +- [Usage2ADW](https://github.com/oracle-samples/usage-reports-to-adw) + +## ShowOCI + ![xls](img/screen_xls.png) ![screen1](img/screen_scr1.png) ![screen2](img/screen_scr2.png) diff --git a/examples/showoci/showoci_output.py b/examples/showoci/showoci_output.py index 4c93dc8b03..48a314c117 100644 --- a/examples/showoci/showoci_output.py +++ b/examples/showoci/showoci_output.py @@ -6151,6 +6151,7 @@ def __csv_database_db_system(self, region_name, list_db_systems): 'memory_gb': dbs['shape_memory_gb'], 'local_storage_tb': dbs['shape_storage_tb'], 'node_count': len(dbs['db_nodes']), + 'db_name': db['db_name'], 'database': db['name'], 'database_edition': dbs['database_edition_short'], 'license_model': dbs['license_model'], diff --git a/examples/showoci/showoci_service.py b/examples/showoci/showoci_service.py index 7facbdbf2a..fc7d464226 100644 --- a/examples/showoci/showoci_service.py +++ b/examples/showoci/showoci_service.py @@ -431,7 +431,7 @@ class ShowOCIService(object): {'shape': 'Exadata.Full3.400', 'cpu': 400, 'memory': 5760, 'storage': 598}, {'shape': 'Exadata.Half3.200', 'cpu': 200, 'memory': 2880, 'storage': 298}, {'shape': 'Exadata.Quarter3.100', 'cpu': 100, 'memory': 1440, 'storage': 149}, - {'shape': 'Exadata.X8M', 'cpu': 100, 'memory': 1440, 'storage': 149}, + {'shape': 'Exadata.X8M', 'cpu': 100, 'memory': 2780, 'storage': 149}, {'shape': 'Exadata.Base.48', 'cpu': 48, 'memory': 720, 'storage': 74.8}, {'shape': 'VM.CPU3.1', 'cpu': 6, 'memory': 90, 'storage': 0}, {'shape': 'VM.CPU3.2', 'cpu': 12, 'memory': 180, 'storage': 0}, @@ -9312,13 +9312,13 @@ def __load_database_exadata_infrastructure(self, database_client, virtual_networ if dbs.compute_count != "2" or dbs.storage_count != "3": value['shape_ocpu'] = dbs.compute_count * 50 value['shape_storage_tb'] = dbs.storage_count * 49.5 - value['shape_memory_gb'] = dbs.compute_count * 720 + value['shape_memory_gb'] = dbs.compute_count * 1390 if dbs.shape == "Exadata.X9M": if dbs.compute_count != "2" or dbs.storage_count != "3": value['shape_ocpu'] = dbs.compute_count * 126 value['shape_storage_tb'] = dbs.storage_count * 64 - value['shape_memory_gb'] = dbs.compute_count * 1300 + value['shape_memory_gb'] = dbs.compute_count * 1390 # add the data cnt += 1 @@ -17578,10 +17578,14 @@ def __load_security_kms_keys(self, search_client): type='Structured', matching_context_type=oci.resource_search.models.SearchDetails.MATCHING_CONTEXT_TYPE_NONE ) - keys = search_client.search_resources(key_search_detail, retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY).data + keys = oci.pagination.list_call_get_all_results( + search_client.search_resources, + key_search_detail, + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY + ).data # item = oci.key_management.models.VaultSummary - for item in keys.items: + for item in keys: if self.check_lifecycle_state_active(item.lifecycle_state): compartment = self.get_compartment_by_id(item.compartment_id) diff --git a/examples/showrewards/README.md b/examples/showrewards/README.md index b755c077ad..f2920f73dd 100644 --- a/examples/showrewards/README.md +++ b/examples/showrewards/README.md @@ -83,6 +83,23 @@ optional arguments: -csv Write to CSV files - rewards.csv, redemption.csv, reward_products.csv if -include_products specificed ``` +## My Other Projects + +- [ShowOCI](https://github.com/oracle/oci-python-sdk/tree/master/examples/showoci) + +- [ShowSubscription](https://github.com/oracle/oci-python-sdk/tree/master/examples/showsubscription) + +- [ShowRewards](https://github.com/oracle/oci-python-sdk/tree/master/examples/showrewards) + +- [List Resources in Tenancy](https://github.com/oracle/oci-python-sdk/tree/master/examples/list_resources_in_tenancy) + +- [Object Storage Tools](https://github.com/oracle/oci-python-sdk/tree/master/examples/object_storage) + +- [Tag Resources in Tenancy](https://github.com/oracle/oci-python-sdk/tree/master/examples/tag_resources_in_tenancy) + +- [Usage2ADW](https://github.com/oracle-samples/usage-reports-to-adw) + + ## Below example of reports from demo tenancy (random info generated) ``` diff --git a/examples/showsubscription/README.md b/examples/showsubscription/README.md index 9aaf0d1000..3865e7f1c5 100644 --- a/examples/showsubscription/README.md +++ b/examples/showsubscription/README.md @@ -3,7 +3,7 @@ SHOWSUBSCRIPTION is a subscription reporting tool which uses the Python SDK to extract tenant subscription and commit. Authentication by User or Compute using instance principals, -**DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support. +**DISCLAIMER - This is not an official Oracle application, It does not supported by Oracle Support. **Developed by Adi Zohar, 2021-2024** @@ -83,6 +83,22 @@ optional arguments: -f FILE Output to file (as json) ``` +## My Other Projects + +- [ShowOCI](https://github.com/oracle/oci-python-sdk/tree/master/examples/showoci) + +- [ShowUsage](https://github.com/oracle/oci-python-sdk/tree/master/examples/showusage) + +- [ShowRewards](https://github.com/oracle/oci-python-sdk/tree/master/examples/showrewards) + +- [List Resources in Tenancy](https://github.com/oracle/oci-python-sdk/tree/master/examples/list_resources_in_tenancy) + +- [Object Storage Tools](https://github.com/oracle/oci-python-sdk/tree/master/examples/object_storage) + +- [Tag Resources in Tenancy](https://github.com/oracle/oci-python-sdk/tree/master/examples/tag_resources_in_tenancy) + +- [Usage2ADW](https://github.com/oracle-samples/usage-reports-to-adw) + ## Below example of reports from demo tenancy (random info generated) ######################################################################################################################## diff --git a/examples/showusage/README.md b/examples/showusage/README.md index 59eb221579..2e3ea1285e 100644 --- a/examples/showusage/README.md +++ b/examples/showusage/README.md @@ -2,7 +2,7 @@ SHOWUSAGE is a usage reporting tool which uses the Python SDK to extract usage and cost from your tenant. Authentication by User or Compute using instance principals, -Output is printer friendly. +Output is printer friendly or to CSV Files. **DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support, It should NOT be used for utilization calculation purposes, and rather OCI's official [cost analysis](https://docs.oracle.com/en-us/iaas/Content/Billing/Concepts/costanalysisoverview.htm) @@ -11,8 +11,8 @@ and [usage reports](https://docs.oracle.com/en-us/iaas/Content/Billing/Concepts/ **Developed by Adi Zohar, 2021-2024** ## Modules Included: -- oci.identity.IdentityClient -- oci.usage_api.UsageapiClient +- oci.identity.IdentityClient +- oci.usage_api.UsageapiClient ## Executing using Cloud Shell: ``` @@ -22,9 +22,13 @@ and [usage reports](https://docs.oracle.com/en-us/iaas/Content/Billing/Concepts/ 2. clone the oci sdk repo git clone https://github.com/oracle/oci-python-sdk -3. run showoci with delegation token +3. run showusage with delegation token cd oci-python-sdk/examples/showusage - python3 showusage.py -dt -ds 2021-10-01 + python3 showusage.py -dt -ds 2021-10-01 -days 10 + +4. run showusage with delegation token and csv output + cd oci-python-sdk/examples/showusage + python3 showusage.py -dt -ds 2021-10-01 -days 10 -csv ``` ## Installation of Python 3 incase you don't have Python3 installed: @@ -81,10 +85,26 @@ optional arguments: -ds DATE_START Start Date - format YYYY-MM-DD -de DATE_END End Date - format YYYY-MM-DD, (Not Inclusive) -days DAYS Add Days Combined with Start Date (de is ignored if specified) - -report REPORT Report Type = PRODUCT / DAILY / REGION / SERVICE / RESOURCE / TENANT / ALL ( Default = ALL ) - + -report REPORT Report Type = PRODUCT / DAILY / REGION / SERVICE / RESOURCE / TENANT / SPECIAL / ALL ( Default = ALL ) + -csv Write to CSV files instead of output to the screen - usage_*.csv ``` +## My Other Projects + +[1. ShowOCI](https://github.com/oracle/oci-python-sdk/tree/master/examples/showoci) + +[2. ShowSubscription](https://github.com/oracle/oci-python-sdk/tree/master/examples/showsubscription) + +[3. ShowRewards](https://github.com/oracle/oci-python-sdk/tree/master/examples/showrewards) + +[4. List Resources in Tenancy](https://github.com/oracle/oci-python-sdk/tree/master/examples/list_resources_in_tenancy) + +[5. Object Storage Tools](https://github.com/oracle/oci-python-sdk/tree/master/examples/object_storage) + +[6. Tag Resources in Tenanct](https://github.com/oracle/oci-python-sdk/tree/master/examples/tag_resources_in_tenancy) + +[7. Usage2ADW](https://github.com/oracle-samples/usage-reports-to-adw) + ## Below example of reports from demo tenancy (random costs generated) ``` @@ -94,15 +114,15 @@ optional arguments: Author : Adi Zohar Disclaimer : This is not an official Oracle application, It does not supported by Oracle, It should NOT be used for utilization calculation purposes ! : Last 2 days may not be filled and should not be used -Machine : adiwrk (x86_64) -App Version : 2024.04.17 -OCI SDK Version : 2.45.1 -Python Version : 3.6.8 +Machine : test (x86_64) +App Version : 2024.05.01 +OCI SDK Version : 2.126.0 +Python Version : 3.9.13 Authentication : Config File -Date/Time : 2024-04-17 12:57:15 -Command Line : -ds 2021-09-01 -de 2021-10-01 -Start Date : 09/01/2021 -End Date : 10/01/2021 Not Included +Date/Time : 2024-05-02 09:50:30 +Command Line : -ds 2024-03-01 -days 30 +Start Date : 03/01/2024 +End Date : 03/31/2024 Not Included ######################################################################################################################## # Fetching data # @@ -110,115 +130,195 @@ End Date : 10/01/2021 Not Included Connecting to Identity Service... -Tenant Name : oraxxxxxxxxx -Tenant Id : ocid1.tenancy.oc1..aaaaaaaaxtkkpxc5qwgpwx7y2wt5pinegyzea4uaxxxxxxxxxxxxxxxxxxx +Tenant Name : testtenant +Tenant Id : ocid1.tenancy.oc1..xxxxxxxxxxxxx Home Region : us-ashburn-1 Connecting to UsageAPI Service... ##################################################################################### -# Daily Summary for 09/01/2021 - 09/30/2021 # +# Daily Summary for 03/01/2024 - 03/30/2024 # ##################################################################################### Day Cost Month-31 Year =============== ============== ============== ============== -2021-09-01 118.8 3,681 43,346 -2021-09-02 120.7 3,741 44,042 -2021-09-03 118.0 3,658 43,068 -2021-09-04 117.2 3,632 42,765 -2021-09-05 117.1 3,630 42,743 -2021-09-06 117.0 3,626 42,692 -2021-09-07 120.0 3,719 43,783 -2021-09-08 117.7 3,650 42,972 -2021-09-09 117.5 3,642 42,886 -2021-09-10 116.0 3,596 42,340 -2021-09-11 115.7 3,587 42,229 -2021-09-12 115.6 3,585 42,210 -2021-09-13 118.3 3,668 43,183 -2021-09-14 117.0 3,628 42,713 -2021-09-15 117.2 3,633 42,779 -2021-09-16 118.9 3,686 43,396 -2021-09-17 118.1 3,660 43,097 -2021-09-18 122.6 3,800 44,742 -2021-09-19 122.0 3,782 44,532 -2021-09-20 123.4 3,827 45,055 -2021-09-21 643.5 19,947 234,863 -2021-09-22 124.6 3,862 45,474 -2021-09-23 125.5 3,889 45,794 -2021-09-24 126.2 3,912 46,060 -2021-09-25 724.8 22,470 264,570 -2021-09-26 125.2 3,881 45,699 -2021-09-27 3,300.2 102,307 1,204,587 -2021-09-28 133.7 4,144 48,793 -2021-09-29 131.5 4,076 47,994 -2021-09-30 133.6 4,141 48,761 +2024-03-01 310.1 9,614 113,200 +2024-03-02 314.8 9,758 114,890 +2024-03-03 316.8 9,821 115,633 +2024-03-04 317.4 9,839 115,847 +2024-03-05 325.7 10,095 118,862 +2024-03-06 318.5 9,874 116,255 +2024-03-07 315.2 9,773 115,066 +2024-03-08 318.2 9,863 116,128 +2024-03-09 317.2 9,834 115,789 +2024-03-10 317.1 9,831 115,750 +2024-03-11 317.1 9,830 115,743 +2024-03-12 321.9 9,978 117,485 +2024-03-13 321.7 9,974 117,438 +2024-03-14 326.1 10,110 119,037 +2024-03-15 324.6 10,063 118,486 +2024-03-16 321.7 9,973 117,428 +2024-03-17 322.4 9,995 117,680 +2024-03-18 321.5 9,966 117,339 +2024-03-19 321.8 9,975 117,450 +2024-03-20 324.4 10,057 118,416 +2024-03-21 333.3 10,331 121,643 +2024-03-22 327.2 10,144 119,441 +2024-03-23 325.9 10,104 118,962 +2024-03-24 325.9 10,104 118,963 +2024-03-25 327.6 10,155 119,562 +2024-03-26 332.6 10,312 121,413 +2024-03-27 459.1 14,232 167,575 +2024-03-28 582.3 18,053 212,554 +2024-03-29 582.3 18,052 212,546 +2024-03-30 581.9 18,040 212,408 =============== ============== ============== ============== -Total 7,937.5 +Total 10,572.6 + +##################################################################################### +# Product Summary for 03/01/2024 - 03/30/2024 in USD # +##################################################################################### + +Product Days Quantity OSR Eligible Cost Month-31 Year +================================================================= ========= ============= ============ ============ ============ ============ +B88317 - Virtual Machine Standard - X5 - 1.2XL 30 0.0 0.0 0.0 0 0 +B89738 - NoSQL Database Cloud Service - Provisioned Read Units 30 1.9 0.0 0.0 0 0 +B88525 - DNS - Queries 30 0.0 0.0 0.0 0 0 +B89739 - NoSQL Database Cloud Service - Storage 30 1.9 0.0 0.0 0 0 +B108077 - Oracle Cloud Infrastructure Generative AI - Large Coher 30 0.6 0.0 0.0 0 0 +B108080 - Oracle Cloud Infrastructure Generative AI - Llama2-70 30 1.0 0.0 0.0 0 0 +B89737 - NoSQL Database Cloud Service - Provisioned Write Units 30 1.9 0.0 0.0 0 0 +B92963 - MySQL Database Service - Standard - E3 - Memory 30 30.4 0.1 0.1 0 1 +B89643 - Oracle Integration - Standard - BYOL 30 7.0 0.1 0.1 0 1 +B92072 - API Calls 30 0.0 0.1 0.1 0 1 +B92024 - MySQL Database for HeatWave - Standard - Node per hour 30 0.3 0.1 0.1 0 1 +B89057 - File Storage 30 10.5 0.1 0.1 0 1 +B92962 - MySQL Database Service - Standard - E3 30 3.8 0.1 0.1 0 2 +B90323 - Health Checks - Basic 30 1.9 0.1 0.1 0 2 +B89644 - Oracle Integration - Enterprise - BYOL 30 18.0 0.2 0.2 0 2 +B88327 - Outbound Data Transfer for Volume Replica Zone 1 30 85.0 0.2 0.2 0 2 +B89639 - Oracle Integration - Standard 30 9.0 0.2 0.2 0 3 +B93000 - Infrequent Access Storage 30 121.8 0.2 0.2 0 3 +B88167 - Oracle Identity Cloud - Standard - Active User Per Hour 30 308.0 0.4 0.4 0 4 +B90453 - Oracle Autonomous Transaction Processing 30 8.6 0.4 0.4 0 5 +B91627 - Object Storage - Requests 30 157.9 0.5 0.5 1 6 +B89640 - Oracle Integration - Enterprise 30 11.0 0.5 0.5 1 6 +B90260 - Oracle Digital Assistance Cloud Service - Requests 30 5,500.0 0.6 0.6 1 7 +B97385 - Standard - E5 - Memory 30 302.1 0.6 0.6 1 7 +B96200 - Oracle Cloud Infrastructure - Database Management - Auto 30 70.2 1.8 1.8 2 21 +B97384 - Standard - E5 30 61.7 1.8 1.8 2 23 +B89636 - Oracle Analytics Cloud - Professional - BYOL 30 216.0 2.1 2.1 2 25 +B92593 - Logging - Storage 30 79.0 3.5 3.5 4 42 +B92426 - MySQL Database Service - Storage 30 2,417.4 3.6 3.6 4 44 +B92307 - Notebook Session - Compute - E3 - GB's Per Hour 30 12,029.8 4.5 4.5 5 55 +B92306 - Notebook Session - Compute - E3 - OCPU's Per Hour 30 751.9 4.7 4.7 5 57 +B89040 - Oracle Autonomous Data Warehouse 30 105.5 5.3 5.3 5 65 +B88318 - Windows OS 30 1,468.8 0.0 7.5 8 91 +B88319 - Oracle Bare Metal Cloud - 100 Mbps Load Balancer 30 1,440.2 7.7 7.7 8 93 +B90573 - Database Cloud Service - All Editions - BYOL 30 2,192.8 12.7 12.7 13 155 +B92092 - Key Management Service - Key Version Counts 30 41.3 14.2 14.2 15 173 +B92890 - Operations Insights for External Oracle Databases and Ho 30 1,440.0 21.6 21.6 22 263 +B93031 - Flexible Load Balancer Bandwidth 30 230,401.7 22.3 22.3 23 271 +B88514 - Model Deployment - Compute - Standard2 30 1,440.0 23.0 23.0 24 279 +B93312 - Optimized - X9 - Memory 30 20,541.9 30.8 30.8 32 375 +B89637 - Oracle Analytics Cloud - Enterprise - BYOL 30 3,204.0 31.0 31.0 32 377 +... +================================================================= ========= ============= ============ ============ ============ ============ +Total 10,565.1 10,572.6 10,925 128,633 + +##################################################################################### +# Region Summary for 03/01/2024 - 03/30/2024 in USD # +##################################################################################### + +Region Days Cost Month-31 Year +========================= ========= ============ ============ ============ +uk-london-1 30 901.5 932 10,968 +us-phoenix-1 30 4,129.1 4,267 50,238 +us-ashburn-1 30 5,407.6 5,588 65,793 +========================= ========= ============ ============ ============ +Total 10,572.6 10,925 128,633 + +##################################################################################### +# Service Summary for 03/01/2024 - 03/30/2024 in USD # +##################################################################################### + +Service Days Quantity OSR Eligible Cost Month-31 Year +============================================= ========= ============= ============== ============ ============ ============ +DevOps Service 30 0.0 0.0 0.0 0 0 +DNS 30 0.0 0.0 0.0 0 0 +Oracle Cloud Infrastructure Generative AI 30 1.6 0.0 0.0 0 0 +NoSQL Database 30 5.8 0.0 0.0 0 0 +Identity Cloud Service 30 33.0 0.0 0.0 0 0 +API Gateway 30 0.0 0.1 0.1 0 1 +Virtual Cloud Network 30 43.6 0.1 0.1 0 1 +File Storage 30 10.5 0.1 0.1 0 1 +Health Checks 30 1.9 0.1 0.1 0 2 +Oracle Public Cloud Services - CLOUDCM 30 275.0 0.3 0.3 0 4 +Digital Assistant 30 5,500.0 0.6 0.6 1 7 +Integration Service 30 45.0 1.0 1.0 1 12 +Key Management - Shard 3 30 2.9 1.0 1.0 1 13 +Key Management - Shard 4 30 5.0 1.8 1.8 2 22 +Key Management - Shard 2 30 8.7 3.1 3.1 3 38 +Logging 30 79.0 3.5 3.5 4 42 +Key Management 30 24.7 8.2 8.2 8 99 +Object Storage 30 1,207.4 24.1 24.1 25 293 +Container Engine Service 30 2,160.0 32.4 32.4 33 394 +Full Stack Disaster Recovery Service 30 3,600.0 46.1 46.1 48 561 +Data Flow 30 28,205.8 85.0 85.0 88 1,034 +Data Science 30 42,234.4 99.7 99.7 103 1,213 +Visual Builder 30 2,160.4 100.2 100.2 104 1,219 +MySQL 30 26,931.9 109.3 109.3 113 1,330 +Database Management 30 3,717.7 147.7 147.7 153 1,796 +Content Management 30 3.9 150.8 150.8 156 1,835 +Load Balancer 30 232,562.0 191.8 191.8 198 2,333 +Container Engine for Kubernetes 30 2,596.8 259.7 259.7 268 3,159 +Analytics 30 6,156.0 364.1 364.1 376 4,429 +Operations Insights 30 10,604.0 408.7 408.7 422 4,973 +Compute 30 203,237.9 601.5 609.0 629 7,410 +Block Storage 30 180,246.4 690.9 690.9 714 8,406 +Application Performance Monitoring 30 3,599.0 979.2 979.2 1,012 11,913 +Data Integration 30 6,488.0 1,297.6 1,297.6 1,341 15,787 +Logging Analytics 30 3.9 1,435.5 1,435.5 1,483 17,465 +Database 30 285,130.3 3,520.8 3,520.8 3,638 42,837 +============================================= ========= ============= ============== ============ ============ ============ +Total 10,565.1 10,572.6 10,925 128,633 ##################################################################################### -# Product Summary for 09/01/2021 - 09/30/2021 # +# ResourceId Summary for 03/01/2024 - 03/31/2024 in USD # ##################################################################################### -Product Days Quantity Cost Month-31 Year -================================================================= ========= ============= ============ ============ ============ -B89639 - Oracle Integration - Standard 30 38.0 0.9 1 11 -B92602 - 10Mbps Load Balancer Bandwidth 30 12,731.8 1.3 1 15 -B92963 - MySQL Database Service - Standard - E3 - Memory 30 612.2 1.3 1 16 -B92212 - Oracle Autonomous JSON Database 30 5.7 1.8 2 22 -B89636 - Oracle Analytics Cloud - Professional - BYOL 30 224.1 2.2 2 26 -B90453 - Oracle Autonomous Transaction Processing 30 44.0 2.2 2 27 -B92307 - Standard - E3 - Memory 30 7,007.4 2.6 3 32 -B92306 - Standard - E3 30 461.7 2.9 3 35 -B92962 - MySQL Database Service - Standard - E3 30 76.5 2.9 3 35 -B89630 - Oracle Analytics Cloud - Professional 30 83.7 3.4 3 41 -B91210 - Content and Experience Cloud Service - 5000 Assets 30 1.0 3.9 4 47 -B92911 - Oracle APEX Application Development 30 12.4 4.0 4 49 -B92993 - Compute OCPU 30 17.2 5.5 6 68 -B93031 - Flexible Load Balancer Bandwidth 30 62,144.3 6.2 6 76 -B93082 - Database Management - External DB BYOL 30 324.5 6.5 7 79 -B89644 - Oracle Integration - Enterprise - BYOL 30 766.0 7.4 8 90 -B93312 - Optimized - X9 - Memory 30 7,200.0 10.8 11 131 -B89164 - Oracle Security Monitoring and Compliance Cloud - Config 30 720.0 10.9 11 132 -B92601 - 10Mbps Load Balancer Base 30 1,273.2 14.4 15 175 -B88319 - Oracle Bare Metal Cloud - 100 Mbps Load Balancer 30 2,889.2 15.4 16 187 -B89039 - Oracle Autonomous Data Warehouse - BYOL 30 1,787.7 17.3 18 211 -B89637 - Oracle Analytics Cloud - Enterprise - BYOL 30 2,171.5 21.0 22 256 -B91628 - Block Volume - Backup 30 893.0 22.5 23 274 -B93426 - Database Management - Oracle Cloud Databases 30 629.1 25.2 26 306 -B90573 - Database Cloud Service - All Editions - BYOL 30 4,439.9 25.8 27 314 -B93114 - Standard - E4 - Memory 30 18,017.2 27.0 28 329 -B89162 - Oracle Management Cloud - Enterprise Edition - 100 Entit 30 720.0 36.3 38 442 -B89163 - Oracle Management Cloud - Log Analytics Edition - 300 Gi 30 720.0 36.3 38 442 -B89165 - Oracle Security Monitoring and Compliance Cloud - Securi 30 720.0 36.3 38 442 -B93113 - Standard - E4 30 1,483.1 37.1 38 451 -B93311 - Optimized - X9 30 720.0 38.9 40 473 -B89040 - Oracle Autonomous Data Warehouse 30 789.4 39.8 41 484 -B90455 - Oracle Autonomous Transaction Processing - Exadata Stora 30 12.4 54.9 57 668 -B93030 - Flexible Load Balancer Base 30 6,214.4 70.2 73 854 -B89631 - Oracle Analytics Cloud - Enterprise 30 630.5 76.3 79 928 -B89041 - Oracle Autonomous Data Warehouse - Exadata Storage 30 17.5 77.8 80 947 -B89646 - Oracle Visual Builder Cloud Service - OCPU Per Hour 30 2,160.0 100.2 103 1,219 -B92302 - Blockchain Platform Cloud Service - Standard 30 1,440.0 309.6 320 3,767 -B92637 - Content and Experience Cloud Service - 5000 Assets - BYO 30 3.0 361.3 373 4,396 -B92598 - Data Integration - Workspace Usage 30 2,160.0 432.0 446 5,256 -B91962 - Block Volume - Performance Units 30 265,057.8 450.6 466 5,482 -B92941 - Application Performance Monitoring - Events Per Hour 30 720.0 468.0 484 5,694 -B91961 - Block Volume - Storage 30 30,372.7 774.5 800 9,423 -B92683 - Oracle Analytics - Enterprise 30 3,002.5 4,289.5 4,432 52,188 -================================================================= ========= ============= ============ ============ ============ -Total 7,937.5 8,202 96,572 - -* Above costs are demo costs for the readme. +Resource Days Quantity OSR Eligible Cost Month-31 Year +==================================================================================================== ========= ============= ============== ============ ============ ============ +orasenatdpltdevopsnetw02/oci-logs._apigateway.ocid1.compartment.oc1..aaaaaaaauwmdohskr2c6iscauwb6mow 30 0.0 0.0 0.0 0 0 +orasenatdpltdevopsnetw02/oci-logs._flowlogs.ocid1.compartment.oc1..aaaaaaaabldey3l2ymkpjs7jlnpbcmadl 30 0.0 0.0 0.0 0 0 +orasenatdpltdevopsnetw02/SaaSData_OSBucket 30 0.0 0.0 0.0 0 0 +ocid1.datasciencejob.oc1.iad.xxx 30 0.0 0.0 0.0 0 0 +orasenatdpltdevopsnetw02/demo-bucket 30 0.0 0.0 0.0 0 0 +orasenatdpltdevopsnetw02/dataflow-logs 30 0.0 0.0 0.0 0 0 +orasenatdpltdevopsnetw02/bucket-20220805-1420 30 0.0 0.0 0.0 0 0 +orasenatdpltdevopsnetw02/sec-test-new 30 0.0 0.0 0.0 0 0 +... +==================================================================================================== ========= ============= ============== ============ ============ ============ +Total 1,583.5 1,584.7 9,825 115,686 ##################################################################################### -# Tenant Summary for 03/01/2024 - 03/31/2024 in USD # +# Service, Region and Product for 03/01/2024 - 03/31/2024 in USD # ##################################################################################### -Tenant Days Quantity OSR Eligible Cost Month-31 Year -============================== ========= ============= ============== ============== ============ ============ -orasenatdpltdetestparent 31 0.0 0.0 0.0 0 0 -orasenatdpltdetestchild1 31 1,084,589.8 11,146.7 11,154.4 11,154 131,334 -============================== ========= ============= ============== ============== ============ ============ -Total 11,154.4 11,154.4 11,154 131,334 +Service,Region and Product Days Quantity OSR Eligible Cost +========================================================================= ========= ============= ============== ============ +API Gateway:us-ashburn-1:API Calls 30 0.0 0.0 0.0 +API Gateway:us-phoenix-1:API Calls 30 0.0 0.0 0.0 +Analytics:ca-toronto-1:Oracle Analytics Cloud - Enterprise 30 18.0 2.2 2.2 +Analytics:us-ashburn-1:Oracle Analytics Cloud - Enterprise 30 300.0 36.3 36.3 +Analytics:us-ashburn-1:Oracle Analytics Cloud - Enterprise - BYOL 30 258.0 2.5 2.5 +Analytics:us-ashburn-1:Oracle Analytics Cloud - Professional - BYOL 30 36.0 0.3 0.3 +Analytics:us-phoenix-1:Oracle Analytics Cloud - Enterprise 30 138.0 16.7 16.7 +Analytics:us-phoenix-1:Oracle Analytics Cloud - Enterprise - BYOL 30 276.0 2.7 2.7 +... +Visual Builder:us-ashburn-1:Visual Builder - OCPU per hour 30 239.9 11.1 11.1 +Visual Builder:us-phoenix-1:Visual Builder - OCPU per hour 30 120.0 5.6 5.6 +========================================================================= ========= ============= ============== ============ +Total 1,583.5 1,584.7 ``` diff --git a/examples/showusage/showusage.py b/examples/showusage/showusage.py index 8a462fc722..74a8b64c90 100644 --- a/examples/showusage/showusage.py +++ b/examples/showusage/showusage.py @@ -5,8 +5,8 @@ ########################################################################## # showusage.py # -# @author: Adi Zohar, Oct 07 2021, Updated Apr 17 2024 -# Added OSR Eligible for tenant grouping +# @author: Adi Zohar, Oct 07 2021, Updated May 2nd, 2024 +# Added OSR Eligible for tenant grouping and CSV files # # Supports Python 3 ########################################################################## @@ -20,8 +20,10 @@ # -ds date - Start Date in YYYY-MM-DD format # -de date - End Date in YYYY-MM-DD format (Not Inclusive) # -ld days - Add Days Combined with Start Date (de is ignored if specified) -# -report type - Report Type = PRODUCT, DAILY, REGION, SERVICE, RESOURCE, TENANT -# +# -report type - Report Type = PRODUCT, DAILY, REGION, SERVICE, RESOURCE, TENANT, SPECIAL +# SPECIAL is group by Service, Region, Product Description +# -csv - Write to CSV files - usage_products.csv, usage_daily.csv, usage_region.csvs, +# usage_resources.csv, usage_tenants.csv, usage_special.csv # ########################################################################## # Info: @@ -56,8 +58,16 @@ import oci import os import platform +import csv + +version = "2024.05.01" -version = "2024.04.17" +csv_file_products = "usage_products.csv" +csv_file_daily = "usage_daily.csv" +csv_file_regions = "usage_regions.csv" +csv_file_resources = "usage_resources.csv" +csv_file_tenants = "usage_tenants.csv" +csv_file_special = "usage_special.csv" ########################################################################## @@ -167,10 +177,81 @@ def create_signer(config_file, config_profile, is_instance_principals, is_delega return config, signer +########################################################################## +# create csv file +########################################################################## +def export_to_csv_file(file_name, data): + + try: + # if no data + if len(data) == 0: + return + + # generate fields keys + fields = [] + for dict_ in data: + for key in dict_: + if key not in fields: + fields.append(key) + + with open(file_name, mode='w', newline='') as csv_file: + writer = csv.DictWriter(csv_file, fieldnames=fields) + + # write header + writer.writeheader() + + for row in data: + writer.writerow(row) + + print("CSV: " + file_name + " created") + + except Exception as e: + raise Exception("Error in export_to_csv_file: " + str(e.args)) + + +########################################################################## +# Group Dictionaries by PK +########################################################################## +def group_dictionaries(data): + + try: + gdata = {} + for item in data: + pk = item['pk'] + if pk not in gdata: + gdata[pk] = item + else: + gdata[pk]['cost'] += item['cost'] + gdata[pk]['quantity'] += item['quantity'] + if item['currency'] and not gdata[pk]['currency']: + gdata[pk]['currency'] = item['currency'] + if 'sku_part_number' in item and 'sku_name' in item and 'osr_eligible' in gdata[pk]: + gdata[pk]['osr_eligible'] += osr_eligible_cost(item['sku_part_number'], item['sku_name'], item['cost']) + + return gdata + except Exception as e: + print("\nException Error at 'group_dictionaries' - " + str(e)) + + +########################################################################## +# Usage Daily by Tenant +########################################################################## +def osr_eligible_cost(sku_part_number, sku_name, cost): + + # IF Windows or VMWare + if 'windows' in sku_name.lower() or 'vmware' in sku_name.lower(): + return 0 + + # if Market Image with MP + if str(sku_part_number).lower()[0:1] == 'mp': + return 0 + return cost + + ########################################################################## # Usage Daily by Product ########################################################################## -def usage_daily_product(usageClient, tenant_id, time_usage_started, time_usage_ended): +def usage_daily_product(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv): try: # oci.usage_api.models.RequestSummarizedUsagesDetails @@ -198,113 +279,130 @@ def usage_daily_product(usageClient, tenant_id, time_usage_started, time_usage_e currency = "" for item in request_summarized_usages.data.items: data.append({ + 'pk': item.sku_part_number, 'sku': item.sku_part_number, 'sku_name': item.sku_name if item.sku_part_number in item.sku_name else item.sku_part_number + " - " + item.sku_name, 'sku_part_number': item.sku_part_number, + 'osr_eligible': osr_eligible_cost(item.sku_part_number, item.sku_name, item.computed_amount if item.computed_amount else 0), 'cost': item.computed_amount if item.computed_amount else 0, 'quantity': item.computed_quantity if item.computed_quantity else 0, - 'currency': item.currency, + 'currency': item.currency.lstrip(), 'time_usage_started': item.time_usage_started, 'time_usage_ended': item.time_usage_ended }) - if item.currency: + if item.currency.lstrip(): currency = item.currency if not min_date or item.time_usage_started < min_date: min_date = item.time_usage_started if not max_date or item.time_usage_started > max_date: max_date = item.time_usage_started + days = (max_date - min_date).days + 1 + ################################ - # Grouped Dict + # Group Dictionaries by PK ################################ - gdata = {} - for item in data: - sku = item['sku'] - if sku not in gdata: - gdata[sku] = { - 'osr_eligible': osr_eligible_cost(item['sku_part_number'], item['sku_name'], item['cost']), - 'cost': item['cost'], - 'quantity': item['quantity'], - 'sku_name': item['sku_name'], - 'currency': item['currency'] - } - else: - gdata[sku]['osr_eligible'] += osr_eligible_cost(item['sku_part_number'], item['sku_name'], item['cost']) - gdata[sku]['cost'] += item['cost'] - gdata[sku]['quantity'] += item['quantity'] + gdata = group_dictionaries(data) ################################ - # Compact based on SKUs + # if to generate to csv ################################ - col = { - 'product': 65, - 'quantity': 14, - 'days': 10, - 'osr_eligible': 13, - 'cost': 13, - 'month': 13, - 'year': 13 - } - - days = (max_date - min_date).days + 1 - - product_header = "Product Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + " in " + currency - print_header(product_header, 3) - print("") - print( - "Product".ljust(col['product']) + - " Days".rjust(col['days']) + - " Quantity".rjust(col['quantity']) + - " OSR Eligible".rjust(col['osr_eligible']) + - " Cost".rjust(col['cost']) + - " Month-31".rjust(col['month']) + - " Year".rjust(col['year']) - ) + if is_csv: + + csv_output = [] + for item_key in sorted(gdata, key=lambda x: gdata[x]['cost']): + item = gdata[item_key] + if item['cost'] == 0: + continue + csv_output.append({ + 'Product SKU': item['sku_part_number'], + 'Product Name': item['sku_name'], + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Days': days, + 'Currency': item['currency'], + 'Quantity': "{:8.1f}".format(item['quantity']), + 'Osr Eligible Cost': "{:8.1f}".format(item['osr_eligible']), + 'Cost': "{:8.1f}".format(item['cost']), + 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), + 'Year': "{:9.0f}".format(item['cost'] / days * 365), + }) + + export_to_csv_file(csv_file_products, csv_output) + + else: + + ################################ + # Print to screen + ################################ + col = { + 'product': 65, + 'quantity': 14, + 'days': 10, + 'osr_eligible': 13, + 'cost': 13, + 'month': 13, + 'year': 13 + } + + currency_print = (" in " + currency) if currency else "" + product_header = "Product Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + currency_print + print_header(product_header, 3) + print("") + print( + "Product".ljust(col['product']) + + " Days".rjust(col['days']) + + " Quantity".rjust(col['quantity']) + + " OSR Eligible".rjust(col['osr_eligible']) + + " Cost".rjust(col['cost']) + + " Month-31".rjust(col['month']) + + " Year".rjust(col['year']) + ) - print( - "".ljust(col['product'], '=') + - " ".ljust(col['days'], '=') + - " ".ljust(col['quantity'], '=') + - " ".ljust(col['osr_eligible'], '=') + - " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') - ) + print( + "".ljust(col['product'], '=') + + " ".ljust(col['days'], '=') + + " ".ljust(col['quantity'], '=') + + " ".ljust(col['osr_eligible'], '=') + + " ".ljust(col['cost'], '=') + + " ".ljust(col['month'], '=') + + " ".ljust(col['year'], '=') + ) - total = 0 - osr_total = 0 - for item_key in sorted(gdata, key=lambda x: gdata[x]['cost']): - item = gdata[item_key] - if item['cost'] == 0: - continue - total += item['cost'] - osr_total += item['osr_eligible'] - line = item['sku_name'].ljust(col['product'])[0:col['product']] - line += "{:8,.0f}".format(days).rjust(col['days']) - line += "{:8,.1f}".format(item['quantity']).rjust(col['quantity']) - line += "{:8,.1f}".format(item['osr_eligible']).rjust(col['osr_eligible']) - line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) - line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) - line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) - print(line) - - # Total - print( - "".ljust(col['product'], '=') + - " ".ljust(col['days'], '=') + - " ".ljust(col['quantity'], '=') + - " ".ljust(col['osr_eligible'], '=') + - " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') - ) - print( - "Total ".ljust(col['product'] + col['days'] + col['quantity']) + - " {:8,.1f}".format(osr_total).rjust(col['osr_eligible']) + - " {:8,.1f}".format(total).rjust(col['cost']) + - " {:9,.0f}".format(total / days * 31).rjust(col['month']) + - " {:9,.0f}".format(total / days * 365).rjust(col['year']) - ) + total = 0 + osr_total = 0 + for item_key in sorted(gdata, key=lambda x: gdata[x]['cost']): + item = gdata[item_key] + if item['cost'] == 0: + continue + total += item['cost'] + osr_total += item['osr_eligible'] + line = item['sku_name'].ljust(col['product'])[0:col['product']] + line += "{:8,.0f}".format(days).rjust(col['days']) + line += "{:8,.1f}".format(item['quantity']).rjust(col['quantity']) + line += "{:8,.1f}".format(item['osr_eligible']).rjust(col['osr_eligible']) + line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) + line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) + line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) + print(line) + + # Total + print( + "".ljust(col['product'], '=') + + " ".ljust(col['days'], '=') + + " ".ljust(col['quantity'], '=') + + " ".ljust(col['osr_eligible'], '=') + + " ".ljust(col['cost'], '=') + + " ".ljust(col['month'], '=') + + " ".ljust(col['year'], '=') + ) + print( + "Total ".ljust(col['product'] + col['days'] + col['quantity']) + + " {:8,.1f}".format(osr_total).rjust(col['osr_eligible']) + + " {:8,.1f}".format(total).rjust(col['cost']) + + " {:9,.0f}".format(total / days * 31).rjust(col['month']) + + " {:9,.0f}".format(total / days * 365).rjust(col['year']) + ) except oci.exceptions.ServiceError as e: print("\nService Error at 'usage_daily_product' - " + str(e)) @@ -316,7 +414,7 @@ def usage_daily_product(usageClient, tenant_id, time_usage_started, time_usage_e ########################################################################## # Usage Daily by Region ########################################################################## -def usage_daily_region(usageClient, tenant_id, time_usage_started, time_usage_ended): +def usage_daily_region(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv): try: # oci.usage_api.models.RequestSummarizedUsagesDetails @@ -344,96 +442,110 @@ def usage_daily_region(usageClient, tenant_id, time_usage_started, time_usage_en currency = "" for item in request_summarized_usages.data.items: data.append({ + 'pk': item.region, 'region': item.region, 'cost': item.computed_amount if item.computed_amount else 0, 'quantity': item.computed_quantity if item.computed_quantity else 0, - 'currency': item.currency, + 'currency': item.currency.lstrip(), 'time_usage_started': item.time_usage_started, 'time_usage_ended': item.time_usage_ended }) - if item.currency: + if item.currency.lstrip(): currency = item.currency if not min_date or item.time_usage_started < min_date: min_date = item.time_usage_started if not max_date or item.time_usage_started > max_date: max_date = item.time_usage_started + days = (max_date - min_date).days + 1 + ################################ - # Grouped Dict + # Group Dictionaries by PK ################################ - gdata = {} - for item in data: - region = item['region'] - if region not in gdata: - gdata[region] = {'cost': item['cost'], 'quantity': item['quantity'], 'currency': item['currency']} - else: - gdata[region]['cost'] += item['cost'] - gdata[region]['quantity'] += item['quantity'] + gdata = group_dictionaries(data) ################################ - # Compact based on SKUs + # if to generate to csv ################################ - col = { - 'region': 25, - 'quantity': 14, - 'days': 10, - 'cost': 13, - 'month': 13, - 'year': 13 - } - - days = (max_date - min_date).days + 1 - - product_header = "Region Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + " in " + currency - print_header(product_header, 3) - print("") - print( - "Region".ljust(col['region']) + - " Days".rjust(col['days']) + - " Quantity".rjust(col['quantity']) + - " Cost".rjust(col['cost']) + - " Month-31".rjust(col['month']) + - " Year".rjust(col['year']) - ) + if is_csv: + + csv_output = [] + for item_key in sorted(gdata, key=lambda x: gdata[x]['pk']): + item = gdata[item_key] + if item['cost'] == 0: + continue + csv_output.append({ + 'Region': item_key, + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Days': days, + 'Currency': item['currency'], + 'Cost': "{:8.1f}".format(item['cost']), + 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), + 'Year': "{:9.0f}".format(item['cost'] / days * 365), + }) + + export_to_csv_file(csv_file_regions, csv_output) + + else: + ################################ + # Compact based on SKUs + ################################ + col = { + 'region': 25, + 'days': 10, + 'cost': 13, + 'month': 13, + 'year': 13 + } + + currency_print = (" in " + currency) if currency else "" + product_header = "Region Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + currency_print + print_header(product_header, 3) + print("") + print( + "Region".ljust(col['region']) + + " Days".rjust(col['days']) + + " Cost".rjust(col['cost']) + + " Month-31".rjust(col['month']) + + " Year".rjust(col['year']) + ) - print( - "".ljust(col['region'], '=') + - " ".ljust(col['days'], '=') + - " ".ljust(col['quantity'], '=') + - " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') - ) + print( + "".ljust(col['region'], '=') + + " ".ljust(col['days'], '=') + + " ".ljust(col['cost'], '=') + + " ".ljust(col['month'], '=') + + " ".ljust(col['year'], '=') + ) - total = 0 - for item_key in sorted(gdata, key=lambda x: gdata[x]['cost']): - item = gdata[item_key] - if item['cost'] == 0: - continue - total += item['cost'] - line = item_key.ljust(col['region']) - line += "{:8,.0f}".format(days).rjust(col['days']) - line += "{:8,.1f}".format(item['quantity']).rjust(col['quantity']) - line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) - line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) - line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) - print(line) - - # Total - print( - "".ljust(col['region'], '=') + - " ".ljust(col['days'], '=') + - " ".ljust(col['quantity'], '=') + - " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') - ) - print( - "Total ".ljust(col['region'] + col['days'] + col['quantity']) + - " {:8,.1f}".format(total).rjust(col['cost']) + - " {:9,.0f}".format(total / days * 31).rjust(col['month']) + - " {:9,.0f}".format(total / days * 365).rjust(col['year']) - ) + total = 0 + for item_key in sorted(gdata, key=lambda x: gdata[x]['cost']): + item = gdata[item_key] + if item['cost'] == 0: + continue + total += item['cost'] + line = item_key.ljust(col['region']) + line += "{:8,.0f}".format(days).rjust(col['days']) + line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) + line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) + line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) + print(line) + + # Total + print( + "".ljust(col['region'], '=') + + " ".ljust(col['days'], '=') + + " ".ljust(col['cost'], '=') + + " ".ljust(col['month'], '=') + + " ".ljust(col['year'], '=') + ) + print( + "Total ".ljust(col['region'] + col['days']) + + " {:8,.1f}".format(total).rjust(col['cost']) + + " {:9,.0f}".format(total / days * 31).rjust(col['month']) + + " {:9,.0f}".format(total / days * 365).rjust(col['year']) + ) except oci.exceptions.ServiceError as e: print("\nService Error at 'usage_daily_region' - " + str(e)) @@ -445,22 +557,7 @@ def usage_daily_region(usageClient, tenant_id, time_usage_started, time_usage_en ########################################################################## # Usage Daily by Tenant ########################################################################## -def osr_eligible_cost(sku_part_number, sku_name, cost): - - # IF Windows or VMWare - if 'windows' in sku_name.lower() or 'vmware' in sku_name.lower(): - return 0 - - # if Market Image with MP - if str(sku_part_number).lower()[0:1] == 'mp': - return 0 - return cost - - -########################################################################## -# Usage Daily by Tenant -########################################################################## -def usage_daily_tenant(usageClient, tenant_id, time_usage_started, time_usage_ended): +def usage_daily_tenant(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv): try: # oci.usage_api.models.RequestSummarizedUsagesDetails @@ -488,112 +585,123 @@ def usage_daily_tenant(usageClient, tenant_id, time_usage_started, time_usage_en currency = "" for item in request_summarized_usages.data.items: data.append({ + 'pk': item.tenant_name, 'tenant': item.tenant_name, 'sku_part_number': item.sku_part_number, 'sku_name': item.sku_name, + 'osr_eligible': osr_eligible_cost(item.sku_part_number, item.sku_name, item.computed_amount if item.computed_amount else 0), 'cost': item.computed_amount if item.computed_amount else 0, 'quantity': item.computed_quantity if item.computed_quantity else 0, - 'currency': item.currency, + 'currency': item.currency.lstrip(), 'time_usage_started': item.time_usage_started, 'time_usage_ended': item.time_usage_ended }) - if item.currency: + if item.currency.lstrip(): currency = item.currency if not min_date or item.time_usage_started < min_date: min_date = item.time_usage_started if not max_date or item.time_usage_started > max_date: max_date = item.time_usage_started + days = (max_date - min_date).days + 1 + ################################ - # Grouped Dict + # Group Dictionaries by PK ################################ - gdata = {} - for item in data: - tenant = item['tenant'] - if tenant not in gdata: - gdata[tenant] = { - 'cost': item['cost'], - 'osr_eligible': osr_eligible_cost(item['sku_part_number'], item['sku_name'], item['cost']), - 'quantity': item['quantity'], - 'currency': item['currency'] - } - else: - gdata[tenant]['osr_eligible'] += osr_eligible_cost(item['sku_part_number'], item['sku_name'], item['cost']) - gdata[tenant]['cost'] += item['cost'] - gdata[tenant]['quantity'] += item['quantity'] + gdata = group_dictionaries(data) ################################ - # Compact based on SKUs + # if to generate to csv ################################ - col = { - 'tenant': 30, - 'quantity': 14, - 'days': 10, - 'osr_eligible': 15, - 'cost': 15, - 'month': 13, - 'year': 13 - } - - days = (max_date - min_date).days + 1 - - product_header = "Tenant Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + " in " + currency - print_header(product_header, 3) - print("") - print( - "Tenant".ljust(col['tenant']) + - " Days".rjust(col['days']) + - " Quantity".rjust(col['quantity']) + - " OSR Eligible".rjust(col['osr_eligible']) + - " Cost".rjust(col['cost']) + - " Month-31".rjust(col['month']) + - " Year".rjust(col['year']) - ) + if is_csv: + + csv_output = [] + for item_key in sorted(gdata, key=lambda x: gdata[x]['cost']): + item = gdata[item_key] + if item['cost'] == 0: + continue + csv_output.append({ + 'Tenant': item_key, + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Days': days, + 'Currency': item['currency'], + 'Osr Eligible Cost': "{:8.1f}".format(item['osr_eligible']), + 'Cost': "{:8.1f}".format(item['cost']), + 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), + 'Year': "{:9.0f}".format(item['cost'] / days * 365), + }) + + export_to_csv_file(csv_file_tenants, csv_output) + + else: + + ################################ + # Print to screen + ################################ + col = { + 'tenant': 30, + 'days': 10, + 'osr_eligible': 15, + 'cost': 15, + 'month': 13, + 'year': 13 + } + + currency_print = (" in " + currency) if currency else "" + product_header = "Tenant Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + currency_print + print_header(product_header, 3) + print("") + print( + "Tenant".ljust(col['tenant']) + + " Days".rjust(col['days']) + + " OSR Eligible".rjust(col['osr_eligible']) + + " Cost".rjust(col['cost']) + + " Month-31".rjust(col['month']) + + " Year".rjust(col['year']) + ) - print( - "".ljust(col['tenant'], '=') + - " ".ljust(col['days'], '=') + - " ".ljust(col['quantity'], '=') + - " ".ljust(col['cost'], '=') + - " ".ljust(col['osr_eligible'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') - ) + print( + "".ljust(col['tenant'], '=') + + " ".ljust(col['days'], '=') + + " ".ljust(col['cost'], '=') + + " ".ljust(col['osr_eligible'], '=') + + " ".ljust(col['month'], '=') + + " ".ljust(col['year'], '=') + ) - total = 0 - osr_total = 0 - for item_key in sorted(gdata, key=lambda x: gdata[x]['cost']): - item = gdata[item_key] - if item['cost'] == 0: - continue - total += item['cost'] - osr_total += item['osr_eligible'] - line = item_key.ljust(col['tenant']) - line += "{:8,.0f}".format(days).rjust(col['days']) - line += "{:8,.1f}".format(item['quantity']).rjust(col['quantity']) - line += "{:8,.1f}".format(item['osr_eligible']).rjust(col['osr_eligible']) - line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) - line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) - line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) - print(line) - - # Total - print( - "".ljust(col['tenant'], '=') + - " ".ljust(col['days'], '=') + - " ".ljust(col['quantity'], '=') + - " ".ljust(col['osr_eligible'], '=') + - " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') - ) - print( - "Total ".ljust(col['tenant'] + col['days'] + col['quantity']) + - " {:8,.1f}".format(osr_total).rjust(col['osr_eligible']) + - " {:8,.1f}".format(total).rjust(col['cost']) + - " {:9,.0f}".format(total / days * 31).rjust(col['month']) + - " {:9,.0f}".format(total / days * 365).rjust(col['year']) - ) + total = 0 + osr_total = 0 + for item_key in sorted(gdata, key=lambda x: gdata[x]['cost']): + item = gdata[item_key] + if item['cost'] == 0: + continue + total += item['cost'] + osr_total += item['osr_eligible'] + line = item_key.ljust(col['tenant']) + line += "{:8,.0f}".format(days).rjust(col['days']) + line += "{:8,.1f}".format(item['osr_eligible']).rjust(col['osr_eligible']) + line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) + line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) + line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) + print(line) + + # Total + print( + "".ljust(col['tenant'], '=') + + " ".ljust(col['days'], '=') + + " ".ljust(col['osr_eligible'], '=') + + " ".ljust(col['cost'], '=') + + " ".ljust(col['month'], '=') + + " ".ljust(col['year'], '=') + ) + print( + "Total ".ljust(col['tenant'] + col['days']) + + " {:8,.1f}".format(osr_total).rjust(col['osr_eligible']) + + " {:8,.1f}".format(total).rjust(col['cost']) + + " {:9,.0f}".format(total / days * 31).rjust(col['month']) + + " {:9,.0f}".format(total / days * 365).rjust(col['year']) + ) except oci.exceptions.ServiceError as e: print("\nService Error at 'usage_daily_tenant' - " + str(e)) @@ -603,9 +711,9 @@ def usage_daily_tenant(usageClient, tenant_id, time_usage_started, time_usage_en ########################################################################## -# Usage Daily by Servoce +# Usage Daily by Service ########################################################################## -def usage_daily_service(usageClient, tenant_id, time_usage_started, time_usage_ended): +def usage_daily_service(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv): try: # oci.usage_api.models.RequestSummarizedUsagesDetails @@ -613,7 +721,7 @@ def usage_daily_service(usageClient, tenant_id, time_usage_started, time_usage_e tenant_id=tenant_id, granularity='DAILY', query_type='COST', - group_by=['service'], + group_by=['service', 'skuPartNumber', 'skuName'], time_usage_started=time_usage_started.strftime('%Y-%m-%dT%H:%M:%SZ'), time_usage_ended=time_usage_ended.strftime('%Y-%m-%dT%H:%M:%SZ') ) @@ -633,96 +741,129 @@ def usage_daily_service(usageClient, tenant_id, time_usage_started, time_usage_e currency = "" for item in request_summarized_usages.data.items: data.append({ + 'pk': item.service, 'service': item.service, 'cost': item.computed_amount if item.computed_amount else 0, 'quantity': item.computed_quantity if item.computed_quantity else 0, - 'currency': item.currency, + 'sku_part_number': item.sku_part_number, + 'sku_name': item.sku_name, + 'osr_eligible': osr_eligible_cost(item.sku_part_number, item.sku_name, item.computed_amount if item.computed_amount else 0), + 'currency': item.currency.lstrip(), 'time_usage_started': item.time_usage_started, 'time_usage_ended': item.time_usage_ended }) - if item.currency: + if item.currency.lstrip(): currency = item.currency if not min_date or item.time_usage_started < min_date: min_date = item.time_usage_started if not max_date or item.time_usage_started > max_date: max_date = item.time_usage_started + days = (max_date - min_date).days + 1 + ################################ - # Grouped Dict + # Group Dictionaries by PK ################################ - gdata = {} - for item in data: - service = item['service'] - if service not in gdata: - gdata[service] = {'cost': item['cost'], 'quantity': item['quantity'], 'currency': item['currency']} - else: - gdata[service]['cost'] += item['cost'] - gdata[service]['quantity'] += item['quantity'] + gdata = group_dictionaries(data) ################################ - # Compact based on SKUs + # if to generate to csv ################################ - col = { - 'service': 40, - 'quantity': 14, - 'days': 10, - 'cost': 13, - 'month': 13, - 'year': 13 - } - - days = (max_date - min_date).days + 1 - - product_header = "Service Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + " in " + currency - print_header(product_header, 3) - print("") - print( - "Service".ljust(col['service']) + - " Days".rjust(col['days']) + - " Quantity".rjust(col['quantity']) + - " Cost".rjust(col['cost']) + - " Month-31".rjust(col['month']) + - " Year".rjust(col['year']) - ) + if is_csv: + + csv_output = [] + for item_key in sorted(gdata, key=lambda x: gdata[x]['cost']): + item = gdata[item_key] + if item['cost'] == 0: + continue + csv_output.append({ + 'Service': item_key, + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Days': days, + 'Currency': item['currency'], + 'Quantity': "{:8.1f}".format(item['quantity']), + 'Osr Eligible Cost': "{:8.1f}".format(item['osr_eligible']), + 'Cost': "{:8.1f}".format(item['cost']), + 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), + 'Year': "{:9.0f}".format(item['cost'] / days * 365), + }) + + export_to_csv_file(csv_file_tenants, csv_output) + + else: + + ################################ + # Print to screen + ################################ + col = { + 'service': 45, + 'quantity': 14, + 'days': 10, + 'osr_eligible': 15, + 'cost': 13, + 'month': 13, + 'year': 13 + } + + currency_print = (" in " + currency) if currency else "" + product_header = "Service Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + currency_print + print_header(product_header, 3) + print("") + print( + "Service".ljust(col['service']) + + " Days".rjust(col['days']) + + " Quantity".rjust(col['quantity']) + + " OSR Eligible".rjust(col['osr_eligible']) + + " Cost".rjust(col['cost']) + + " Month-31".rjust(col['month']) + + " Year".rjust(col['year']) + ) - print( - "".ljust(col['service'], '=') + - " ".ljust(col['days'], '=') + - " ".ljust(col['quantity'], '=') + - " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') - ) + print( + "".ljust(col['service'], '=') + + " ".ljust(col['days'], '=') + + " ".ljust(col['quantity'], '=') + + " ".ljust(col['osr_eligible'], '=') + + " ".ljust(col['cost'], '=') + + " ".ljust(col['month'], '=') + + " ".ljust(col['year'], '=') + ) - total = 0 - for item_key in sorted(gdata, key=lambda x: gdata[x]['cost']): - item = gdata[item_key] - if item['cost'] == 0: - continue - total += item['cost'] - line = item_key.ljust(col['service']) - line += "{:8,.0f}".format(days).rjust(col['days']) - line += "{:8,.1f}".format(item['quantity']).rjust(col['quantity']) - line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) - line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) - line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) - print(line) - - # Total - print( - "".ljust(col['service'], '=') + - " ".ljust(col['days'], '=') + - " ".ljust(col['quantity'], '=') + - " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') - ) - print( - "Total ".ljust(col['service'] + col['days'] + col['quantity']) + - " {:8,.1f}".format(total).rjust(col['cost']) + - " {:9,.0f}".format(total / days * 31).rjust(col['month']) + - " {:9,.0f}".format(total / days * 365).rjust(col['year']) - ) + total = 0 + osr_total = 0 + for item_key in sorted(gdata, key=lambda x: gdata[x]['cost']): + item = gdata[item_key] + if item['cost'] == 0: + continue + total += item['cost'] + osr_total += item['osr_eligible'] + line = item_key.ljust(col['service']) + line += "{:8,.0f}".format(days).rjust(col['days']) + line += "{:8,.1f}".format(item['quantity']).rjust(col['quantity']) + line += "{:8,.1f}".format(item['osr_eligible']).rjust(col['osr_eligible']) + line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) + line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) + line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) + print(line) + + # Total + print( + "".ljust(col['service'], '=') + + " ".ljust(col['days'], '=') + + " ".ljust(col['quantity'], '=') + + " ".ljust(col['osr_eligible'], '=') + + " ".ljust(col['cost'], '=') + + " ".ljust(col['month'], '=') + + " ".ljust(col['year'], '=') + ) + print( + "Total ".ljust(col['service'] + col['days'] + col['quantity']) + + " {:8,.1f}".format(osr_total).rjust(col['osr_eligible']) + + " {:8,.1f}".format(total).rjust(col['cost']) + + " {:9,.0f}".format(total / days * 31).rjust(col['month']) + + " {:9,.0f}".format(total / days * 365).rjust(col['year']) + ) except oci.exceptions.ServiceError as e: print("\nService Error at 'usage_daily_service' - " + str(e)) @@ -732,9 +873,9 @@ def usage_daily_service(usageClient, tenant_id, time_usage_started, time_usage_e ########################################################################## -# Usage Daily by Resource +# Usage Daily by Speical Grouping = Service, Region, Product Description ########################################################################## -def usage_daily_resource(usageClient, tenant_id, time_usage_started, time_usage_ended): +def usage_daily_special(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv): try: # oci.usage_api.models.RequestSummarizedUsagesDetails @@ -742,7 +883,7 @@ def usage_daily_resource(usageClient, tenant_id, time_usage_started, time_usage_ tenant_id=tenant_id, granularity='DAILY', query_type='COST', - group_by=['resourceId'], + group_by=['service', 'region', 'skuPartNumber', 'skuName'], time_usage_started=time_usage_started.strftime('%Y-%m-%dT%H:%M:%SZ'), time_usage_ended=time_usage_ended.strftime('%Y-%m-%dT%H:%M:%SZ') ) @@ -762,97 +903,286 @@ def usage_daily_resource(usageClient, tenant_id, time_usage_started, time_usage_ currency = "" for item in request_summarized_usages.data.items: data.append({ - 'resourceid': item.resource_id, + 'pk': item.service + ":" + item.region + ":" + item.sku_name, + 'service': item.service, + 'region': item.region, + 'sku_part_number': item.sku_part_number, + 'sku_name': item.sku_name, + 'osr_eligible': osr_eligible_cost(item.sku_part_number, item.sku_name, item.computed_amount if item.computed_amount else 0), 'cost': item.computed_amount if item.computed_amount else 0, 'quantity': item.computed_quantity if item.computed_quantity else 0, - 'currency': item.currency, + 'currency': item.currency.lstrip(), 'time_usage_started': item.time_usage_started, 'time_usage_ended': item.time_usage_ended }) - if item.currency: + if item.currency.lstrip(): currency = item.currency if not min_date or item.time_usage_started < min_date: min_date = item.time_usage_started if not max_date or item.time_usage_started > max_date: max_date = item.time_usage_started + days = (max_date - min_date).days + 1 + ################################ - # Grouped Dict + # Group Dictionaries by PK ################################ - gdata = {} - for item in data: - resourceid = item['resourceid'] - if resourceid not in gdata: - gdata[resourceid] = {'cost': item['cost'], 'quantity': item['quantity'], 'currency': item['currency']} - else: - gdata[resourceid]['cost'] += item['cost'] - gdata[resourceid]['quantity'] += item['quantity'] + gdata = group_dictionaries(data) ################################ - # Compact based on SKUs + # if to generate to csv ################################ - col = { - 'resourceid': 100, - 'quantity': 14, - 'days': 10, - 'cost': 13, - 'month': 13, - 'year': 13 - } + if is_csv: + + csv_output = [] + for item_key in sorted(gdata, key=lambda x: gdata[x]['pk']): + item = gdata[item_key] + if item['cost'] == 0: + continue + csv_output.append({ + 'Service': item['service'], + 'Region': item['region'], + 'Product SKU': item['sku_part_number'], + 'Product Name': item['sku_name'], + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Days': days, + 'Currency': item['currency'], + 'Quantity': "{:8.1f}".format(item['quantity']), + 'OSR Eligible Cost': "{:8.1f}".format(item['osr_eligible']), + 'Cost': "{:8.1f}".format(item['cost']), + 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), + 'Year': "{:9.0f}".format(item['cost'] / days * 365), + }) + + export_to_csv_file(csv_file_special, csv_output) + + else: + + ################################ + # Print to screen + ################################ + col = { + 'pk': 120, + 'days': 10, + 'osr_eligible': 15, + 'quantity': 14, + 'cost': 13 + } + + currency_print = (" in " + currency) if currency else "" + product_header = "Service, Region and Product for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + currency_print + print_header(product_header, 3) + print("") + print( + "Service,Region and Product".ljust(col['pk']) + + " Days".rjust(col['days']) + + " Quantity".rjust(col['quantity']) + + " OSR Eligible".rjust(col['osr_eligible']) + + " Cost".rjust(col['cost']) + ) - days = (max_date - min_date).days + 1 + print( + "".ljust(col['pk'], '=') + + " ".ljust(col['days'], '=') + + " ".ljust(col['quantity'], '=') + + " ".ljust(col['osr_eligible'], '=') + + " ".ljust(col['cost'], '=') + ) - product_header = "ResourceId Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + " in " + currency - print_header(product_header, 3) - print("") - print( - "Resource".ljust(col['resourceid']) + - " Days".rjust(col['days']) + - " Quantity".rjust(col['quantity']) + - " Cost".rjust(col['cost']) + - " Month-31".rjust(col['month']) + - " Year".rjust(col['year']) - ) + total = 0 + osr_total = 0 + for item_key in sorted(gdata, key=lambda x: gdata[x]['pk']): + item = gdata[item_key] + if item['cost'] == 0: + continue + total += item['cost'] + osr_total += item['osr_eligible'] + line = item_key.ljust(col['pk']) + line += "{:8,.0f}".format(days).rjust(col['days']) + line += "{:8,.1f}".format(item['quantity']).rjust(col['quantity']) + line += "{:8,.1f}".format(item['osr_eligible']).rjust(col['osr_eligible']) + line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) + print(line) + + # Total + print( + "".ljust(col['pk'], '=') + + " ".ljust(col['days'], '=') + + " ".ljust(col['quantity'], '=') + + " ".ljust(col['osr_eligible'], '=') + + " ".ljust(col['cost'], '=') + ) + print( + "Total ".ljust(col['pk'] + col['days'] + col['quantity']) + + " {:8,.1f}".format(osr_total).rjust(col['osr_eligible']) + + " {:8,.1f}".format(total).rjust(col['cost']) + ) + + except oci.exceptions.ServiceError as e: + print("\nService Error at 'usage_daily_special' - " + str(e)) + + except Exception as e: + print("\nException Error at 'usage_daily_special' - " + str(e)) - print( - "".ljust(col['resourceid'], '=') + - " ".ljust(col['days'], '=') + - " ".ljust(col['quantity'], '=') + - " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') - ) - total = 0 - for item_key in sorted(gdata, key=lambda x: gdata[x]['cost']): - item = gdata[item_key] - if item['cost'] == 0: - continue - total += item['cost'] - line = str(item_key[0:col['resourceid']]).ljust(col['resourceid']) - line += "{:8,.0f}".format(days).rjust(col['days']) - line += "{:8,.1f}".format(item['quantity']).rjust(col['quantity']) - line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) - line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) - line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) - print(line) - - # Total - print( - "".ljust(col['resourceid'], '=') + - " ".ljust(col['days'], '=') + - " ".ljust(col['quantity'], '=') + - " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') +########################################################################## +# Usage Daily by Resource +########################################################################## +def usage_daily_resource(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv): + + try: + # oci.usage_api.models.RequestSummarizedUsagesDetails + requestSummarizedUsagesDetails = oci.usage_api.models.RequestSummarizedUsagesDetails( + tenant_id=tenant_id, + granularity='DAILY', + query_type='COST', + group_by=['resourceId', 'region', 'skuPartNumber', 'skuName'], + time_usage_started=time_usage_started.strftime('%Y-%m-%dT%H:%M:%SZ'), + time_usage_ended=time_usage_ended.strftime('%Y-%m-%dT%H:%M:%SZ') ) - print( - "Total ".ljust(col['resourceid'] + col['days'] + col['quantity']) + - " {:8,.1f}".format(total).rjust(col['cost']) + - " {:9,.0f}".format(total / days * 31).rjust(col['month']) + - " {:9,.0f}".format(total / days * 365).rjust(col['year']) + + # usageClient.request_summarized_usages + request_summarized_usages = usageClient.request_summarized_usages( + requestSummarizedUsagesDetails, + retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY ) + ################################ + # Add all data to array data + ################################ + data = [] + min_date = None + max_date = None + currency = "" + for item in request_summarized_usages.data.items: + data.append({ + 'pk': item.resource_id, + 'resourceid': item.resource_id, + 'region': item.region, + 'sku_part_number': item.sku_part_number, + 'sku_name': item.sku_name, + 'osr_eligible': osr_eligible_cost(item.sku_part_number, item.sku_name, item.computed_amount if item.computed_amount else 0), + 'cost': item.computed_amount if item.computed_amount else 0, + 'quantity': item.computed_quantity if item.computed_quantity else 0, + 'currency': item.currency.lstrip(), + 'time_usage_started': item.time_usage_started, + 'time_usage_ended': item.time_usage_ended + }) + if item.currency.lstrip(): + currency = item.currency + if not min_date or item.time_usage_started < min_date: + min_date = item.time_usage_started + if not max_date or item.time_usage_started > max_date: + max_date = item.time_usage_started + + days = (max_date - min_date).days + 1 + + ################################ + # Group Dictionaries by PK + ################################ + gdata = group_dictionaries(data) + + ################################ + # if to generate to csv + ################################ + if is_csv: + + csv_output = [] + for item_key in sorted(gdata, key=lambda x: gdata[x]['cost']): + item = gdata[item_key] + if item['cost'] == 0: + continue + csv_output.append({ + 'Resource': item_key, + 'Region': item['region'], + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Days': days, + 'Currency': item['currency'], + 'Quantity': "{:8.4f}".format(item['quantity']), + 'Osr Eligible Cost': "{:8.4f}".format(item['osr_eligible']), + 'Cost': "{:8.4f}".format(item['cost']), + 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), + 'Year': "{:9.0f}".format(item['cost'] / days * 365), + }) + + export_to_csv_file(csv_file_resources, csv_output) + + else: + + ################################ + # Print to screen + ################################ + col = { + 'resourceid': 100, + 'quantity': 14, + 'days': 10, + 'osr_eligible': 15, + 'cost': 13, + 'month': 13, + 'year': 13 + } + + currency_print = (" in " + currency) if currency else "" + product_header = "ResourceId Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + currency_print + print_header(product_header, 3) + print("") + print( + "Resource".ljust(col['resourceid']) + + " Days".rjust(col['days']) + + " Quantity".rjust(col['quantity']) + + " OSR Eligible".rjust(col['osr_eligible']) + + " Cost".rjust(col['cost']) + + " Month-31".rjust(col['month']) + + " Year".rjust(col['year']) + ) + + print( + "".ljust(col['resourceid'], '=') + + " ".ljust(col['days'], '=') + + " ".ljust(col['quantity'], '=') + + " ".ljust(col['osr_eligible'], '=') + + " ".ljust(col['cost'], '=') + + " ".ljust(col['month'], '=') + + " ".ljust(col['year'], '=') + ) + + total = 0 + osr_total = 0 + for item_key in sorted(gdata, key=lambda x: gdata[x]['cost']): + item = gdata[item_key] + if item['cost'] == 0: + continue + total += item['cost'] + osr_total += item['osr_eligible'] + line = str(item_key[0:col['resourceid']]).ljust(col['resourceid']) + line += "{:8,.0f}".format(days).rjust(col['days']) + line += "{:8,.1f}".format(item['quantity']).rjust(col['quantity']) + line += "{:8,.1f}".format(item['osr_eligible']).rjust(col['osr_eligible']) + line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) + line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) + line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) + print(line) + + # Total + print( + "".ljust(col['resourceid'], '=') + + " ".ljust(col['days'], '=') + + " ".ljust(col['quantity'], '=') + + " ".ljust(col['osr_eligible'], '=') + + " ".ljust(col['cost'], '=') + + " ".ljust(col['month'], '=') + + " ".ljust(col['year'], '=') + ) + print( + "Total ".ljust(col['resourceid'] + col['days'] + col['quantity']) + + " {:8,.1f}".format(osr_total).rjust(col['osr_eligible']) + + " {:8,.1f}".format(total).rjust(col['cost']) + + " {:9,.0f}".format(total / days * 31).rjust(col['month']) + + " {:9,.0f}".format(total / days * 365).rjust(col['year']) + ) + except oci.exceptions.ServiceError as e: print("\nService Error at 'usage_daily_resource' - " + str(e)) @@ -863,7 +1193,7 @@ def usage_daily_resource(usageClient, tenant_id, time_usage_started, time_usage_ ########################################################################## # Usage Daily Summary ########################################################################## -def usage_daily_summary(usageClient, tenant_id, time_usage_started, time_usage_ended): +def usage_daily_summary(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv): try: @@ -872,6 +1202,7 @@ def usage_daily_summary(usageClient, tenant_id, time_usage_started, time_usage_e tenant_id=tenant_id, granularity='DAILY', query_type='COST', + group_by=['skuPartNumber', 'skuName'], time_usage_started=time_usage_started.strftime('%Y-%m-%dT%H:%M:%SZ'), time_usage_ended=time_usage_ended.strftime('%Y-%m-%dT%H:%M:%SZ') ) @@ -888,82 +1219,114 @@ def usage_daily_summary(usageClient, tenant_id, time_usage_started, time_usage_e data = [] min_date = None max_date = None + currency = "" for item in request_summarized_usages.data.items: data.append({ + 'pk': item.time_usage_started.strftime('%Y-%m-%d'), 'day': item.time_usage_started.strftime('%Y-%m-%d'), + 'sku_part_number': item.sku_part_number, + 'sku_name': item.sku_name, + 'osr_eligible': osr_eligible_cost(item.sku_part_number, item.sku_name, item.computed_amount if item.computed_amount else 0), 'cost': item.computed_amount if item.computed_amount else 0, 'quantity': item.computed_quantity if item.computed_quantity else 0, - 'currency': item.currency, + 'currency': item.currency.lstrip(), 'time_usage_started': item.time_usage_started, 'time_usage_ended': item.time_usage_ended }) + if item.currency.lstrip(): + currency = item.currency if not min_date or item.time_usage_started < min_date: min_date = item.time_usage_started if not max_date or item.time_usage_started > max_date: max_date = item.time_usage_started ################################ - # Grouped Dict + # Group Dictionaries by PK ################################ - gdata = {} - for item in data: - day = item['day'] - if day not in gdata: - gdata[day] = {'cost': item['cost'], 'quantity': item['quantity'], 'currency': item['currency']} - else: - gdata[day]['cost'] += item['cost'] - gdata[day]['quantity'] += item['quantity'] + gdata = group_dictionaries(data) ################################ - # Compact based on SKUs + # if to generate to csv ################################ - col = { - 'day': 15, - 'cost': 15, - 'month': 15, - 'year': 15 - } - - product_header = "Daily Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') - print_header(product_header, 3) - print("") - print( - "Day".ljust(col['day']) + - " Cost".rjust(col['cost']) + - " Month-31".rjust(col['month']) + - " Year".rjust(col['year']) - ) + if is_csv: + + csv_output = [] + for item_key in sorted(gdata, key=lambda x: gdata[x]['day']): + item = gdata[item_key] + if item['cost'] == 0: + continue + csv_output.append({ + 'Day': item['day'], + 'Currency': item['currency'], + 'Osr Eligible Cost': "{:8.4f}".format(item['osr_eligible']), + 'Cost': "{:8.3f}".format(item['cost']), + 'Month-31': "{:9.0f}".format(item['cost'] * 31), + 'Year': "{:9.0f}".format(item['cost'] * 365), + }) + + export_to_csv_file(csv_file_daily, csv_output) + + else: + + ################################ + # Print to screen + ################################ + col = { + 'day': 15, + 'osr_eligible': 15, + 'cost': 15, + 'month': 15, + 'year': 15 + } + + currency_print = (" in " + currency) if currency else "" + product_header = "Daily Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + currency_print + print_header(product_header, 3) + print("") + print( + "Day".ljust(col['day']) + + " OSR Eligible".rjust(col['osr_eligible']) + + " Cost".rjust(col['cost']) + + " Month-31".rjust(col['month']) + + " Year".rjust(col['year']) + ) - print( - "".ljust(col['day'], '=') + - " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') - ) + print( + "".ljust(col['day'], '=') + + " ".ljust(col['osr_eligible'], '=') + + " ".ljust(col['cost'], '=') + + " ".ljust(col['month'], '=') + + " ".ljust(col['year'], '=') + ) - total = 0 - for item_key in sorted(gdata, key=lambda x: x): - item = gdata[item_key] - if item['cost'] == 0: - continue - total += item['cost'] - line = item_key.ljust(col['day'])[0:col['day']] - line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) - line += "{:9,.0f}".format(item['cost'] * 31).rjust(col['month']) - line += "{:9,.0f}".format(item['cost'] * 365).rjust(col['year']) - print(line) - - # Total - print( - "".ljust(col['day'], '=') + - " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') - ) - print( - "Total ".ljust(col['day']) + - " {:8,.1f}".format(total).rjust(col['cost']) - ) + total = 0 + osr_total = 0 + for item_key in sorted(gdata, key=lambda x: x): + item = gdata[item_key] + if item['cost'] == 0: + continue + total += item['cost'] + osr_total += item['osr_eligible'] + line = item_key.ljust(col['day'])[0:col['day']] + line += "{:8,.1f}".format(item['osr_eligible']).rjust(col['osr_eligible']) + line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) + line += "{:9,.0f}".format(item['cost'] * 31).rjust(col['month']) + line += "{:9,.0f}".format(item['cost'] * 365).rjust(col['year']) + print(line) + + # Total + print( + "".ljust(col['day'], '=') + + " ".ljust(col['osr_eligible'], '=') + + " ".ljust(col['cost'], '=') + + " ".ljust(col['month'], '=') + + " ".ljust(col['year'], '=') + ) + print( + "Total ".ljust(col['day']) + + " {:8,.1f}".format(osr_total).rjust(col['osr_eligible']) + + " {:8,.1f}".format(total).rjust(col['cost']) + ) except oci.exceptions.ServiceError as e: print("\nService Error at 'usage_daily_summary' - " + str(e)) @@ -988,21 +1351,27 @@ def main(): parser.add_argument("-ds", default=None, dest='date_start', help="Start Date - format YYYY-MM-DD", type=valid_date_type) parser.add_argument("-de", default=None, dest='date_end', help="End Date - format YYYY-MM-DD, (Not Inclusive)", type=valid_date_type) parser.add_argument("-days", default=None, dest='days', help="Add Days Combined with Start Date (de is ignored if specified)", type=int) - parser.add_argument("-report", default="ALL", dest='report', help="Report Type = PRODUCT / DAILY / REGION / SERVICE / RESOURCE / TENANT / ALL ( Default = ALL )") + parser.add_argument("-report", default="ALL", dest='report', help="Report Type = PRODUCT / DAILY / REGION / SERVICE / RESOURCE / TENANT / SPECIAL / ALL ( Default = ALL )") + parser.add_argument('-csv', action='store_true', default=False, dest='csv', help='Write to CSV files instead of output to the screen - usage_*.csv') cmd = parser.parse_args() if len(sys.argv) < 2: parser.print_help() return - if not cmd.report or not (cmd.report == "DAILY" or cmd.report == "SERVICE" or cmd.report == "PRODUCT" or cmd.report == "REGION" or cmd.report == "RESOURCE" or cmd.report == "TENANT" or cmd.report == "ALL"): + if not cmd.report or not (cmd.report == "DAILY" or cmd.report == "SERVICE" or cmd.report == "PRODUCT" or cmd.report == "REGION" or cmd.report == "RESOURCE" or cmd.report == "SPECIAL" or cmd.report == "TENANT" or cmd.report == "ALL"): parser.print_help() print("") print("**********************************************************") print("*** You must specify report type ! ***") - print("*** DAILY = Daily cost ***") - print("*** PRODUCT = Product Summary Cost ***") + print("*** DAILY = Daily cost ***") + print("*** PRODUCT = Product Summary Cost ***") + print("*** SERVICE = Service Summary Cost ***") + print("*** REGION = Region Summary Cost ***") + print("*** RESOURCE = Resource Summary Cost ***") + print("*** SPECIAL = Service, Region and Product ***") + print("*** ***") print("*** ALL = All Reports ***") print("**********************************************************") return None @@ -1109,28 +1478,31 @@ def main(): # Connection to UsageAPI ############################################ try: - print("\nConnecting to UsageAPI Service...") + print("\nConnecting to UsageAPI Service...\n") usage_client = oci.usage_api.UsageapiClient(config, signer=signer) if cmd.proxy: usage_client.base_client.session.proxies = {'https': cmd.proxy} if report_type == 'DAILY' or report_type == 'ALL': - usage_daily_summary(usage_client, tenant_id, time_usage_started, time_usage_ended) + usage_daily_summary(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv) if report_type == 'PRODUCT' or report_type == 'ALL': - usage_daily_product(usage_client, tenant_id, time_usage_started, time_usage_ended) + usage_daily_product(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv) if report_type == 'REGION' or report_type == 'ALL': - usage_daily_region(usage_client, tenant_id, time_usage_started, time_usage_ended) + usage_daily_region(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv) if report_type == 'SERVICE' or report_type == 'ALL': - usage_daily_service(usage_client, tenant_id, time_usage_started, time_usage_ended) + usage_daily_service(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv) if report_type == 'RESOURCE' or report_type == 'ALL': - usage_daily_resource(usage_client, tenant_id, time_usage_started, time_usage_ended) + usage_daily_resource(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv) if report_type == 'TENANT' or report_type == 'ALL': - usage_daily_tenant(usage_client, tenant_id, time_usage_started, time_usage_ended) + usage_daily_tenant(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv) + + if report_type == 'SPECIAL' or report_type == 'ALL': + usage_daily_special(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv) except Exception as e: raise RuntimeError("\nError at main function - " + str(e)) diff --git a/examples/tag_resources_in_tenancy/README.md b/examples/tag_resources_in_tenancy/README.md index c06c472e48..7ba1e67c0b 100644 --- a/examples/tag_resources_in_tenancy/README.md +++ b/examples/tag_resources_in_tenancy/README.md @@ -5,7 +5,7 @@ It covers the below OCI components, Authentication by User or Compute using instance principals, Output can be printer friendly, Summary or JSON. -**Developed by Adi Zohar, Nov 2020-Mar 2023** +**Developed by Adi Zohar, Nov 2020-Mar 2024** ## Modules Included: - oci.core.VirtualNetworkClient @@ -72,6 +72,22 @@ optional arguments: -filter_by_name FILTER_BY_NAME Filter service by name, comma seperator for multi names ``` +## My Other Projects + +- [ShowOCI](https://github.com/oracle/oci-python-sdk/tree/master/examples/showoci) + +- [ShowUsage](https://github.com/oracle/oci-python-sdk/tree/master/examples/showusage) + +- [ShowSubscription](https://github.com/oracle/oci-python-sdk/tree/master/examples/showsubscription) + +- [ShowRewards](https://github.com/oracle/oci-python-sdk/tree/master/examples/showrewards) + +- [List Resources in Tenancy](https://github.com/oracle/oci-python-sdk/tree/master/examples/list_resources_in_tenancy) + +- [Object Storage Tools](https://github.com/oracle/oci-python-sdk/tree/master/examples/object_storage) + +- [Usage2ADW](https://github.com/oracle-samples/usage-reports-to-adw) + ## Example Execution for adding defined Tags: ``` python3 tag_resources_in_tenancy.py -action add_defined -tag BillingNS.Division=TEST -cp TestCompartment -rg us-ashburn-1 diff --git a/src/oci/bds/bds_client.py b/src/oci/bds/bds_client.py index 5e89035a7d..917f62e97a 100644 --- a/src/oci/bds/bds_client.py +++ b/src/oci/bds/bds_client.py @@ -4089,14 +4089,14 @@ def list_patch_histories(self, bds_instance_id, **kwargs): Allowed values are: "INSTALLING", "INSTALLED", "FAILED" + :param str patch_version: (optional) + The version of the patch + :param str sort_by: (optional) The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. Allowed values are: "timeCreated", "displayName" - :param str patch_version: (optional) - The version of the patch - :param str sort_order: (optional) The sort order to use, either 'asc' or 'desc'. @@ -4144,8 +4144,8 @@ def list_patch_histories(self, bds_instance_id, **kwargs): "retry_strategy", "opc_request_id", "lifecycle_state", - "sort_by", "patch_version", + "sort_by", "sort_order", "page", "limit", @@ -4196,8 +4196,8 @@ def list_patch_histories(self, bds_instance_id, **kwargs): query_params = { "lifecycleState": kwargs.get("lifecycle_state", missing), - "sortBy": kwargs.get("sort_by", missing), "patchVersion": kwargs.get("patch_version", missing), + "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing), diff --git a/src/oci/bds/models/__init__.py b/src/oci/bds/models/__init__.py index 5863c790b7..195d64f7f5 100644 --- a/src/oci/bds/models/__init__.py +++ b/src/oci/bds/models/__init__.py @@ -25,6 +25,7 @@ from .auto_scale_policy_rule import AutoScalePolicyRule from .auto_scaling_configuration import AutoScalingConfiguration from .auto_scaling_configuration_summary import AutoScalingConfigurationSummary +from .batching_based_patching_configs import BatchingBasedPatchingConfigs from .bds_api_key import BdsApiKey from .bds_api_key_summary import BdsApiKeySummary from .bds_instance import BdsInstance @@ -46,6 +47,7 @@ from .day_based_vertical_scaling_schedule_details import DayBasedVerticalScalingScheduleDetails from .default_error import DefaultError from .disable_certificate_details import DisableCertificateDetails +from .downtime_based_patching_configs import DowntimeBasedPatchingConfigs from .enable_certificate_details import EnableCertificateDetails from .execute_bootstrap_script_details import ExecuteBootstrapScriptDetails from .horizontal_scaling_schedule_details import HorizontalScalingScheduleDetails @@ -68,6 +70,7 @@ from .os_patch_summary import OsPatchSummary from .patch_history_summary import PatchHistorySummary from .patch_summary import PatchSummary +from .patching_configs import PatchingConfigs from .remove_auto_scaling_configuration_details import RemoveAutoScalingConfigurationDetails from .remove_cloud_sql_details import RemoveCloudSqlDetails from .remove_kafka_details import RemoveKafkaDetails @@ -119,6 +122,7 @@ "AutoScalePolicyRule": AutoScalePolicyRule, "AutoScalingConfiguration": AutoScalingConfiguration, "AutoScalingConfigurationSummary": AutoScalingConfigurationSummary, + "BatchingBasedPatchingConfigs": BatchingBasedPatchingConfigs, "BdsApiKey": BdsApiKey, "BdsApiKeySummary": BdsApiKeySummary, "BdsInstance": BdsInstance, @@ -140,6 +144,7 @@ "DayBasedVerticalScalingScheduleDetails": DayBasedVerticalScalingScheduleDetails, "DefaultError": DefaultError, "DisableCertificateDetails": DisableCertificateDetails, + "DowntimeBasedPatchingConfigs": DowntimeBasedPatchingConfigs, "EnableCertificateDetails": EnableCertificateDetails, "ExecuteBootstrapScriptDetails": ExecuteBootstrapScriptDetails, "HorizontalScalingScheduleDetails": HorizontalScalingScheduleDetails, @@ -162,6 +167,7 @@ "OsPatchSummary": OsPatchSummary, "PatchHistorySummary": PatchHistorySummary, "PatchSummary": PatchSummary, + "PatchingConfigs": PatchingConfigs, "RemoveAutoScalingConfigurationDetails": RemoveAutoScalingConfigurationDetails, "RemoveCloudSqlDetails": RemoveCloudSqlDetails, "RemoveKafkaDetails": RemoveKafkaDetails, diff --git a/src/oci/bds/models/batching_based_patching_configs.py b/src/oci/bds/models/batching_based_patching_configs.py new file mode 100644 index 0000000000..b2417f09ee --- /dev/null +++ b/src/oci/bds/models/batching_based_patching_configs.py @@ -0,0 +1,144 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + +from .patching_configs import PatchingConfigs +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BatchingBasedPatchingConfigs(PatchingConfigs): + """ + Patching configurations which allows patch the nodes batch by batch. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BatchingBasedPatchingConfigs object with values from keyword arguments. The default value of the :py:attr:`~oci.bds.models.BatchingBasedPatchingConfigs.patching_config_strategy` attribute + of this class is ``BATCHING_BASED`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param patching_config_strategy: + The value to assign to the patching_config_strategy property of this BatchingBasedPatchingConfigs. + Allowed values for this property are: "DOWNTIME_BASED", "BATCHING_BASED" + :type patching_config_strategy: str + + :param batch_size: + The value to assign to the batch_size property of this BatchingBasedPatchingConfigs. + :type batch_size: int + + :param wait_time_between_batch_in_seconds: + The value to assign to the wait_time_between_batch_in_seconds property of this BatchingBasedPatchingConfigs. + :type wait_time_between_batch_in_seconds: int + + :param tolerance_threshold_per_batch: + The value to assign to the tolerance_threshold_per_batch property of this BatchingBasedPatchingConfigs. + :type tolerance_threshold_per_batch: int + + """ + self.swagger_types = { + 'patching_config_strategy': 'str', + 'batch_size': 'int', + 'wait_time_between_batch_in_seconds': 'int', + 'tolerance_threshold_per_batch': 'int' + } + + self.attribute_map = { + 'patching_config_strategy': 'patchingConfigStrategy', + 'batch_size': 'batchSize', + 'wait_time_between_batch_in_seconds': 'waitTimeBetweenBatchInSeconds', + 'tolerance_threshold_per_batch': 'toleranceThresholdPerBatch' + } + + self._patching_config_strategy = None + self._batch_size = None + self._wait_time_between_batch_in_seconds = None + self._tolerance_threshold_per_batch = None + self._patching_config_strategy = 'BATCHING_BASED' + + @property + def batch_size(self): + """ + **[Required]** Gets the batch_size of this BatchingBasedPatchingConfigs. + How many nodes to be patched and rebooted in each iteration. + + + :return: The batch_size of this BatchingBasedPatchingConfigs. + :rtype: int + """ + return self._batch_size + + @batch_size.setter + def batch_size(self, batch_size): + """ + Sets the batch_size of this BatchingBasedPatchingConfigs. + How many nodes to be patched and rebooted in each iteration. + + + :param batch_size: The batch_size of this BatchingBasedPatchingConfigs. + :type: int + """ + self._batch_size = batch_size + + @property + def wait_time_between_batch_in_seconds(self): + """ + **[Required]** Gets the wait_time_between_batch_in_seconds of this BatchingBasedPatchingConfigs. + The wait time between batches in seconds. + + + :return: The wait_time_between_batch_in_seconds of this BatchingBasedPatchingConfigs. + :rtype: int + """ + return self._wait_time_between_batch_in_seconds + + @wait_time_between_batch_in_seconds.setter + def wait_time_between_batch_in_seconds(self, wait_time_between_batch_in_seconds): + """ + Sets the wait_time_between_batch_in_seconds of this BatchingBasedPatchingConfigs. + The wait time between batches in seconds. + + + :param wait_time_between_batch_in_seconds: The wait_time_between_batch_in_seconds of this BatchingBasedPatchingConfigs. + :type: int + """ + self._wait_time_between_batch_in_seconds = wait_time_between_batch_in_seconds + + @property + def tolerance_threshold_per_batch(self): + """ + **[Required]** Gets the tolerance_threshold_per_batch of this BatchingBasedPatchingConfigs. + Acceptable number of failed-to-be-patched nodes in each batch. The maximum number of failed-to-patch nodes cannot exceed 20% of the number of nodes. + + + :return: The tolerance_threshold_per_batch of this BatchingBasedPatchingConfigs. + :rtype: int + """ + return self._tolerance_threshold_per_batch + + @tolerance_threshold_per_batch.setter + def tolerance_threshold_per_batch(self, tolerance_threshold_per_batch): + """ + Sets the tolerance_threshold_per_batch of this BatchingBasedPatchingConfigs. + Acceptable number of failed-to-be-patched nodes in each batch. The maximum number of failed-to-patch nodes cannot exceed 20% of the number of nodes. + + + :param tolerance_threshold_per_batch: The tolerance_threshold_per_batch of this BatchingBasedPatchingConfigs. + :type: int + """ + self._tolerance_threshold_per_batch = tolerance_threshold_per_batch + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/bds/models/downtime_based_patching_configs.py b/src/oci/bds/models/downtime_based_patching_configs.py new file mode 100644 index 0000000000..4f005e2443 --- /dev/null +++ b/src/oci/bds/models/downtime_based_patching_configs.py @@ -0,0 +1,51 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + +from .patching_configs import PatchingConfigs +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DowntimeBasedPatchingConfigs(PatchingConfigs): + """ + Patching configurations which allows downtime. This patching config will patch and reboot all the nodes in parallel. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DowntimeBasedPatchingConfigs object with values from keyword arguments. The default value of the :py:attr:`~oci.bds.models.DowntimeBasedPatchingConfigs.patching_config_strategy` attribute + of this class is ``DOWNTIME_BASED`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param patching_config_strategy: + The value to assign to the patching_config_strategy property of this DowntimeBasedPatchingConfigs. + Allowed values for this property are: "DOWNTIME_BASED", "BATCHING_BASED" + :type patching_config_strategy: str + + """ + self.swagger_types = { + 'patching_config_strategy': 'str' + } + + self.attribute_map = { + 'patching_config_strategy': 'patchingConfigStrategy' + } + + self._patching_config_strategy = None + self._patching_config_strategy = 'DOWNTIME_BASED' + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/bds/models/install_os_patch_details.py b/src/oci/bds/models/install_os_patch_details.py index 0214321a3c..7ed534acb8 100644 --- a/src/oci/bds/models/install_os_patch_details.py +++ b/src/oci/bds/models/install_os_patch_details.py @@ -28,19 +28,26 @@ def __init__(self, **kwargs): The value to assign to the cluster_admin_password property of this InstallOsPatchDetails. :type cluster_admin_password: str + :param patching_configs: + The value to assign to the patching_configs property of this InstallOsPatchDetails. + :type patching_configs: oci.bds.models.PatchingConfigs + """ self.swagger_types = { 'os_patch_version': 'str', - 'cluster_admin_password': 'str' + 'cluster_admin_password': 'str', + 'patching_configs': 'PatchingConfigs' } self.attribute_map = { 'os_patch_version': 'osPatchVersion', - 'cluster_admin_password': 'clusterAdminPassword' + 'cluster_admin_password': 'clusterAdminPassword', + 'patching_configs': 'patchingConfigs' } self._os_patch_version = None self._cluster_admin_password = None + self._patching_configs = None @property def os_patch_version(self): @@ -90,6 +97,26 @@ def cluster_admin_password(self, cluster_admin_password): """ self._cluster_admin_password = cluster_admin_password + @property + def patching_configs(self): + """ + Gets the patching_configs of this InstallOsPatchDetails. + + :return: The patching_configs of this InstallOsPatchDetails. + :rtype: oci.bds.models.PatchingConfigs + """ + return self._patching_configs + + @patching_configs.setter + def patching_configs(self, patching_configs): + """ + Sets the patching_configs of this InstallOsPatchDetails. + + :param patching_configs: The patching_configs of this InstallOsPatchDetails. + :type: oci.bds.models.PatchingConfigs + """ + self._patching_configs = patching_configs + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/bds/models/node.py b/src/oci/bds/models/node.py index e82162a37d..9a7ca2626f 100644 --- a/src/oci/bds/models/node.py +++ b/src/oci/bds/models/node.py @@ -176,6 +176,14 @@ def __init__(self, **kwargs): The value to assign to the time_maintenance_reboot_due property of this Node. :type time_maintenance_reboot_due: datetime + :param os_version: + The value to assign to the os_version property of this Node. + :type os_version: str + + :param is_reboot_required: + The value to assign to the is_reboot_required property of this Node. + :type is_reboot_required: bool + """ self.swagger_types = { 'instance_id': 'str', @@ -197,7 +205,9 @@ def __init__(self, **kwargs): 'memory_in_gbs': 'int', 'nvmes': 'int', 'local_disks_total_size_in_gbs': 'float', - 'time_maintenance_reboot_due': 'datetime' + 'time_maintenance_reboot_due': 'datetime', + 'os_version': 'str', + 'is_reboot_required': 'bool' } self.attribute_map = { @@ -220,7 +230,9 @@ def __init__(self, **kwargs): 'memory_in_gbs': 'memoryInGBs', 'nvmes': 'nvmes', 'local_disks_total_size_in_gbs': 'localDisksTotalSizeInGBs', - 'time_maintenance_reboot_due': 'timeMaintenanceRebootDue' + 'time_maintenance_reboot_due': 'timeMaintenanceRebootDue', + 'os_version': 'osVersion', + 'is_reboot_required': 'isRebootRequired' } self._instance_id = None @@ -243,6 +255,8 @@ def __init__(self, **kwargs): self._nvmes = None self._local_disks_total_size_in_gbs = None self._time_maintenance_reboot_due = None + self._os_version = None + self._is_reboot_required = None @property def instance_id(self): @@ -736,6 +750,54 @@ def time_maintenance_reboot_due(self, time_maintenance_reboot_due): """ self._time_maintenance_reboot_due = time_maintenance_reboot_due + @property + def os_version(self): + """ + Gets the os_version of this Node. + BDS-assigned Operating System version for the node. + + + :return: The os_version of this Node. + :rtype: str + """ + return self._os_version + + @os_version.setter + def os_version(self, os_version): + """ + Sets the os_version of this Node. + BDS-assigned Operating System version for the node. + + + :param os_version: The os_version of this Node. + :type: str + """ + self._os_version = os_version + + @property + def is_reboot_required(self): + """ + Gets the is_reboot_required of this Node. + Indicates if the node requires a reboot to either reflect the latest os kernel or take actions for maintenance reboot. + + + :return: The is_reboot_required of this Node. + :rtype: bool + """ + return self._is_reboot_required + + @is_reboot_required.setter + def is_reboot_required(self, is_reboot_required): + """ + Sets the is_reboot_required of this Node. + Indicates if the node requires a reboot to either reflect the latest os kernel or take actions for maintenance reboot. + + + :param is_reboot_required: The is_reboot_required of this Node. + :type: bool + """ + self._is_reboot_required = is_reboot_required + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/bds/models/patching_configs.py b/src/oci/bds/models/patching_configs.py new file mode 100644 index 0000000000..776b039497 --- /dev/null +++ b/src/oci/bds/models/patching_configs.py @@ -0,0 +1,109 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190531 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class PatchingConfigs(object): + """ + Detailed configurations for defining the behavior when installing os patches. If not provided, nodes will be patched and rebooted AD/FD by AD/FD. + """ + + #: A constant which can be used with the patching_config_strategy property of a PatchingConfigs. + #: This constant has a value of "DOWNTIME_BASED" + PATCHING_CONFIG_STRATEGY_DOWNTIME_BASED = "DOWNTIME_BASED" + + #: A constant which can be used with the patching_config_strategy property of a PatchingConfigs. + #: This constant has a value of "BATCHING_BASED" + PATCHING_CONFIG_STRATEGY_BATCHING_BASED = "BATCHING_BASED" + + def __init__(self, **kwargs): + """ + Initializes a new PatchingConfigs object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.bds.models.BatchingBasedPatchingConfigs` + * :class:`~oci.bds.models.DowntimeBasedPatchingConfigs` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param patching_config_strategy: + The value to assign to the patching_config_strategy property of this PatchingConfigs. + Allowed values for this property are: "DOWNTIME_BASED", "BATCHING_BASED" + :type patching_config_strategy: str + + """ + self.swagger_types = { + 'patching_config_strategy': 'str' + } + + self.attribute_map = { + 'patching_config_strategy': 'patchingConfigStrategy' + } + + self._patching_config_strategy = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['patchingConfigStrategy'] + + if type == 'BATCHING_BASED': + return 'BatchingBasedPatchingConfigs' + + if type == 'DOWNTIME_BASED': + return 'DowntimeBasedPatchingConfigs' + else: + return 'PatchingConfigs' + + @property + def patching_config_strategy(self): + """ + **[Required]** Gets the patching_config_strategy of this PatchingConfigs. + Type of strategy used for detailed patching configuration + + Allowed values for this property are: "DOWNTIME_BASED", "BATCHING_BASED" + + + :return: The patching_config_strategy of this PatchingConfigs. + :rtype: str + """ + return self._patching_config_strategy + + @patching_config_strategy.setter + def patching_config_strategy(self, patching_config_strategy): + """ + Sets the patching_config_strategy of this PatchingConfigs. + Type of strategy used for detailed patching configuration + + + :param patching_config_strategy: The patching_config_strategy of this PatchingConfigs. + :type: str + """ + allowed_values = ["DOWNTIME_BASED", "BATCHING_BASED"] + if not value_allowed_none_or_none_sentinel(patching_config_strategy, allowed_values): + raise ValueError( + f"Invalid value for `patching_config_strategy`, must be None or one of {allowed_values}" + ) + self._patching_config_strategy = patching_config_strategy + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/bds/models/work_request_error.py b/src/oci/bds/models/work_request_error.py index 3d601ebc72..1858c10b80 100644 --- a/src/oci/bds/models/work_request_error.py +++ b/src/oci/bds/models/work_request_error.py @@ -53,7 +53,7 @@ def __init__(self, **kwargs): def code(self): """ **[Required]** Gets the code of this WorkRequestError. - A machine-usable code for the error that occured. Error codes are listed on (https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm). + A machine-usable code for the error that occurred. Error codes are listed on (https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm). :return: The code of this WorkRequestError. @@ -65,7 +65,7 @@ def code(self): def code(self, code): """ Sets the code of this WorkRequestError. - A machine-usable code for the error that occured. Error codes are listed on (https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm). + A machine-usable code for the error that occurred. Error codes are listed on (https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm). :param code: The code of this WorkRequestError. @@ -101,7 +101,7 @@ def message(self, message): def timestamp(self): """ **[Required]** Gets the timestamp of this WorkRequestError. - The time the error occured, shown as an RFC 3339 formatted datetime string. + The time the error occurred, shown as an RFC 3339 formatted datetime string. :return: The timestamp of this WorkRequestError. @@ -113,7 +113,7 @@ def timestamp(self): def timestamp(self, timestamp): """ Sets the timestamp of this WorkRequestError. - The time the error occured, shown as an RFC 3339 formatted datetime string. + The time the error occurred, shown as an RFC 3339 formatted datetime string. :param timestamp: The timestamp of this WorkRequestError. diff --git a/src/oci/core/models/__init__.py b/src/oci/core/models/__init__.py index 375aac7c10..e5e96caa65 100644 --- a/src/oci/core/models/__init__.py +++ b/src/oci/core/models/__init__.py @@ -281,6 +281,7 @@ from .flow_log_capture_filter_rule_details import FlowLogCaptureFilterRuleDetails from .generic_bm_launch_instance_platform_config import GenericBmLaunchInstancePlatformConfig from .generic_bm_platform_config import GenericBmPlatformConfig +from .get_ip_inventory_vcn_overlap_details import GetIpInventoryVcnOverlapDetails from .get_public_ip_by_ip_address_details import GetPublicIpByIpAddressDetails from .get_public_ip_by_private_ip_id_details import GetPublicIpByPrivateIpIdDetails from .ip_sec_connection import IPSecConnection @@ -376,6 +377,20 @@ from .intel_vm_platform_config import IntelVmPlatformConfig from .intel_vm_update_instance_platform_config import IntelVmUpdateInstancePlatformConfig from .internet_gateway import InternetGateway +from .inventory_ip_address_summary import InventoryIpAddressSummary +from .inventory_resource_summary import InventoryResourceSummary +from .inventory_subnet_cidr_block_summary import InventorySubnetCidrBlockSummary +from .inventory_subnet_summary import InventorySubnetSummary +from .inventory_vcn_cidr_block_summary import InventoryVcnCidrBlockSummary +from .inventory_vcn_summary import InventoryVcnSummary +from .ip_inventory_cidr_utilization_collection import IpInventoryCidrUtilizationCollection +from .ip_inventory_cidr_utilization_summary import IpInventoryCidrUtilizationSummary +from .ip_inventory_collection import IpInventoryCollection +from .ip_inventory_subnet_resource_collection import IpInventorySubnetResourceCollection +from .ip_inventory_subnet_resource_summary import IpInventorySubnetResourceSummary +from .ip_inventory_vcn_overlap_collection import IpInventoryVcnOverlapCollection +from .ip_inventory_vcn_overlap_summary import IpInventoryVcnOverlapSummary +from .ipam import Ipam from .ipsec_tunnel_drg_attachment_network_details import IpsecTunnelDrgAttachmentNetworkDetails from .ipv6 import Ipv6 from .ipv6_address_ipv6_subnet_cidr_pair_details import Ipv6AddressIpv6SubnetCidrPairDetails @@ -390,6 +405,7 @@ from .launch_instance_shape_config_details import LaunchInstanceShapeConfigDetails from .launch_options import LaunchOptions from .letter_of_authority import LetterOfAuthority +from .list_ip_inventory_details import ListIpInventoryDetails from .local_peering_gateway import LocalPeeringGateway from .loop_back_drg_attachment_network_details import LoopBackDrgAttachmentNetworkDetails from .macsec_key import MacsecKey @@ -867,6 +883,7 @@ "FlowLogCaptureFilterRuleDetails": FlowLogCaptureFilterRuleDetails, "GenericBmLaunchInstancePlatformConfig": GenericBmLaunchInstancePlatformConfig, "GenericBmPlatformConfig": GenericBmPlatformConfig, + "GetIpInventoryVcnOverlapDetails": GetIpInventoryVcnOverlapDetails, "GetPublicIpByIpAddressDetails": GetPublicIpByIpAddressDetails, "GetPublicIpByPrivateIpIdDetails": GetPublicIpByPrivateIpIdDetails, "IPSecConnection": IPSecConnection, @@ -962,6 +979,20 @@ "IntelVmPlatformConfig": IntelVmPlatformConfig, "IntelVmUpdateInstancePlatformConfig": IntelVmUpdateInstancePlatformConfig, "InternetGateway": InternetGateway, + "InventoryIpAddressSummary": InventoryIpAddressSummary, + "InventoryResourceSummary": InventoryResourceSummary, + "InventorySubnetCidrBlockSummary": InventorySubnetCidrBlockSummary, + "InventorySubnetSummary": InventorySubnetSummary, + "InventoryVcnCidrBlockSummary": InventoryVcnCidrBlockSummary, + "InventoryVcnSummary": InventoryVcnSummary, + "IpInventoryCidrUtilizationCollection": IpInventoryCidrUtilizationCollection, + "IpInventoryCidrUtilizationSummary": IpInventoryCidrUtilizationSummary, + "IpInventoryCollection": IpInventoryCollection, + "IpInventorySubnetResourceCollection": IpInventorySubnetResourceCollection, + "IpInventorySubnetResourceSummary": IpInventorySubnetResourceSummary, + "IpInventoryVcnOverlapCollection": IpInventoryVcnOverlapCollection, + "IpInventoryVcnOverlapSummary": IpInventoryVcnOverlapSummary, + "Ipam": Ipam, "IpsecTunnelDrgAttachmentNetworkDetails": IpsecTunnelDrgAttachmentNetworkDetails, "Ipv6": Ipv6, "Ipv6AddressIpv6SubnetCidrPairDetails": Ipv6AddressIpv6SubnetCidrPairDetails, @@ -976,6 +1007,7 @@ "LaunchInstanceShapeConfigDetails": LaunchInstanceShapeConfigDetails, "LaunchOptions": LaunchOptions, "LetterOfAuthority": LetterOfAuthority, + "ListIpInventoryDetails": ListIpInventoryDetails, "LocalPeeringGateway": LocalPeeringGateway, "LoopBackDrgAttachmentNetworkDetails": LoopBackDrgAttachmentNetworkDetails, "MacsecKey": MacsecKey, diff --git a/src/oci/core/models/get_ip_inventory_vcn_overlap_details.py b/src/oci/core/models/get_ip_inventory_vcn_overlap_details.py new file mode 100644 index 0000000000..caa14778a3 --- /dev/null +++ b/src/oci/core/models/get_ip_inventory_vcn_overlap_details.py @@ -0,0 +1,107 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class GetIpInventoryVcnOverlapDetails(object): + """ + Lists the compartment to find VCN overlap. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GetIpInventoryVcnOverlapDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param region_list: + The value to assign to the region_list property of this GetIpInventoryVcnOverlapDetails. + :type region_list: list[str] + + :param compartment_list: + The value to assign to the compartment_list property of this GetIpInventoryVcnOverlapDetails. + :type compartment_list: list[str] + + """ + self.swagger_types = { + 'region_list': 'list[str]', + 'compartment_list': 'list[str]' + } + + self.attribute_map = { + 'region_list': 'regionList', + 'compartment_list': 'compartmentList' + } + + self._region_list = None + self._compartment_list = None + + @property + def region_list(self): + """ + **[Required]** Gets the region_list of this GetIpInventoryVcnOverlapDetails. + Lists the selected regions. + + + :return: The region_list of this GetIpInventoryVcnOverlapDetails. + :rtype: list[str] + """ + return self._region_list + + @region_list.setter + def region_list(self, region_list): + """ + Sets the region_list of this GetIpInventoryVcnOverlapDetails. + Lists the selected regions. + + + :param region_list: The region_list of this GetIpInventoryVcnOverlapDetails. + :type: list[str] + """ + self._region_list = region_list + + @property + def compartment_list(self): + """ + **[Required]** Gets the compartment_list of this GetIpInventoryVcnOverlapDetails. + The list of `OCID`__ of the compartments. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_list of this GetIpInventoryVcnOverlapDetails. + :rtype: list[str] + """ + return self._compartment_list + + @compartment_list.setter + def compartment_list(self, compartment_list): + """ + Sets the compartment_list of this GetIpInventoryVcnOverlapDetails. + The list of `OCID`__ of the compartments. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_list: The compartment_list of this GetIpInventoryVcnOverlapDetails. + :type: list[str] + """ + self._compartment_list = compartment_list + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/inventory_ip_address_summary.py b/src/oci/core/models/inventory_ip_address_summary.py new file mode 100644 index 0000000000..c509c28fab --- /dev/null +++ b/src/oci/core/models/inventory_ip_address_summary.py @@ -0,0 +1,169 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class InventoryIpAddressSummary(object): + """ + Provides the IP address and its corresponding VNIC ID, VNIC name, and DNS hostname. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InventoryIpAddressSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param ip_address: + The value to assign to the ip_address property of this InventoryIpAddressSummary. + :type ip_address: str + + :param vnic_id: + The value to assign to the vnic_id property of this InventoryIpAddressSummary. + :type vnic_id: str + + :param vnic_name: + The value to assign to the vnic_name property of this InventoryIpAddressSummary. + :type vnic_name: str + + :param dns_host_name: + The value to assign to the dns_host_name property of this InventoryIpAddressSummary. + :type dns_host_name: str + + """ + self.swagger_types = { + 'ip_address': 'str', + 'vnic_id': 'str', + 'vnic_name': 'str', + 'dns_host_name': 'str' + } + + self.attribute_map = { + 'ip_address': 'ipAddress', + 'vnic_id': 'vnicId', + 'vnic_name': 'vnicName', + 'dns_host_name': 'dnsHostName' + } + + self._ip_address = None + self._vnic_id = None + self._vnic_name = None + self._dns_host_name = None + + @property + def ip_address(self): + """ + Gets the ip_address of this InventoryIpAddressSummary. + The IP address assigned from a subnet. + + + :return: The ip_address of this InventoryIpAddressSummary. + :rtype: str + """ + return self._ip_address + + @ip_address.setter + def ip_address(self, ip_address): + """ + Sets the ip_address of this InventoryIpAddressSummary. + The IP address assigned from a subnet. + + + :param ip_address: The ip_address of this InventoryIpAddressSummary. + :type: str + """ + self._ip_address = ip_address + + @property + def vnic_id(self): + """ + Gets the vnic_id of this InventoryIpAddressSummary. + The `OCID`__ of the VNIC. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The vnic_id of this InventoryIpAddressSummary. + :rtype: str + """ + return self._vnic_id + + @vnic_id.setter + def vnic_id(self, vnic_id): + """ + Sets the vnic_id of this InventoryIpAddressSummary. + The `OCID`__ of the VNIC. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param vnic_id: The vnic_id of this InventoryIpAddressSummary. + :type: str + """ + self._vnic_id = vnic_id + + @property + def vnic_name(self): + """ + Gets the vnic_name of this InventoryIpAddressSummary. + The name of the VNIC. + + + :return: The vnic_name of this InventoryIpAddressSummary. + :rtype: str + """ + return self._vnic_name + + @vnic_name.setter + def vnic_name(self, vnic_name): + """ + Sets the vnic_name of this InventoryIpAddressSummary. + The name of the VNIC. + + + :param vnic_name: The vnic_name of this InventoryIpAddressSummary. + :type: str + """ + self._vnic_name = vnic_name + + @property + def dns_host_name(self): + """ + Gets the dns_host_name of this InventoryIpAddressSummary. + The DNS hostname of the resource assigned with the IP address. + + + :return: The dns_host_name of this InventoryIpAddressSummary. + :rtype: str + """ + return self._dns_host_name + + @dns_host_name.setter + def dns_host_name(self, dns_host_name): + """ + Sets the dns_host_name of this InventoryIpAddressSummary. + The DNS hostname of the resource assigned with the IP address. + + + :param dns_host_name: The dns_host_name of this InventoryIpAddressSummary. + :type: str + """ + self._dns_host_name = dns_host_name + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/inventory_resource_summary.py b/src/oci/core/models/inventory_resource_summary.py new file mode 100644 index 0000000000..3196da609f --- /dev/null +++ b/src/oci/core/models/inventory_resource_summary.py @@ -0,0 +1,212 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class InventoryResourceSummary(object): + """ + Lists resources and its properties under a given subnet. + """ + + #: A constant which can be used with the resource_type property of a InventoryResourceSummary. + #: This constant has a value of "Resource" + RESOURCE_TYPE_RESOURCE = "Resource" + + def __init__(self, **kwargs): + """ + Initializes a new InventoryResourceSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param resource_name: + The value to assign to the resource_name property of this InventoryResourceSummary. + :type resource_name: str + + :param resource_type: + The value to assign to the resource_type property of this InventoryResourceSummary. + Allowed values for this property are: "Resource", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type resource_type: str + + :param ip_address_collection: + The value to assign to the ip_address_collection property of this InventoryResourceSummary. + :type ip_address_collection: list[oci.core.models.InventoryIpAddressSummary] + + :param region: + The value to assign to the region property of this InventoryResourceSummary. + :type region: str + + :param compartment_id: + The value to assign to the compartment_id property of this InventoryResourceSummary. + :type compartment_id: str + + """ + self.swagger_types = { + 'resource_name': 'str', + 'resource_type': 'str', + 'ip_address_collection': 'list[InventoryIpAddressSummary]', + 'region': 'str', + 'compartment_id': 'str' + } + + self.attribute_map = { + 'resource_name': 'resourceName', + 'resource_type': 'resourceType', + 'ip_address_collection': 'ipAddressCollection', + 'region': 'region', + 'compartment_id': 'compartmentId' + } + + self._resource_name = None + self._resource_type = None + self._ip_address_collection = None + self._region = None + self._compartment_id = None + + @property + def resource_name(self): + """ + Gets the resource_name of this InventoryResourceSummary. + The name of the resource created. + + + :return: The resource_name of this InventoryResourceSummary. + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name): + """ + Sets the resource_name of this InventoryResourceSummary. + The name of the resource created. + + + :param resource_name: The resource_name of this InventoryResourceSummary. + :type: str + """ + self._resource_name = resource_name + + @property + def resource_type(self): + """ + Gets the resource_type of this InventoryResourceSummary. + Resource types of the resource. + + Allowed values for this property are: "Resource", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The resource_type of this InventoryResourceSummary. + :rtype: str + """ + return self._resource_type + + @resource_type.setter + def resource_type(self, resource_type): + """ + Sets the resource_type of this InventoryResourceSummary. + Resource types of the resource. + + + :param resource_type: The resource_type of this InventoryResourceSummary. + :type: str + """ + allowed_values = ["Resource"] + if not value_allowed_none_or_none_sentinel(resource_type, allowed_values): + resource_type = 'UNKNOWN_ENUM_VALUE' + self._resource_type = resource_type + + @property + def ip_address_collection(self): + """ + Gets the ip_address_collection of this InventoryResourceSummary. + Lists the 'IpAddressCollection' object. + + + :return: The ip_address_collection of this InventoryResourceSummary. + :rtype: list[oci.core.models.InventoryIpAddressSummary] + """ + return self._ip_address_collection + + @ip_address_collection.setter + def ip_address_collection(self, ip_address_collection): + """ + Sets the ip_address_collection of this InventoryResourceSummary. + Lists the 'IpAddressCollection' object. + + + :param ip_address_collection: The ip_address_collection of this InventoryResourceSummary. + :type: list[oci.core.models.InventoryIpAddressSummary] + """ + self._ip_address_collection = ip_address_collection + + @property + def region(self): + """ + Gets the region of this InventoryResourceSummary. + The region name of the corresponding resource. + + + :return: The region of this InventoryResourceSummary. + :rtype: str + """ + return self._region + + @region.setter + def region(self, region): + """ + Sets the region of this InventoryResourceSummary. + The region name of the corresponding resource. + + + :param region: The region of this InventoryResourceSummary. + :type: str + """ + self._region = region + + @property + def compartment_id(self): + """ + Gets the compartment_id of this InventoryResourceSummary. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this InventoryResourceSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this InventoryResourceSummary. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this InventoryResourceSummary. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/inventory_subnet_cidr_block_summary.py b/src/oci/core/models/inventory_subnet_cidr_block_summary.py new file mode 100644 index 0000000000..af595ffb3a --- /dev/null +++ b/src/oci/core/models/inventory_subnet_cidr_block_summary.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class InventorySubnetCidrBlockSummary(object): + """ + Lists CIDRs and utilization within a subnet. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InventorySubnetCidrBlockSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param ip_cidr_block: + The value to assign to the ip_cidr_block property of this InventorySubnetCidrBlockSummary. + :type ip_cidr_block: str + + :param utilization: + The value to assign to the utilization property of this InventorySubnetCidrBlockSummary. + :type utilization: float + + """ + self.swagger_types = { + 'ip_cidr_block': 'str', + 'utilization': 'float' + } + + self.attribute_map = { + 'ip_cidr_block': 'ipCidrBlock', + 'utilization': 'utilization' + } + + self._ip_cidr_block = None + self._utilization = None + + @property + def ip_cidr_block(self): + """ + Gets the ip_cidr_block of this InventorySubnetCidrBlockSummary. + The CIDR Prefix within a VCN. + + + :return: The ip_cidr_block of this InventorySubnetCidrBlockSummary. + :rtype: str + """ + return self._ip_cidr_block + + @ip_cidr_block.setter + def ip_cidr_block(self, ip_cidr_block): + """ + Sets the ip_cidr_block of this InventorySubnetCidrBlockSummary. + The CIDR Prefix within a VCN. + + + :param ip_cidr_block: The ip_cidr_block of this InventorySubnetCidrBlockSummary. + :type: str + """ + self._ip_cidr_block = ip_cidr_block + + @property + def utilization(self): + """ + Gets the utilization of this InventorySubnetCidrBlockSummary. + The CIDR utilization of a VCN. + + + :return: The utilization of this InventorySubnetCidrBlockSummary. + :rtype: float + """ + return self._utilization + + @utilization.setter + def utilization(self, utilization): + """ + Sets the utilization of this InventorySubnetCidrBlockSummary. + The CIDR utilization of a VCN. + + + :param utilization: The utilization of this InventorySubnetCidrBlockSummary. + :type: float + """ + self._utilization = utilization + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/inventory_subnet_summary.py b/src/oci/core/models/inventory_subnet_summary.py new file mode 100644 index 0000000000..e97047f664 --- /dev/null +++ b/src/oci/core/models/inventory_subnet_summary.py @@ -0,0 +1,309 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class InventorySubnetSummary(object): + """ + Lists subnet and its associated resources. + """ + + #: A constant which can be used with the resource_type property of a InventorySubnetSummary. + #: This constant has a value of "Subnet" + RESOURCE_TYPE_SUBNET = "Subnet" + + def __init__(self, **kwargs): + """ + Initializes a new InventorySubnetSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param subnet_id: + The value to assign to the subnet_id property of this InventorySubnetSummary. + :type subnet_id: str + + :param subnet_name: + The value to assign to the subnet_name property of this InventorySubnetSummary. + :type subnet_name: str + + :param resource_type: + The value to assign to the resource_type property of this InventorySubnetSummary. + Allowed values for this property are: "Subnet", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type resource_type: str + + :param inventory_subnet_cidr_collection: + The value to assign to the inventory_subnet_cidr_collection property of this InventorySubnetSummary. + :type inventory_subnet_cidr_collection: list[oci.core.models.InventorySubnetCidrBlockSummary] + + :param dns_domain_name: + The value to assign to the dns_domain_name property of this InventorySubnetSummary. + :type dns_domain_name: str + + :param region: + The value to assign to the region property of this InventorySubnetSummary. + :type region: str + + :param compartment_id: + The value to assign to the compartment_id property of this InventorySubnetSummary. + :type compartment_id: str + + :param inventory_resource_summary: + The value to assign to the inventory_resource_summary property of this InventorySubnetSummary. + :type inventory_resource_summary: list[oci.core.models.InventoryResourceSummary] + + """ + self.swagger_types = { + 'subnet_id': 'str', + 'subnet_name': 'str', + 'resource_type': 'str', + 'inventory_subnet_cidr_collection': 'list[InventorySubnetCidrBlockSummary]', + 'dns_domain_name': 'str', + 'region': 'str', + 'compartment_id': 'str', + 'inventory_resource_summary': 'list[InventoryResourceSummary]' + } + + self.attribute_map = { + 'subnet_id': 'subnetId', + 'subnet_name': 'subnetName', + 'resource_type': 'resourceType', + 'inventory_subnet_cidr_collection': 'inventorySubnetCidrCollection', + 'dns_domain_name': 'dnsDomainName', + 'region': 'region', + 'compartment_id': 'compartmentId', + 'inventory_resource_summary': 'inventoryResourceSummary' + } + + self._subnet_id = None + self._subnet_name = None + self._resource_type = None + self._inventory_subnet_cidr_collection = None + self._dns_domain_name = None + self._region = None + self._compartment_id = None + self._inventory_resource_summary = None + + @property + def subnet_id(self): + """ + Gets the subnet_id of this InventorySubnetSummary. + The `OCID`__ of the subnet. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The subnet_id of this InventorySubnetSummary. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """ + Sets the subnet_id of this InventorySubnetSummary. + The `OCID`__ of the subnet. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param subnet_id: The subnet_id of this InventorySubnetSummary. + :type: str + """ + self._subnet_id = subnet_id + + @property + def subnet_name(self): + """ + Gets the subnet_name of this InventorySubnetSummary. + Name of the subnet within a VCN. + + + :return: The subnet_name of this InventorySubnetSummary. + :rtype: str + """ + return self._subnet_name + + @subnet_name.setter + def subnet_name(self, subnet_name): + """ + Sets the subnet_name of this InventorySubnetSummary. + Name of the subnet within a VCN. + + + :param subnet_name: The subnet_name of this InventorySubnetSummary. + :type: str + """ + self._subnet_name = subnet_name + + @property + def resource_type(self): + """ + Gets the resource_type of this InventorySubnetSummary. + Resource types of the subnet. + + Allowed values for this property are: "Subnet", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The resource_type of this InventorySubnetSummary. + :rtype: str + """ + return self._resource_type + + @resource_type.setter + def resource_type(self, resource_type): + """ + Sets the resource_type of this InventorySubnetSummary. + Resource types of the subnet. + + + :param resource_type: The resource_type of this InventorySubnetSummary. + :type: str + """ + allowed_values = ["Subnet"] + if not value_allowed_none_or_none_sentinel(resource_type, allowed_values): + resource_type = 'UNKNOWN_ENUM_VALUE' + self._resource_type = resource_type + + @property + def inventory_subnet_cidr_collection(self): + """ + Gets the inventory_subnet_cidr_collection of this InventorySubnetSummary. + Lists CIDRs and utilization within the subnet. + + + :return: The inventory_subnet_cidr_collection of this InventorySubnetSummary. + :rtype: list[oci.core.models.InventorySubnetCidrBlockSummary] + """ + return self._inventory_subnet_cidr_collection + + @inventory_subnet_cidr_collection.setter + def inventory_subnet_cidr_collection(self, inventory_subnet_cidr_collection): + """ + Sets the inventory_subnet_cidr_collection of this InventorySubnetSummary. + Lists CIDRs and utilization within the subnet. + + + :param inventory_subnet_cidr_collection: The inventory_subnet_cidr_collection of this InventorySubnetSummary. + :type: list[oci.core.models.InventorySubnetCidrBlockSummary] + """ + self._inventory_subnet_cidr_collection = inventory_subnet_cidr_collection + + @property + def dns_domain_name(self): + """ + Gets the dns_domain_name of this InventorySubnetSummary. + DNS domain name of the subnet. + + + :return: The dns_domain_name of this InventorySubnetSummary. + :rtype: str + """ + return self._dns_domain_name + + @dns_domain_name.setter + def dns_domain_name(self, dns_domain_name): + """ + Sets the dns_domain_name of this InventorySubnetSummary. + DNS domain name of the subnet. + + + :param dns_domain_name: The dns_domain_name of this InventorySubnetSummary. + :type: str + """ + self._dns_domain_name = dns_domain_name + + @property + def region(self): + """ + Gets the region of this InventorySubnetSummary. + Region name of the subnet. + + + :return: The region of this InventorySubnetSummary. + :rtype: str + """ + return self._region + + @region.setter + def region(self, region): + """ + Sets the region of this InventorySubnetSummary. + Region name of the subnet. + + + :param region: The region of this InventorySubnetSummary. + :type: str + """ + self._region = region + + @property + def compartment_id(self): + """ + Gets the compartment_id of this InventorySubnetSummary. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this InventorySubnetSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this InventorySubnetSummary. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this InventorySubnetSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def inventory_resource_summary(self): + """ + Gets the inventory_resource_summary of this InventorySubnetSummary. + Lists the `ResourceCollection` object. + + + :return: The inventory_resource_summary of this InventorySubnetSummary. + :rtype: list[oci.core.models.InventoryResourceSummary] + """ + return self._inventory_resource_summary + + @inventory_resource_summary.setter + def inventory_resource_summary(self, inventory_resource_summary): + """ + Sets the inventory_resource_summary of this InventorySubnetSummary. + Lists the `ResourceCollection` object. + + + :param inventory_resource_summary: The inventory_resource_summary of this InventorySubnetSummary. + :type: list[oci.core.models.InventoryResourceSummary] + """ + self._inventory_resource_summary = inventory_resource_summary + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/inventory_vcn_cidr_block_summary.py b/src/oci/core/models/inventory_vcn_cidr_block_summary.py new file mode 100644 index 0000000000..de74c93549 --- /dev/null +++ b/src/oci/core/models/inventory_vcn_cidr_block_summary.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class InventoryVcnCidrBlockSummary(object): + """ + Lists the CIDRs and utilization within a VCN. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InventoryVcnCidrBlockSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param ip_cidr_block: + The value to assign to the ip_cidr_block property of this InventoryVcnCidrBlockSummary. + :type ip_cidr_block: str + + :param utilization: + The value to assign to the utilization property of this InventoryVcnCidrBlockSummary. + :type utilization: float + + """ + self.swagger_types = { + 'ip_cidr_block': 'str', + 'utilization': 'float' + } + + self.attribute_map = { + 'ip_cidr_block': 'ipCidrBlock', + 'utilization': 'utilization' + } + + self._ip_cidr_block = None + self._utilization = None + + @property + def ip_cidr_block(self): + """ + Gets the ip_cidr_block of this InventoryVcnCidrBlockSummary. + The CIDR prefix within a VCN. + + + :return: The ip_cidr_block of this InventoryVcnCidrBlockSummary. + :rtype: str + """ + return self._ip_cidr_block + + @ip_cidr_block.setter + def ip_cidr_block(self, ip_cidr_block): + """ + Sets the ip_cidr_block of this InventoryVcnCidrBlockSummary. + The CIDR prefix within a VCN. + + + :param ip_cidr_block: The ip_cidr_block of this InventoryVcnCidrBlockSummary. + :type: str + """ + self._ip_cidr_block = ip_cidr_block + + @property + def utilization(self): + """ + Gets the utilization of this InventoryVcnCidrBlockSummary. + The CIDR utilization of a VCN. + + + :return: The utilization of this InventoryVcnCidrBlockSummary. + :rtype: float + """ + return self._utilization + + @utilization.setter + def utilization(self, utilization): + """ + Sets the utilization of this InventoryVcnCidrBlockSummary. + The CIDR utilization of a VCN. + + + :param utilization: The utilization of this InventoryVcnCidrBlockSummary. + :type: float + """ + self._utilization = utilization + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/inventory_vcn_summary.py b/src/oci/core/models/inventory_vcn_summary.py new file mode 100644 index 0000000000..c8556c7361 --- /dev/null +++ b/src/oci/core/models/inventory_vcn_summary.py @@ -0,0 +1,309 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class InventoryVcnSummary(object): + """ + Provides the summary of a VCN's IP Inventory data under specified compartments. + """ + + #: A constant which can be used with the resource_type property of a InventoryVcnSummary. + #: This constant has a value of "VCN" + RESOURCE_TYPE_VCN = "VCN" + + def __init__(self, **kwargs): + """ + Initializes a new InventoryVcnSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param vcn_id: + The value to assign to the vcn_id property of this InventoryVcnSummary. + :type vcn_id: str + + :param vcn_name: + The value to assign to the vcn_name property of this InventoryVcnSummary. + :type vcn_name: str + + :param resource_type: + The value to assign to the resource_type property of this InventoryVcnSummary. + Allowed values for this property are: "VCN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type resource_type: str + + :param inventory_vcn_cidr_block_collection: + The value to assign to the inventory_vcn_cidr_block_collection property of this InventoryVcnSummary. + :type inventory_vcn_cidr_block_collection: list[oci.core.models.InventoryVcnCidrBlockSummary] + + :param dns_domain_name: + The value to assign to the dns_domain_name property of this InventoryVcnSummary. + :type dns_domain_name: str + + :param region: + The value to assign to the region property of this InventoryVcnSummary. + :type region: str + + :param compartment_id: + The value to assign to the compartment_id property of this InventoryVcnSummary. + :type compartment_id: str + + :param inventory_subnetcollection: + The value to assign to the inventory_subnetcollection property of this InventoryVcnSummary. + :type inventory_subnetcollection: list[oci.core.models.InventorySubnetSummary] + + """ + self.swagger_types = { + 'vcn_id': 'str', + 'vcn_name': 'str', + 'resource_type': 'str', + 'inventory_vcn_cidr_block_collection': 'list[InventoryVcnCidrBlockSummary]', + 'dns_domain_name': 'str', + 'region': 'str', + 'compartment_id': 'str', + 'inventory_subnetcollection': 'list[InventorySubnetSummary]' + } + + self.attribute_map = { + 'vcn_id': 'vcnId', + 'vcn_name': 'vcnName', + 'resource_type': 'resourceType', + 'inventory_vcn_cidr_block_collection': 'inventoryVcnCidrBlockCollection', + 'dns_domain_name': 'dnsDomainName', + 'region': 'region', + 'compartment_id': 'compartmentId', + 'inventory_subnetcollection': 'inventorySubnetcollection' + } + + self._vcn_id = None + self._vcn_name = None + self._resource_type = None + self._inventory_vcn_cidr_block_collection = None + self._dns_domain_name = None + self._region = None + self._compartment_id = None + self._inventory_subnetcollection = None + + @property + def vcn_id(self): + """ + Gets the vcn_id of this InventoryVcnSummary. + The `OCID`__ of the VCN . + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The vcn_id of this InventoryVcnSummary. + :rtype: str + """ + return self._vcn_id + + @vcn_id.setter + def vcn_id(self, vcn_id): + """ + Sets the vcn_id of this InventoryVcnSummary. + The `OCID`__ of the VCN . + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param vcn_id: The vcn_id of this InventoryVcnSummary. + :type: str + """ + self._vcn_id = vcn_id + + @property + def vcn_name(self): + """ + Gets the vcn_name of this InventoryVcnSummary. + Name of the VCN. + + + :return: The vcn_name of this InventoryVcnSummary. + :rtype: str + """ + return self._vcn_name + + @vcn_name.setter + def vcn_name(self, vcn_name): + """ + Sets the vcn_name of this InventoryVcnSummary. + Name of the VCN. + + + :param vcn_name: The vcn_name of this InventoryVcnSummary. + :type: str + """ + self._vcn_name = vcn_name + + @property + def resource_type(self): + """ + Gets the resource_type of this InventoryVcnSummary. + Resource types of the VCN. + + Allowed values for this property are: "VCN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The resource_type of this InventoryVcnSummary. + :rtype: str + """ + return self._resource_type + + @resource_type.setter + def resource_type(self, resource_type): + """ + Sets the resource_type of this InventoryVcnSummary. + Resource types of the VCN. + + + :param resource_type: The resource_type of this InventoryVcnSummary. + :type: str + """ + allowed_values = ["VCN"] + if not value_allowed_none_or_none_sentinel(resource_type, allowed_values): + resource_type = 'UNKNOWN_ENUM_VALUE' + self._resource_type = resource_type + + @property + def inventory_vcn_cidr_block_collection(self): + """ + Gets the inventory_vcn_cidr_block_collection of this InventoryVcnSummary. + Lists `InventoryVcnCidrBlockSummary` objects. + + + :return: The inventory_vcn_cidr_block_collection of this InventoryVcnSummary. + :rtype: list[oci.core.models.InventoryVcnCidrBlockSummary] + """ + return self._inventory_vcn_cidr_block_collection + + @inventory_vcn_cidr_block_collection.setter + def inventory_vcn_cidr_block_collection(self, inventory_vcn_cidr_block_collection): + """ + Sets the inventory_vcn_cidr_block_collection of this InventoryVcnSummary. + Lists `InventoryVcnCidrBlockSummary` objects. + + + :param inventory_vcn_cidr_block_collection: The inventory_vcn_cidr_block_collection of this InventoryVcnSummary. + :type: list[oci.core.models.InventoryVcnCidrBlockSummary] + """ + self._inventory_vcn_cidr_block_collection = inventory_vcn_cidr_block_collection + + @property + def dns_domain_name(self): + """ + Gets the dns_domain_name of this InventoryVcnSummary. + DNS domain name of the VCN. + + + :return: The dns_domain_name of this InventoryVcnSummary. + :rtype: str + """ + return self._dns_domain_name + + @dns_domain_name.setter + def dns_domain_name(self, dns_domain_name): + """ + Sets the dns_domain_name of this InventoryVcnSummary. + DNS domain name of the VCN. + + + :param dns_domain_name: The dns_domain_name of this InventoryVcnSummary. + :type: str + """ + self._dns_domain_name = dns_domain_name + + @property + def region(self): + """ + Gets the region of this InventoryVcnSummary. + Region name of the VCN. + + + :return: The region of this InventoryVcnSummary. + :rtype: str + """ + return self._region + + @region.setter + def region(self, region): + """ + Sets the region of this InventoryVcnSummary. + Region name of the VCN. + + + :param region: The region of this InventoryVcnSummary. + :type: str + """ + self._region = region + + @property + def compartment_id(self): + """ + Gets the compartment_id of this InventoryVcnSummary. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this InventoryVcnSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this InventoryVcnSummary. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this InventoryVcnSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def inventory_subnetcollection(self): + """ + Gets the inventory_subnetcollection of this InventoryVcnSummary. + Lists `Subnetcollection` objects + + + :return: The inventory_subnetcollection of this InventoryVcnSummary. + :rtype: list[oci.core.models.InventorySubnetSummary] + """ + return self._inventory_subnetcollection + + @inventory_subnetcollection.setter + def inventory_subnetcollection(self, inventory_subnetcollection): + """ + Sets the inventory_subnetcollection of this InventoryVcnSummary. + Lists `Subnetcollection` objects + + + :param inventory_subnetcollection: The inventory_subnetcollection of this InventoryVcnSummary. + :type: list[oci.core.models.InventorySubnetSummary] + """ + self._inventory_subnetcollection = inventory_subnetcollection + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/ip_inventory_cidr_utilization_collection.py b/src/oci/core/models/ip_inventory_cidr_utilization_collection.py new file mode 100644 index 0000000000..2b9e2581e7 --- /dev/null +++ b/src/oci/core/models/ip_inventory_cidr_utilization_collection.py @@ -0,0 +1,202 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IpInventoryCidrUtilizationCollection(object): + """ + The IP Inventory CIDR utilization details of a subnet. + """ + + def __init__(self, **kwargs): + """ + Initializes a new IpInventoryCidrUtilizationCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param count: + The value to assign to the count property of this IpInventoryCidrUtilizationCollection. + :type count: int + + :param last_updated_timestamp: + The value to assign to the last_updated_timestamp property of this IpInventoryCidrUtilizationCollection. + :type last_updated_timestamp: datetime + + :param ip_inventory_cidr_utilization_summary: + The value to assign to the ip_inventory_cidr_utilization_summary property of this IpInventoryCidrUtilizationCollection. + :type ip_inventory_cidr_utilization_summary: list[oci.core.models.IpInventoryCidrUtilizationSummary] + + :param message: + The value to assign to the message property of this IpInventoryCidrUtilizationCollection. + :type message: str + + :param compartment_id: + The value to assign to the compartment_id property of this IpInventoryCidrUtilizationCollection. + :type compartment_id: str + + """ + self.swagger_types = { + 'count': 'int', + 'last_updated_timestamp': 'datetime', + 'ip_inventory_cidr_utilization_summary': 'list[IpInventoryCidrUtilizationSummary]', + 'message': 'str', + 'compartment_id': 'str' + } + + self.attribute_map = { + 'count': 'count', + 'last_updated_timestamp': 'lastUpdatedTimestamp', + 'ip_inventory_cidr_utilization_summary': 'ipInventoryCidrUtilizationSummary', + 'message': 'message', + 'compartment_id': 'compartmentId' + } + + self._count = None + self._last_updated_timestamp = None + self._ip_inventory_cidr_utilization_summary = None + self._message = None + self._compartment_id = None + + @property + def count(self): + """ + Gets the count of this IpInventoryCidrUtilizationCollection. + Specifies the count for the number of results for the response. + + + :return: The count of this IpInventoryCidrUtilizationCollection. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this IpInventoryCidrUtilizationCollection. + Specifies the count for the number of results for the response. + + + :param count: The count of this IpInventoryCidrUtilizationCollection. + :type: int + """ + self._count = count + + @property + def last_updated_timestamp(self): + """ + Gets the last_updated_timestamp of this IpInventoryCidrUtilizationCollection. + The Timestamp of the latest update from the database in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The last_updated_timestamp of this IpInventoryCidrUtilizationCollection. + :rtype: datetime + """ + return self._last_updated_timestamp + + @last_updated_timestamp.setter + def last_updated_timestamp(self, last_updated_timestamp): + """ + Sets the last_updated_timestamp of this IpInventoryCidrUtilizationCollection. + The Timestamp of the latest update from the database in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param last_updated_timestamp: The last_updated_timestamp of this IpInventoryCidrUtilizationCollection. + :type: datetime + """ + self._last_updated_timestamp = last_updated_timestamp + + @property + def ip_inventory_cidr_utilization_summary(self): + """ + Gets the ip_inventory_cidr_utilization_summary of this IpInventoryCidrUtilizationCollection. + Lists 'IpInventoryCidrUtilizationSummary` object. + + + :return: The ip_inventory_cidr_utilization_summary of this IpInventoryCidrUtilizationCollection. + :rtype: list[oci.core.models.IpInventoryCidrUtilizationSummary] + """ + return self._ip_inventory_cidr_utilization_summary + + @ip_inventory_cidr_utilization_summary.setter + def ip_inventory_cidr_utilization_summary(self, ip_inventory_cidr_utilization_summary): + """ + Sets the ip_inventory_cidr_utilization_summary of this IpInventoryCidrUtilizationCollection. + Lists 'IpInventoryCidrUtilizationSummary` object. + + + :param ip_inventory_cidr_utilization_summary: The ip_inventory_cidr_utilization_summary of this IpInventoryCidrUtilizationCollection. + :type: list[oci.core.models.IpInventoryCidrUtilizationSummary] + """ + self._ip_inventory_cidr_utilization_summary = ip_inventory_cidr_utilization_summary + + @property + def message(self): + """ + Gets the message of this IpInventoryCidrUtilizationCollection. + Indicates the status of the data. + + + :return: The message of this IpInventoryCidrUtilizationCollection. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this IpInventoryCidrUtilizationCollection. + Indicates the status of the data. + + + :param message: The message of this IpInventoryCidrUtilizationCollection. + :type: str + """ + self._message = message + + @property + def compartment_id(self): + """ + Gets the compartment_id of this IpInventoryCidrUtilizationCollection. + Compartment of the subnet. + + + :return: The compartment_id of this IpInventoryCidrUtilizationCollection. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this IpInventoryCidrUtilizationCollection. + Compartment of the subnet. + + + :param compartment_id: The compartment_id of this IpInventoryCidrUtilizationCollection. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/ip_inventory_cidr_utilization_summary.py b/src/oci/core/models/ip_inventory_cidr_utilization_summary.py new file mode 100644 index 0000000000..a942852b3b --- /dev/null +++ b/src/oci/core/models/ip_inventory_cidr_utilization_summary.py @@ -0,0 +1,134 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IpInventoryCidrUtilizationSummary(object): + """ + The CIDR utilization details of a subnet. + """ + + def __init__(self, **kwargs): + """ + Initializes a new IpInventoryCidrUtilizationSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param cidr: + The value to assign to the cidr property of this IpInventoryCidrUtilizationSummary. + :type cidr: str + + :param utilization: + The value to assign to the utilization property of this IpInventoryCidrUtilizationSummary. + :type utilization: float + + :param address_type: + The value to assign to the address_type property of this IpInventoryCidrUtilizationSummary. + :type address_type: str + + """ + self.swagger_types = { + 'cidr': 'str', + 'utilization': 'float', + 'address_type': 'str' + } + + self.attribute_map = { + 'cidr': 'cidr', + 'utilization': 'utilization', + 'address_type': 'addressType' + } + + self._cidr = None + self._utilization = None + self._address_type = None + + @property + def cidr(self): + """ + Gets the cidr of this IpInventoryCidrUtilizationSummary. + The CIDR range of a subnet. + + + :return: The cidr of this IpInventoryCidrUtilizationSummary. + :rtype: str + """ + return self._cidr + + @cidr.setter + def cidr(self, cidr): + """ + Sets the cidr of this IpInventoryCidrUtilizationSummary. + The CIDR range of a subnet. + + + :param cidr: The cidr of this IpInventoryCidrUtilizationSummary. + :type: str + """ + self._cidr = cidr + + @property + def utilization(self): + """ + Gets the utilization of this IpInventoryCidrUtilizationSummary. + The CIDR utilisation of a subnet. + + + :return: The utilization of this IpInventoryCidrUtilizationSummary. + :rtype: float + """ + return self._utilization + + @utilization.setter + def utilization(self, utilization): + """ + Sets the utilization of this IpInventoryCidrUtilizationSummary. + The CIDR utilisation of a subnet. + + + :param utilization: The utilization of this IpInventoryCidrUtilizationSummary. + :type: float + """ + self._utilization = utilization + + @property + def address_type(self): + """ + Gets the address_type of this IpInventoryCidrUtilizationSummary. + Address type of the CIDR within a subnet. + + + :return: The address_type of this IpInventoryCidrUtilizationSummary. + :rtype: str + """ + return self._address_type + + @address_type.setter + def address_type(self, address_type): + """ + Sets the address_type of this IpInventoryCidrUtilizationSummary. + Address type of the CIDR within a subnet. + + + :param address_type: The address_type of this IpInventoryCidrUtilizationSummary. + :type: str + """ + self._address_type = address_type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/ip_inventory_collection.py b/src/oci/core/models/ip_inventory_collection.py new file mode 100644 index 0000000000..8007c77207 --- /dev/null +++ b/src/oci/core/models/ip_inventory_collection.py @@ -0,0 +1,202 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IpInventoryCollection(object): + """ + The results returned by a `ListIpInventory` operation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new IpInventoryCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param count: + The value to assign to the count property of this IpInventoryCollection. + :type count: int + + :param last_updated_timestamp: + The value to assign to the last_updated_timestamp property of this IpInventoryCollection. + :type last_updated_timestamp: datetime + + :param compartments_per_tenant: + The value to assign to the compartments_per_tenant property of this IpInventoryCollection. + :type compartments_per_tenant: int + + :param inventory_vcn_collection: + The value to assign to the inventory_vcn_collection property of this IpInventoryCollection. + :type inventory_vcn_collection: list[oci.core.models.InventoryVcnSummary] + + :param message: + The value to assign to the message property of this IpInventoryCollection. + :type message: str + + """ + self.swagger_types = { + 'count': 'int', + 'last_updated_timestamp': 'datetime', + 'compartments_per_tenant': 'int', + 'inventory_vcn_collection': 'list[InventoryVcnSummary]', + 'message': 'str' + } + + self.attribute_map = { + 'count': 'count', + 'last_updated_timestamp': 'lastUpdatedTimestamp', + 'compartments_per_tenant': 'compartmentsPerTenant', + 'inventory_vcn_collection': 'inventoryVcnCollection', + 'message': 'message' + } + + self._count = None + self._last_updated_timestamp = None + self._compartments_per_tenant = None + self._inventory_vcn_collection = None + self._message = None + + @property + def count(self): + """ + Gets the count of this IpInventoryCollection. + Species the count for the number of results for the response. + + + :return: The count of this IpInventoryCollection. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this IpInventoryCollection. + Species the count for the number of results for the response. + + + :param count: The count of this IpInventoryCollection. + :type: int + """ + self._count = count + + @property + def last_updated_timestamp(self): + """ + Gets the last_updated_timestamp of this IpInventoryCollection. + The timestamp of the latest update from the database in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The last_updated_timestamp of this IpInventoryCollection. + :rtype: datetime + """ + return self._last_updated_timestamp + + @last_updated_timestamp.setter + def last_updated_timestamp(self, last_updated_timestamp): + """ + Sets the last_updated_timestamp of this IpInventoryCollection. + The timestamp of the latest update from the database in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param last_updated_timestamp: The last_updated_timestamp of this IpInventoryCollection. + :type: datetime + """ + self._last_updated_timestamp = last_updated_timestamp + + @property + def compartments_per_tenant(self): + """ + Gets the compartments_per_tenant of this IpInventoryCollection. + The number of compartments per compartments per tenant. + + + :return: The compartments_per_tenant of this IpInventoryCollection. + :rtype: int + """ + return self._compartments_per_tenant + + @compartments_per_tenant.setter + def compartments_per_tenant(self, compartments_per_tenant): + """ + Sets the compartments_per_tenant of this IpInventoryCollection. + The number of compartments per compartments per tenant. + + + :param compartments_per_tenant: The compartments_per_tenant of this IpInventoryCollection. + :type: int + """ + self._compartments_per_tenant = compartments_per_tenant + + @property + def inventory_vcn_collection(self): + """ + Gets the inventory_vcn_collection of this IpInventoryCollection. + Lists `IpInventoryVcnSummary` objects. + + + :return: The inventory_vcn_collection of this IpInventoryCollection. + :rtype: list[oci.core.models.InventoryVcnSummary] + """ + return self._inventory_vcn_collection + + @inventory_vcn_collection.setter + def inventory_vcn_collection(self, inventory_vcn_collection): + """ + Sets the inventory_vcn_collection of this IpInventoryCollection. + Lists `IpInventoryVcnSummary` objects. + + + :param inventory_vcn_collection: The inventory_vcn_collection of this IpInventoryCollection. + :type: list[oci.core.models.InventoryVcnSummary] + """ + self._inventory_vcn_collection = inventory_vcn_collection + + @property + def message(self): + """ + Gets the message of this IpInventoryCollection. + Indicates the status of the data. + + + :return: The message of this IpInventoryCollection. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this IpInventoryCollection. + Indicates the status of the data. + + + :param message: The message of this IpInventoryCollection. + :type: str + """ + self._message = message + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/ip_inventory_subnet_resource_collection.py b/src/oci/core/models/ip_inventory_subnet_resource_collection.py new file mode 100644 index 0000000000..75dd4ef929 --- /dev/null +++ b/src/oci/core/models/ip_inventory_subnet_resource_collection.py @@ -0,0 +1,202 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IpInventorySubnetResourceCollection(object): + """ + The results returned by a `ListIpInventorySubnet` operation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new IpInventorySubnetResourceCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param count: + The value to assign to the count property of this IpInventorySubnetResourceCollection. + :type count: int + + :param last_updated_timestamp: + The value to assign to the last_updated_timestamp property of this IpInventorySubnetResourceCollection. + :type last_updated_timestamp: datetime + + :param ip_inventory_subnet_resource_summary: + The value to assign to the ip_inventory_subnet_resource_summary property of this IpInventorySubnetResourceCollection. + :type ip_inventory_subnet_resource_summary: list[oci.core.models.IpInventorySubnetResourceSummary] + + :param message: + The value to assign to the message property of this IpInventorySubnetResourceCollection. + :type message: str + + :param compartment_id: + The value to assign to the compartment_id property of this IpInventorySubnetResourceCollection. + :type compartment_id: str + + """ + self.swagger_types = { + 'count': 'int', + 'last_updated_timestamp': 'datetime', + 'ip_inventory_subnet_resource_summary': 'list[IpInventorySubnetResourceSummary]', + 'message': 'str', + 'compartment_id': 'str' + } + + self.attribute_map = { + 'count': 'count', + 'last_updated_timestamp': 'lastUpdatedTimestamp', + 'ip_inventory_subnet_resource_summary': 'ipInventorySubnetResourceSummary', + 'message': 'message', + 'compartment_id': 'compartmentId' + } + + self._count = None + self._last_updated_timestamp = None + self._ip_inventory_subnet_resource_summary = None + self._message = None + self._compartment_id = None + + @property + def count(self): + """ + Gets the count of this IpInventorySubnetResourceCollection. + Specifies the count for the number of results for the response. + + + :return: The count of this IpInventorySubnetResourceCollection. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this IpInventorySubnetResourceCollection. + Specifies the count for the number of results for the response. + + + :param count: The count of this IpInventorySubnetResourceCollection. + :type: int + """ + self._count = count + + @property + def last_updated_timestamp(self): + """ + Gets the last_updated_timestamp of this IpInventorySubnetResourceCollection. + The Timestamp of the latest update from the database in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The last_updated_timestamp of this IpInventorySubnetResourceCollection. + :rtype: datetime + """ + return self._last_updated_timestamp + + @last_updated_timestamp.setter + def last_updated_timestamp(self, last_updated_timestamp): + """ + Sets the last_updated_timestamp of this IpInventorySubnetResourceCollection. + The Timestamp of the latest update from the database in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param last_updated_timestamp: The last_updated_timestamp of this IpInventorySubnetResourceCollection. + :type: datetime + """ + self._last_updated_timestamp = last_updated_timestamp + + @property + def ip_inventory_subnet_resource_summary(self): + """ + Gets the ip_inventory_subnet_resource_summary of this IpInventorySubnetResourceCollection. + Lists `SubnetResourceSummary` objects. + + + :return: The ip_inventory_subnet_resource_summary of this IpInventorySubnetResourceCollection. + :rtype: list[oci.core.models.IpInventorySubnetResourceSummary] + """ + return self._ip_inventory_subnet_resource_summary + + @ip_inventory_subnet_resource_summary.setter + def ip_inventory_subnet_resource_summary(self, ip_inventory_subnet_resource_summary): + """ + Sets the ip_inventory_subnet_resource_summary of this IpInventorySubnetResourceCollection. + Lists `SubnetResourceSummary` objects. + + + :param ip_inventory_subnet_resource_summary: The ip_inventory_subnet_resource_summary of this IpInventorySubnetResourceCollection. + :type: list[oci.core.models.IpInventorySubnetResourceSummary] + """ + self._ip_inventory_subnet_resource_summary = ip_inventory_subnet_resource_summary + + @property + def message(self): + """ + Gets the message of this IpInventorySubnetResourceCollection. + Indicates the status of the data. + + + :return: The message of this IpInventorySubnetResourceCollection. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this IpInventorySubnetResourceCollection. + Indicates the status of the data. + + + :param message: The message of this IpInventorySubnetResourceCollection. + :type: str + """ + self._message = message + + @property + def compartment_id(self): + """ + Gets the compartment_id of this IpInventorySubnetResourceCollection. + The compartment of the subnet. + + + :return: The compartment_id of this IpInventorySubnetResourceCollection. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this IpInventorySubnetResourceCollection. + The compartment of the subnet. + + + :param compartment_id: The compartment_id of this IpInventorySubnetResourceCollection. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/ip_inventory_subnet_resource_summary.py b/src/oci/core/models/ip_inventory_subnet_resource_summary.py new file mode 100644 index 0000000000..162bee40e3 --- /dev/null +++ b/src/oci/core/models/ip_inventory_subnet_resource_summary.py @@ -0,0 +1,477 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IpInventorySubnetResourceSummary(object): + """ + Provides the IP Inventory details of a subnet and its associated resources. + """ + + #: A constant which can be used with the ip_address_lifetime property of a IpInventorySubnetResourceSummary. + #: This constant has a value of "Ephemeral" + IP_ADDRESS_LIFETIME_EPHEMERAL = "Ephemeral" + + #: A constant which can be used with the ip_address_lifetime property of a IpInventorySubnetResourceSummary. + #: This constant has a value of "Reserved" + IP_ADDRESS_LIFETIME_RESERVED = "Reserved" + + #: A constant which can be used with the public_ip_lifetime property of a IpInventorySubnetResourceSummary. + #: This constant has a value of "Ephemeral" + PUBLIC_IP_LIFETIME_EPHEMERAL = "Ephemeral" + + #: A constant which can be used with the public_ip_lifetime property of a IpInventorySubnetResourceSummary. + #: This constant has a value of "Reserved" + PUBLIC_IP_LIFETIME_RESERVED = "Reserved" + + #: A constant which can be used with the associated_public_ip_pool property of a IpInventorySubnetResourceSummary. + #: This constant has a value of "ORACLE" + ASSOCIATED_PUBLIC_IP_POOL_ORACLE = "ORACLE" + + #: A constant which can be used with the associated_public_ip_pool property of a IpInventorySubnetResourceSummary. + #: This constant has a value of "BYOIP" + ASSOCIATED_PUBLIC_IP_POOL_BYOIP = "BYOIP" + + #: A constant which can be used with the assigned_resource_type property of a IpInventorySubnetResourceSummary. + #: This constant has a value of "Resource" + ASSIGNED_RESOURCE_TYPE_RESOURCE = "Resource" + + def __init__(self, **kwargs): + """ + Initializes a new IpInventorySubnetResourceSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param ip_id: + The value to assign to the ip_id property of this IpInventorySubnetResourceSummary. + :type ip_id: str + + :param ip_address: + The value to assign to the ip_address property of this IpInventorySubnetResourceSummary. + :type ip_address: str + + :param ip_address_lifetime: + The value to assign to the ip_address_lifetime property of this IpInventorySubnetResourceSummary. + Allowed values for this property are: "Ephemeral", "Reserved", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type ip_address_lifetime: str + + :param parent_cidr: + The value to assign to the parent_cidr property of this IpInventorySubnetResourceSummary. + :type parent_cidr: str + + :param associated_public_ip: + The value to assign to the associated_public_ip property of this IpInventorySubnetResourceSummary. + :type associated_public_ip: str + + :param public_ip_lifetime: + The value to assign to the public_ip_lifetime property of this IpInventorySubnetResourceSummary. + Allowed values for this property are: "Ephemeral", "Reserved", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type public_ip_lifetime: str + + :param associated_public_ip_pool: + The value to assign to the associated_public_ip_pool property of this IpInventorySubnetResourceSummary. + Allowed values for this property are: "ORACLE", "BYOIP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type associated_public_ip_pool: str + + :param dns_host_name: + The value to assign to the dns_host_name property of this IpInventorySubnetResourceSummary. + :type dns_host_name: str + + :param assigned_resource_name: + The value to assign to the assigned_resource_name property of this IpInventorySubnetResourceSummary. + :type assigned_resource_name: str + + :param assigned_resource_type: + The value to assign to the assigned_resource_type property of this IpInventorySubnetResourceSummary. + Allowed values for this property are: "Resource", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type assigned_resource_type: str + + :param address_type: + The value to assign to the address_type property of this IpInventorySubnetResourceSummary. + :type address_type: str + + :param assigned_time: + The value to assign to the assigned_time property of this IpInventorySubnetResourceSummary. + :type assigned_time: datetime + + """ + self.swagger_types = { + 'ip_id': 'str', + 'ip_address': 'str', + 'ip_address_lifetime': 'str', + 'parent_cidr': 'str', + 'associated_public_ip': 'str', + 'public_ip_lifetime': 'str', + 'associated_public_ip_pool': 'str', + 'dns_host_name': 'str', + 'assigned_resource_name': 'str', + 'assigned_resource_type': 'str', + 'address_type': 'str', + 'assigned_time': 'datetime' + } + + self.attribute_map = { + 'ip_id': 'ipId', + 'ip_address': 'ipAddress', + 'ip_address_lifetime': 'ipAddressLifetime', + 'parent_cidr': 'parentCidr', + 'associated_public_ip': 'associatedPublicIp', + 'public_ip_lifetime': 'publicIpLifetime', + 'associated_public_ip_pool': 'associatedPublicIpPool', + 'dns_host_name': 'dnsHostName', + 'assigned_resource_name': 'assignedResourceName', + 'assigned_resource_type': 'assignedResourceType', + 'address_type': 'addressType', + 'assigned_time': 'assignedTime' + } + + self._ip_id = None + self._ip_address = None + self._ip_address_lifetime = None + self._parent_cidr = None + self._associated_public_ip = None + self._public_ip_lifetime = None + self._associated_public_ip_pool = None + self._dns_host_name = None + self._assigned_resource_name = None + self._assigned_resource_type = None + self._address_type = None + self._assigned_time = None + + @property + def ip_id(self): + """ + Gets the ip_id of this IpInventorySubnetResourceSummary. + The `OCID`__ of the IP address. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The ip_id of this IpInventorySubnetResourceSummary. + :rtype: str + """ + return self._ip_id + + @ip_id.setter + def ip_id(self, ip_id): + """ + Sets the ip_id of this IpInventorySubnetResourceSummary. + The `OCID`__ of the IP address. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param ip_id: The ip_id of this IpInventorySubnetResourceSummary. + :type: str + """ + self._ip_id = ip_id + + @property + def ip_address(self): + """ + Gets the ip_address of this IpInventorySubnetResourceSummary. + Lists the allocated private IP address. + + + :return: The ip_address of this IpInventorySubnetResourceSummary. + :rtype: str + """ + return self._ip_address + + @ip_address.setter + def ip_address(self, ip_address): + """ + Sets the ip_address of this IpInventorySubnetResourceSummary. + Lists the allocated private IP address. + + + :param ip_address: The ip_address of this IpInventorySubnetResourceSummary. + :type: str + """ + self._ip_address = ip_address + + @property + def ip_address_lifetime(self): + """ + Gets the ip_address_lifetime of this IpInventorySubnetResourceSummary. + Lifetime of the allocated private IP address. + + Allowed values for this property are: "Ephemeral", "Reserved", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The ip_address_lifetime of this IpInventorySubnetResourceSummary. + :rtype: str + """ + return self._ip_address_lifetime + + @ip_address_lifetime.setter + def ip_address_lifetime(self, ip_address_lifetime): + """ + Sets the ip_address_lifetime of this IpInventorySubnetResourceSummary. + Lifetime of the allocated private IP address. + + + :param ip_address_lifetime: The ip_address_lifetime of this IpInventorySubnetResourceSummary. + :type: str + """ + allowed_values = ["Ephemeral", "Reserved"] + if not value_allowed_none_or_none_sentinel(ip_address_lifetime, allowed_values): + ip_address_lifetime = 'UNKNOWN_ENUM_VALUE' + self._ip_address_lifetime = ip_address_lifetime + + @property + def parent_cidr(self): + """ + Gets the parent_cidr of this IpInventorySubnetResourceSummary. + The address range the IP address is assigned from. + + + :return: The parent_cidr of this IpInventorySubnetResourceSummary. + :rtype: str + """ + return self._parent_cidr + + @parent_cidr.setter + def parent_cidr(self, parent_cidr): + """ + Sets the parent_cidr of this IpInventorySubnetResourceSummary. + The address range the IP address is assigned from. + + + :param parent_cidr: The parent_cidr of this IpInventorySubnetResourceSummary. + :type: str + """ + self._parent_cidr = parent_cidr + + @property + def associated_public_ip(self): + """ + Gets the associated_public_ip of this IpInventorySubnetResourceSummary. + Associated public IP address for the private IP address. + + + :return: The associated_public_ip of this IpInventorySubnetResourceSummary. + :rtype: str + """ + return self._associated_public_ip + + @associated_public_ip.setter + def associated_public_ip(self, associated_public_ip): + """ + Sets the associated_public_ip of this IpInventorySubnetResourceSummary. + Associated public IP address for the private IP address. + + + :param associated_public_ip: The associated_public_ip of this IpInventorySubnetResourceSummary. + :type: str + """ + self._associated_public_ip = associated_public_ip + + @property + def public_ip_lifetime(self): + """ + Gets the public_ip_lifetime of this IpInventorySubnetResourceSummary. + Lifetime of the assigned public IP address. + + Allowed values for this property are: "Ephemeral", "Reserved", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The public_ip_lifetime of this IpInventorySubnetResourceSummary. + :rtype: str + """ + return self._public_ip_lifetime + + @public_ip_lifetime.setter + def public_ip_lifetime(self, public_ip_lifetime): + """ + Sets the public_ip_lifetime of this IpInventorySubnetResourceSummary. + Lifetime of the assigned public IP address. + + + :param public_ip_lifetime: The public_ip_lifetime of this IpInventorySubnetResourceSummary. + :type: str + """ + allowed_values = ["Ephemeral", "Reserved"] + if not value_allowed_none_or_none_sentinel(public_ip_lifetime, allowed_values): + public_ip_lifetime = 'UNKNOWN_ENUM_VALUE' + self._public_ip_lifetime = public_ip_lifetime + + @property + def associated_public_ip_pool(self): + """ + Gets the associated_public_ip_pool of this IpInventorySubnetResourceSummary. + Public IP address Pool the IP address is allocated from. + + Allowed values for this property are: "ORACLE", "BYOIP", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The associated_public_ip_pool of this IpInventorySubnetResourceSummary. + :rtype: str + """ + return self._associated_public_ip_pool + + @associated_public_ip_pool.setter + def associated_public_ip_pool(self, associated_public_ip_pool): + """ + Sets the associated_public_ip_pool of this IpInventorySubnetResourceSummary. + Public IP address Pool the IP address is allocated from. + + + :param associated_public_ip_pool: The associated_public_ip_pool of this IpInventorySubnetResourceSummary. + :type: str + """ + allowed_values = ["ORACLE", "BYOIP"] + if not value_allowed_none_or_none_sentinel(associated_public_ip_pool, allowed_values): + associated_public_ip_pool = 'UNKNOWN_ENUM_VALUE' + self._associated_public_ip_pool = associated_public_ip_pool + + @property + def dns_host_name(self): + """ + Gets the dns_host_name of this IpInventorySubnetResourceSummary. + DNS hostname of the IP address. + + + :return: The dns_host_name of this IpInventorySubnetResourceSummary. + :rtype: str + """ + return self._dns_host_name + + @dns_host_name.setter + def dns_host_name(self, dns_host_name): + """ + Sets the dns_host_name of this IpInventorySubnetResourceSummary. + DNS hostname of the IP address. + + + :param dns_host_name: The dns_host_name of this IpInventorySubnetResourceSummary. + :type: str + """ + self._dns_host_name = dns_host_name + + @property + def assigned_resource_name(self): + """ + Gets the assigned_resource_name of this IpInventorySubnetResourceSummary. + Name of the created resource. + + + :return: The assigned_resource_name of this IpInventorySubnetResourceSummary. + :rtype: str + """ + return self._assigned_resource_name + + @assigned_resource_name.setter + def assigned_resource_name(self, assigned_resource_name): + """ + Sets the assigned_resource_name of this IpInventorySubnetResourceSummary. + Name of the created resource. + + + :param assigned_resource_name: The assigned_resource_name of this IpInventorySubnetResourceSummary. + :type: str + """ + self._assigned_resource_name = assigned_resource_name + + @property + def assigned_resource_type(self): + """ + Gets the assigned_resource_type of this IpInventorySubnetResourceSummary. + Type of the resource. + + Allowed values for this property are: "Resource", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The assigned_resource_type of this IpInventorySubnetResourceSummary. + :rtype: str + """ + return self._assigned_resource_type + + @assigned_resource_type.setter + def assigned_resource_type(self, assigned_resource_type): + """ + Sets the assigned_resource_type of this IpInventorySubnetResourceSummary. + Type of the resource. + + + :param assigned_resource_type: The assigned_resource_type of this IpInventorySubnetResourceSummary. + :type: str + """ + allowed_values = ["Resource"] + if not value_allowed_none_or_none_sentinel(assigned_resource_type, allowed_values): + assigned_resource_type = 'UNKNOWN_ENUM_VALUE' + self._assigned_resource_type = assigned_resource_type + + @property + def address_type(self): + """ + Gets the address_type of this IpInventorySubnetResourceSummary. + Address type of the allocated private IP address. + + + :return: The address_type of this IpInventorySubnetResourceSummary. + :rtype: str + """ + return self._address_type + + @address_type.setter + def address_type(self, address_type): + """ + Sets the address_type of this IpInventorySubnetResourceSummary. + Address type of the allocated private IP address. + + + :param address_type: The address_type of this IpInventorySubnetResourceSummary. + :type: str + """ + self._address_type = address_type + + @property + def assigned_time(self): + """ + Gets the assigned_time of this IpInventorySubnetResourceSummary. + Assigned time of the private IP address. + + + :return: The assigned_time of this IpInventorySubnetResourceSummary. + :rtype: datetime + """ + return self._assigned_time + + @assigned_time.setter + def assigned_time(self, assigned_time): + """ + Sets the assigned_time of this IpInventorySubnetResourceSummary. + Assigned time of the private IP address. + + + :param assigned_time: The assigned_time of this IpInventorySubnetResourceSummary. + :type: datetime + """ + self._assigned_time = assigned_time + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/ip_inventory_vcn_overlap_collection.py b/src/oci/core/models/ip_inventory_vcn_overlap_collection.py new file mode 100644 index 0000000000..782ea0c5d7 --- /dev/null +++ b/src/oci/core/models/ip_inventory_vcn_overlap_collection.py @@ -0,0 +1,171 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IpInventoryVcnOverlapCollection(object): + """ + The details of the overlapping VCNs and compartments. + """ + + def __init__(self, **kwargs): + """ + Initializes a new IpInventoryVcnOverlapCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param last_updated_timestamp: + The value to assign to the last_updated_timestamp property of this IpInventoryVcnOverlapCollection. + :type last_updated_timestamp: datetime + + :param ip_inventory_vcn_overlap_summary: + The value to assign to the ip_inventory_vcn_overlap_summary property of this IpInventoryVcnOverlapCollection. + :type ip_inventory_vcn_overlap_summary: list[oci.core.models.IpInventoryVcnOverlapSummary] + + :param message: + The value to assign to the message property of this IpInventoryVcnOverlapCollection. + :type message: str + + :param overlap_count: + The value to assign to the overlap_count property of this IpInventoryVcnOverlapCollection. + :type overlap_count: int + + """ + self.swagger_types = { + 'last_updated_timestamp': 'datetime', + 'ip_inventory_vcn_overlap_summary': 'list[IpInventoryVcnOverlapSummary]', + 'message': 'str', + 'overlap_count': 'int' + } + + self.attribute_map = { + 'last_updated_timestamp': 'lastUpdatedTimestamp', + 'ip_inventory_vcn_overlap_summary': 'ipInventoryVcnOverlapSummary', + 'message': 'message', + 'overlap_count': 'overlapCount' + } + + self._last_updated_timestamp = None + self._ip_inventory_vcn_overlap_summary = None + self._message = None + self._overlap_count = None + + @property + def last_updated_timestamp(self): + """ + Gets the last_updated_timestamp of this IpInventoryVcnOverlapCollection. + The timestamp of the latest update from the database in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The last_updated_timestamp of this IpInventoryVcnOverlapCollection. + :rtype: datetime + """ + return self._last_updated_timestamp + + @last_updated_timestamp.setter + def last_updated_timestamp(self, last_updated_timestamp): + """ + Sets the last_updated_timestamp of this IpInventoryVcnOverlapCollection. + The timestamp of the latest update from the database in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param last_updated_timestamp: The last_updated_timestamp of this IpInventoryVcnOverlapCollection. + :type: datetime + """ + self._last_updated_timestamp = last_updated_timestamp + + @property + def ip_inventory_vcn_overlap_summary(self): + """ + Gets the ip_inventory_vcn_overlap_summary of this IpInventoryVcnOverlapCollection. + Lists `IpInventoryVcnOverlapSummary` object. + + + :return: The ip_inventory_vcn_overlap_summary of this IpInventoryVcnOverlapCollection. + :rtype: list[oci.core.models.IpInventoryVcnOverlapSummary] + """ + return self._ip_inventory_vcn_overlap_summary + + @ip_inventory_vcn_overlap_summary.setter + def ip_inventory_vcn_overlap_summary(self, ip_inventory_vcn_overlap_summary): + """ + Sets the ip_inventory_vcn_overlap_summary of this IpInventoryVcnOverlapCollection. + Lists `IpInventoryVcnOverlapSummary` object. + + + :param ip_inventory_vcn_overlap_summary: The ip_inventory_vcn_overlap_summary of this IpInventoryVcnOverlapCollection. + :type: list[oci.core.models.IpInventoryVcnOverlapSummary] + """ + self._ip_inventory_vcn_overlap_summary = ip_inventory_vcn_overlap_summary + + @property + def message(self): + """ + Gets the message of this IpInventoryVcnOverlapCollection. + Indicates the status of the data. + + + :return: The message of this IpInventoryVcnOverlapCollection. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this IpInventoryVcnOverlapCollection. + Indicates the status of the data. + + + :param message: The message of this IpInventoryVcnOverlapCollection. + :type: str + """ + self._message = message + + @property + def overlap_count(self): + """ + Gets the overlap_count of this IpInventoryVcnOverlapCollection. + The overlap count for the given VCN and compartments. + + + :return: The overlap_count of this IpInventoryVcnOverlapCollection. + :rtype: int + """ + return self._overlap_count + + @overlap_count.setter + def overlap_count(self, overlap_count): + """ + Sets the overlap_count of this IpInventoryVcnOverlapCollection. + The overlap count for the given VCN and compartments. + + + :param overlap_count: The overlap_count of this IpInventoryVcnOverlapCollection. + :type: int + """ + self._overlap_count = overlap_count + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/ip_inventory_vcn_overlap_summary.py b/src/oci/core/models/ip_inventory_vcn_overlap_summary.py new file mode 100644 index 0000000000..1b3fef6846 --- /dev/null +++ b/src/oci/core/models/ip_inventory_vcn_overlap_summary.py @@ -0,0 +1,169 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IpInventoryVcnOverlapSummary(object): + """ + Provides the VCN overlap details. + """ + + def __init__(self, **kwargs): + """ + Initializes a new IpInventoryVcnOverlapSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param overlapping_vcn_id: + The value to assign to the overlapping_vcn_id property of this IpInventoryVcnOverlapSummary. + :type overlapping_vcn_id: str + + :param overlapping_vcn_name: + The value to assign to the overlapping_vcn_name property of this IpInventoryVcnOverlapSummary. + :type overlapping_vcn_name: str + + :param overlapping_cidr: + The value to assign to the overlapping_cidr property of this IpInventoryVcnOverlapSummary. + :type overlapping_cidr: str + + :param cidr: + The value to assign to the cidr property of this IpInventoryVcnOverlapSummary. + :type cidr: str + + """ + self.swagger_types = { + 'overlapping_vcn_id': 'str', + 'overlapping_vcn_name': 'str', + 'overlapping_cidr': 'str', + 'cidr': 'str' + } + + self.attribute_map = { + 'overlapping_vcn_id': 'overlappingVcnId', + 'overlapping_vcn_name': 'overlappingVcnName', + 'overlapping_cidr': 'overlappingCidr', + 'cidr': 'cidr' + } + + self._overlapping_vcn_id = None + self._overlapping_vcn_name = None + self._overlapping_cidr = None + self._cidr = None + + @property + def overlapping_vcn_id(self): + """ + Gets the overlapping_vcn_id of this IpInventoryVcnOverlapSummary. + The `OCID`__ of the VCN . + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The overlapping_vcn_id of this IpInventoryVcnOverlapSummary. + :rtype: str + """ + return self._overlapping_vcn_id + + @overlapping_vcn_id.setter + def overlapping_vcn_id(self, overlapping_vcn_id): + """ + Sets the overlapping_vcn_id of this IpInventoryVcnOverlapSummary. + The `OCID`__ of the VCN . + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param overlapping_vcn_id: The overlapping_vcn_id of this IpInventoryVcnOverlapSummary. + :type: str + """ + self._overlapping_vcn_id = overlapping_vcn_id + + @property + def overlapping_vcn_name(self): + """ + Gets the overlapping_vcn_name of this IpInventoryVcnOverlapSummary. + Name of the overlapping VCN. + + + :return: The overlapping_vcn_name of this IpInventoryVcnOverlapSummary. + :rtype: str + """ + return self._overlapping_vcn_name + + @overlapping_vcn_name.setter + def overlapping_vcn_name(self, overlapping_vcn_name): + """ + Sets the overlapping_vcn_name of this IpInventoryVcnOverlapSummary. + Name of the overlapping VCN. + + + :param overlapping_vcn_name: The overlapping_vcn_name of this IpInventoryVcnOverlapSummary. + :type: str + """ + self._overlapping_vcn_name = overlapping_vcn_name + + @property + def overlapping_cidr(self): + """ + Gets the overlapping_cidr of this IpInventoryVcnOverlapSummary. + The overlapping CIDR prefix. + + + :return: The overlapping_cidr of this IpInventoryVcnOverlapSummary. + :rtype: str + """ + return self._overlapping_cidr + + @overlapping_cidr.setter + def overlapping_cidr(self, overlapping_cidr): + """ + Sets the overlapping_cidr of this IpInventoryVcnOverlapSummary. + The overlapping CIDR prefix. + + + :param overlapping_cidr: The overlapping_cidr of this IpInventoryVcnOverlapSummary. + :type: str + """ + self._overlapping_cidr = overlapping_cidr + + @property + def cidr(self): + """ + Gets the cidr of this IpInventoryVcnOverlapSummary. + CIDR prefix of the VCN. + + + :return: The cidr of this IpInventoryVcnOverlapSummary. + :rtype: str + """ + return self._cidr + + @cidr.setter + def cidr(self, cidr): + """ + Sets the cidr of this IpInventoryVcnOverlapSummary. + CIDR prefix of the VCN. + + + :param cidr: The cidr of this IpInventoryVcnOverlapSummary. + :type: str + """ + self._cidr = cidr + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/ipam.py b/src/oci/core/models/ipam.py new file mode 100644 index 0000000000..88d93ec61a --- /dev/null +++ b/src/oci/core/models/ipam.py @@ -0,0 +1,73 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Ipam(object): + """ + An IPAM refers to a group of VCNs, subnets, IP resources + and its related properties. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Ipam object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param placeholder: + The value to assign to the placeholder property of this Ipam. + :type placeholder: str + + """ + self.swagger_types = { + 'placeholder': 'str' + } + + self.attribute_map = { + 'placeholder': 'placeholder' + } + + self._placeholder = None + + @property + def placeholder(self): + """ + Gets the placeholder of this Ipam. + Placeholder for description + + + :return: The placeholder of this Ipam. + :rtype: str + """ + return self._placeholder + + @placeholder.setter + def placeholder(self, placeholder): + """ + Sets the placeholder of this Ipam. + Placeholder for description + + + :param placeholder: The placeholder of this Ipam. + :type: str + """ + self._placeholder = placeholder + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/list_ip_inventory_details.py b/src/oci/core/models/list_ip_inventory_details.py new file mode 100644 index 0000000000..77b59b6ef6 --- /dev/null +++ b/src/oci/core/models/list_ip_inventory_details.py @@ -0,0 +1,494 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ListIpInventoryDetails(object): + """ + Required input parameters for retrieving IP Inventory data within the specified compartments of a region. + """ + + #: A constant which can be used with the resource_type_list property of a ListIpInventoryDetails. + #: This constant has a value of "Resource" + RESOURCE_TYPE_LIST_RESOURCE = "Resource" + + #: A constant which can be used with the sort_by property of a ListIpInventoryDetails. + #: This constant has a value of "DISPLAYNAME" + SORT_BY_DISPLAYNAME = "DISPLAYNAME" + + #: A constant which can be used with the sort_by property of a ListIpInventoryDetails. + #: This constant has a value of "UTILIZATION" + SORT_BY_UTILIZATION = "UTILIZATION" + + #: A constant which can be used with the sort_by property of a ListIpInventoryDetails. + #: This constant has a value of "DNS_HOSTNAME" + SORT_BY_DNS_HOSTNAME = "DNS_HOSTNAME" + + #: A constant which can be used with the sort_by property of a ListIpInventoryDetails. + #: This constant has a value of "REGION" + SORT_BY_REGION = "REGION" + + #: A constant which can be used with the sort_order property of a ListIpInventoryDetails. + #: This constant has a value of "ASC" + SORT_ORDER_ASC = "ASC" + + #: A constant which can be used with the sort_order property of a ListIpInventoryDetails. + #: This constant has a value of "DESC" + SORT_ORDER_DESC = "DESC" + + def __init__(self, **kwargs): + """ + Initializes a new ListIpInventoryDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param region_list: + The value to assign to the region_list property of this ListIpInventoryDetails. + :type region_list: list[str] + + :param compartment_list: + The value to assign to the compartment_list property of this ListIpInventoryDetails. + :type compartment_list: list[str] + + :param override_filters: + The value to assign to the override_filters property of this ListIpInventoryDetails. + :type override_filters: bool + + :param utilization: + The value to assign to the utilization property of this ListIpInventoryDetails. + :type utilization: float + + :param overlapping_vcns_only: + The value to assign to the overlapping_vcns_only property of this ListIpInventoryDetails. + :type overlapping_vcns_only: bool + + :param address_type_list: + The value to assign to the address_type_list property of this ListIpInventoryDetails. + :type address_type_list: list[oci.core.models.AddressType] + + :param resource_type_list: + The value to assign to the resource_type_list property of this ListIpInventoryDetails. + Allowed values for items in this list are: "Resource" + :type resource_type_list: list[str] + + :param search_keyword: + The value to assign to the search_keyword property of this ListIpInventoryDetails. + :type search_keyword: str + + :param sort_by: + The value to assign to the sort_by property of this ListIpInventoryDetails. + Allowed values for this property are: "DISPLAYNAME", "UTILIZATION", "DNS_HOSTNAME", "REGION" + :type sort_by: str + + :param sort_order: + The value to assign to the sort_order property of this ListIpInventoryDetails. + Allowed values for this property are: "ASC", "DESC" + :type sort_order: str + + :param pagination_offset: + The value to assign to the pagination_offset property of this ListIpInventoryDetails. + :type pagination_offset: int + + :param pagination_limit: + The value to assign to the pagination_limit property of this ListIpInventoryDetails. + :type pagination_limit: int + + """ + self.swagger_types = { + 'region_list': 'list[str]', + 'compartment_list': 'list[str]', + 'override_filters': 'bool', + 'utilization': 'float', + 'overlapping_vcns_only': 'bool', + 'address_type_list': 'list[AddressType]', + 'resource_type_list': 'list[str]', + 'search_keyword': 'str', + 'sort_by': 'str', + 'sort_order': 'str', + 'pagination_offset': 'int', + 'pagination_limit': 'int' + } + + self.attribute_map = { + 'region_list': 'regionList', + 'compartment_list': 'compartmentList', + 'override_filters': 'overrideFilters', + 'utilization': 'utilization', + 'overlapping_vcns_only': 'overlappingVcnsOnly', + 'address_type_list': 'addressTypeList', + 'resource_type_list': 'resourceTypeList', + 'search_keyword': 'searchKeyword', + 'sort_by': 'sortBy', + 'sort_order': 'sortOrder', + 'pagination_offset': 'paginationOffset', + 'pagination_limit': 'paginationLimit' + } + + self._region_list = None + self._compartment_list = None + self._override_filters = None + self._utilization = None + self._overlapping_vcns_only = None + self._address_type_list = None + self._resource_type_list = None + self._search_keyword = None + self._sort_by = None + self._sort_order = None + self._pagination_offset = None + self._pagination_limit = None + + @property + def region_list(self): + """ + **[Required]** Gets the region_list of this ListIpInventoryDetails. + Lists the selected regions. + + + :return: The region_list of this ListIpInventoryDetails. + :rtype: list[str] + """ + return self._region_list + + @region_list.setter + def region_list(self, region_list): + """ + Sets the region_list of this ListIpInventoryDetails. + Lists the selected regions. + + + :param region_list: The region_list of this ListIpInventoryDetails. + :type: list[str] + """ + self._region_list = region_list + + @property + def compartment_list(self): + """ + **[Required]** Gets the compartment_list of this ListIpInventoryDetails. + List the `OCID`__ of the compartments. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_list of this ListIpInventoryDetails. + :rtype: list[str] + """ + return self._compartment_list + + @compartment_list.setter + def compartment_list(self, compartment_list): + """ + Sets the compartment_list of this ListIpInventoryDetails. + List the `OCID`__ of the compartments. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_list: The compartment_list of this ListIpInventoryDetails. + :type: list[str] + """ + self._compartment_list = compartment_list + + @property + def override_filters(self): + """ + Gets the override_filters of this ListIpInventoryDetails. + List of selected filters. + + + :return: The override_filters of this ListIpInventoryDetails. + :rtype: bool + """ + return self._override_filters + + @override_filters.setter + def override_filters(self, override_filters): + """ + Sets the override_filters of this ListIpInventoryDetails. + List of selected filters. + + + :param override_filters: The override_filters of this ListIpInventoryDetails. + :type: bool + """ + self._override_filters = override_filters + + @property + def utilization(self): + """ + Gets the utilization of this ListIpInventoryDetails. + The CIDR utilization of a VCN. + + + :return: The utilization of this ListIpInventoryDetails. + :rtype: float + """ + return self._utilization + + @utilization.setter + def utilization(self, utilization): + """ + Sets the utilization of this ListIpInventoryDetails. + The CIDR utilization of a VCN. + + + :param utilization: The utilization of this ListIpInventoryDetails. + :type: float + """ + self._utilization = utilization + + @property + def overlapping_vcns_only(self): + """ + Gets the overlapping_vcns_only of this ListIpInventoryDetails. + List of overlapping VCNs. + + + :return: The overlapping_vcns_only of this ListIpInventoryDetails. + :rtype: bool + """ + return self._overlapping_vcns_only + + @overlapping_vcns_only.setter + def overlapping_vcns_only(self, overlapping_vcns_only): + """ + Sets the overlapping_vcns_only of this ListIpInventoryDetails. + List of overlapping VCNs. + + + :param overlapping_vcns_only: The overlapping_vcns_only of this ListIpInventoryDetails. + :type: bool + """ + self._overlapping_vcns_only = overlapping_vcns_only + + @property + def address_type_list(self): + """ + Gets the address_type_list of this ListIpInventoryDetails. + List of IP address types used. + + + :return: The address_type_list of this ListIpInventoryDetails. + :rtype: list[oci.core.models.AddressType] + """ + return self._address_type_list + + @address_type_list.setter + def address_type_list(self, address_type_list): + """ + Sets the address_type_list of this ListIpInventoryDetails. + List of IP address types used. + + + :param address_type_list: The address_type_list of this ListIpInventoryDetails. + :type: list[oci.core.models.AddressType] + """ + self._address_type_list = address_type_list + + @property + def resource_type_list(self): + """ + Gets the resource_type_list of this ListIpInventoryDetails. + List of VCN resource types. + + Allowed values for items in this list are: "Resource" + + + :return: The resource_type_list of this ListIpInventoryDetails. + :rtype: list[str] + """ + return self._resource_type_list + + @resource_type_list.setter + def resource_type_list(self, resource_type_list): + """ + Sets the resource_type_list of this ListIpInventoryDetails. + List of VCN resource types. + + + :param resource_type_list: The resource_type_list of this ListIpInventoryDetails. + :type: list[str] + """ + allowed_values = ["Resource"] + + if resource_type_list and resource_type_list is not NONE_SENTINEL: + for value in resource_type_list: + if not value_allowed_none_or_none_sentinel(value, allowed_values): + raise ValueError( + f"Invalid value for `resource_type_list`, must be None or one of {allowed_values}" + ) + self._resource_type_list = resource_type_list + + @property + def search_keyword(self): + """ + Gets the search_keyword of this ListIpInventoryDetails. + Filters the results for the specified string. + + + :return: The search_keyword of this ListIpInventoryDetails. + :rtype: str + """ + return self._search_keyword + + @search_keyword.setter + def search_keyword(self, search_keyword): + """ + Sets the search_keyword of this ListIpInventoryDetails. + Filters the results for the specified string. + + + :param search_keyword: The search_keyword of this ListIpInventoryDetails. + :type: str + """ + self._search_keyword = search_keyword + + @property + def sort_by(self): + """ + Gets the sort_by of this ListIpInventoryDetails. + Provide the sort order (`sortOrder`) to sort the fields such as TIMECREATED in descending or descending order, and DISPLAYNAME in case sensitive. + + **Note:** For some \"List\" operations (for example, `ListInstances`), sort resources by an availability domain when the resources belong to a single availability domain. + If you sort the \"List\" operations without specifying + an availability domain, the resources are grouped by availability domains and then sorted. + + Allowed values for this property are: "DISPLAYNAME", "UTILIZATION", "DNS_HOSTNAME", "REGION" + + + :return: The sort_by of this ListIpInventoryDetails. + :rtype: str + """ + return self._sort_by + + @sort_by.setter + def sort_by(self, sort_by): + """ + Sets the sort_by of this ListIpInventoryDetails. + Provide the sort order (`sortOrder`) to sort the fields such as TIMECREATED in descending or descending order, and DISPLAYNAME in case sensitive. + + **Note:** For some \"List\" operations (for example, `ListInstances`), sort resources by an availability domain when the resources belong to a single availability domain. + If you sort the \"List\" operations without specifying + an availability domain, the resources are grouped by availability domains and then sorted. + + + :param sort_by: The sort_by of this ListIpInventoryDetails. + :type: str + """ + allowed_values = ["DISPLAYNAME", "UTILIZATION", "DNS_HOSTNAME", "REGION"] + if not value_allowed_none_or_none_sentinel(sort_by, allowed_values): + raise ValueError( + f"Invalid value for `sort_by`, must be None or one of {allowed_values}" + ) + self._sort_by = sort_by + + @property + def sort_order(self): + """ + Gets the sort_order of this ListIpInventoryDetails. + Specifies the sort order to use. Select either ascending (`ASC`) or descending (`DESC`) order. The DISPLAYNAME sort order + is case sensitive. + + Allowed values for this property are: "ASC", "DESC" + + + :return: The sort_order of this ListIpInventoryDetails. + :rtype: str + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order): + """ + Sets the sort_order of this ListIpInventoryDetails. + Specifies the sort order to use. Select either ascending (`ASC`) or descending (`DESC`) order. The DISPLAYNAME sort order + is case sensitive. + + + :param sort_order: The sort_order of this ListIpInventoryDetails. + :type: str + """ + allowed_values = ["ASC", "DESC"] + if not value_allowed_none_or_none_sentinel(sort_order, allowed_values): + raise ValueError( + f"Invalid value for `sort_order`, must be None or one of {allowed_values}" + ) + self._sort_order = sort_order + + @property + def pagination_offset(self): + """ + Gets the pagination_offset of this ListIpInventoryDetails. + Most List operations paginate results. Results are paginated for the ListInstances operations. When you call a paginated List operation, the response indicates more pages of results by including the opc-next-page header. + For more information, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + + :return: The pagination_offset of this ListIpInventoryDetails. + :rtype: int + """ + return self._pagination_offset + + @pagination_offset.setter + def pagination_offset(self, pagination_offset): + """ + Sets the pagination_offset of this ListIpInventoryDetails. + Most List operations paginate results. Results are paginated for the ListInstances operations. When you call a paginated List operation, the response indicates more pages of results by including the opc-next-page header. + For more information, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + + :param pagination_offset: The pagination_offset of this ListIpInventoryDetails. + :type: int + """ + self._pagination_offset = pagination_offset + + @property + def pagination_limit(self): + """ + Gets the pagination_limit of this ListIpInventoryDetails. + Specifies the maximum number of results displayed per page for a paginated \"List\" call. For more information, see `List Pagination`__. + Example: `50` + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + + :return: The pagination_limit of this ListIpInventoryDetails. + :rtype: int + """ + return self._pagination_limit + + @pagination_limit.setter + def pagination_limit(self, pagination_limit): + """ + Sets the pagination_limit of this ListIpInventoryDetails. + Specifies the maximum number of results displayed per page for a paginated \"List\" call. For more information, see `List Pagination`__. + Example: `50` + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + + :param pagination_limit: The pagination_limit of this ListIpInventoryDetails. + :type: int + """ + self._pagination_limit = pagination_limit + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/virtual_network_client.py b/src/oci/core/virtual_network_client.py index 1da0949be8..6d5ded5fd7 100644 --- a/src/oci/core/virtual_network_client.py +++ b/src/oci/core/virtual_network_client.py @@ -13883,6 +13883,103 @@ def get_remote_peering_connection(self, remote_peering_connection_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def get_resource_ip_inventory(self, data_request_id, **kwargs): + """ + Gets the `IpInventory` resource. + + + :param str data_request_id: (required) + Specify the ID of the resource. + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.IpInventoryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_resource_ip_inventory API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['dataRequestId'] + resource_path = "/ipinventory/DataRequestId/{dataRequestId}" + method = "GET" + operation_name = "get_resource_ip_inventory" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IpInventoryCollection/GetResourceIpInventory" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_resource_ip_inventory got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "dataRequestId": data_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="IpInventoryCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="IpInventoryCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def get_route_table(self, rt_id, **kwargs): """ Gets the specified route table's information. @@ -14323,6 +14420,208 @@ def get_subnet(self, subnet_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def get_subnet_cidr_utilization(self, subnet_id, **kwargs): + """ + Gets the CIDR utilization data of the specified subnet. Specify the `OCID`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param str subnet_id: (required) + Specify the `OCID`__ of the subnet. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.IpInventoryCidrUtilizationCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_subnet_cidr_utilization API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['subnetId'] + resource_path = "/ipInventory/subnets/{subnetId}/cidrs" + method = "GET" + operation_name = "get_subnet_cidr_utilization" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IpInventoryCidrUtilizationCollection/GetSubnetCidrUtilization" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_subnet_cidr_utilization got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "subnetId": subnet_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="IpInventoryCidrUtilizationCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="IpInventoryCidrUtilizationCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_subnet_ip_inventory(self, subnet_id, **kwargs): + """ + Gets the IP Inventory data of the specified subnet. Specify the `OCID`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param str subnet_id: (required) + Specify the `OCID`__ of the subnet. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.IpInventorySubnetResourceCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_subnet_ip_inventory API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['subnetId'] + resource_path = "/ipInventory/subnets/{subnetId}" + method = "GET" + operation_name = "get_subnet_ip_inventory" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IpInventorySubnetResourceCollection/GetSubnetIpInventory" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_subnet_ip_inventory got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "subnetId": subnet_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="IpInventorySubnetResourceCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="IpInventorySubnetResourceCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def get_subnet_topology(self, compartment_id, subnet_id, **kwargs): """ Gets a topology for a given subnet. @@ -14987,6 +15286,122 @@ def get_vcn_dns_resolver_association(self, vcn_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def get_vcn_overlap(self, vcn_id, get_vcn_overlap_details, **kwargs): + """ + Gets the CIDR overlap information of the specified VCN in selected compartments. Specify the `OCID`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param str vcn_id: (required) + Specify the `OCID`__ of the VCN. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.core.models.GetIpInventoryVcnOverlapDetails get_vcn_overlap_details: (required) + Lists details of the IP Inventory VCN overlap data. + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations (for example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + may be rejected). + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.IpInventoryVcnOverlapCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_vcn_overlap API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['vcnId'] + resource_path = "/ipInventory/vcns/{vcnId}/overlaps" + method = "POST" + operation_name = "get_vcn_overlap" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IpInventoryVcnOverlapCollection/GetVcnOverlap" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_vcn_overlap got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "vcnId": vcn_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=get_vcn_overlap_details, + response_type="IpInventoryVcnOverlapCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=get_vcn_overlap_details, + response_type="IpInventoryVcnOverlapCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def get_vcn_topology(self, compartment_id, vcn_id, **kwargs): """ Gets a virtual network topology for a given VCN. @@ -18476,6 +18891,93 @@ def list_internet_gateways(self, compartment_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def list_ip_inventory(self, list_ip_inventory_details, **kwargs): + """ + Lists the IP Inventory information in the selected compartments. + + + :param oci.core.models.ListIpInventoryDetails list_ip_inventory_details: (required) + Details required to list the IP Inventory data. + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.IpInventoryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_ip_inventory API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/ipInventory" + method = "POST" + operation_name = "list_ip_inventory" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/ListIpInventory" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"list_ip_inventory got unknown kwargs: {extra_kwargs!r}") + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=list_ip_inventory_details, + response_type="IpInventoryCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=list_ip_inventory_details, + response_type="IpInventoryCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def list_ip_sec_connection_tunnel_routes(self, ipsc_id, tunnel_id, **kwargs): """ The routes advertised to the on-premises network and the routes received from the on-premises network. diff --git a/src/oci/core/virtual_network_client_composite_operations.py b/src/oci/core/virtual_network_client_composite_operations.py index 886ccbfab5..0758f7ab1d 100644 --- a/src/oci/core/virtual_network_client_composite_operations.py +++ b/src/oci/core/virtual_network_client_composite_operations.py @@ -3168,6 +3168,83 @@ def detach_service_id_and_wait_for_state(self, service_gateway_id, detach_servic except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def get_vcn_overlap_and_wait_for_work_request(self, vcn_id, get_vcn_overlap_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.VirtualNetworkClient.get_vcn_overlap` and waits for the oci.work_requests.models.WorkRequest + to enter the given state(s). + + :param str vcn_id: (required) + Specify the `OCID`__ of the VCN. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.core.models.GetIpInventoryVcnOverlapDetails get_vcn_overlap_details: (required) + Lists details of the IP Inventory VCN overlap data. + + :param list[str] work_request_states: (optional) + An array of work requests states to wait on. These should be valid values for :py:attr:`~oci.work_requests.models.WorkRequest.status` + Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED] + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.VirtualNetworkClient.get_vcn_overlap` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.get_vcn_overlap(vcn_id, get_vcn_overlap_details, **operation_kwargs) + work_request_states = work_request_states if work_request_states else oci.waiter._WORK_REQUEST_TERMINATION_STATES + lowered_work_request_states = [w.lower() for w in work_request_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + work_request_id = operation_result.headers['opc-work-request-id'] + try: + waiter_result = oci.wait_until( + self._work_request_client, + self._work_request_client.get_work_request(work_request_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_work_request_states, + **waiter_kwargs + ) + return waiter_result + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def list_ip_inventory_and_wait_for_work_request(self, list_ip_inventory_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.VirtualNetworkClient.list_ip_inventory` and waits for the oci.work_requests.models.WorkRequest + to enter the given state(s). + + :param oci.core.models.ListIpInventoryDetails list_ip_inventory_details: (required) + Details required to list the IP Inventory data. + + :param list[str] work_request_states: (optional) + An array of work requests states to wait on. These should be valid values for :py:attr:`~oci.work_requests.models.WorkRequest.status` + Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED] + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.VirtualNetworkClient.list_ip_inventory` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.list_ip_inventory(list_ip_inventory_details, **operation_kwargs) + work_request_states = work_request_states if work_request_states else oci.waiter._WORK_REQUEST_TERMINATION_STATES + lowered_work_request_states = [w.lower() for w in work_request_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + work_request_id = operation_result.headers['opc-work-request-id'] + try: + waiter_result = oci.wait_until( + self._work_request_client, + self._work_request_client.get_work_request(work_request_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_work_request_states, + **waiter_kwargs + ) + return waiter_result + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def modify_vcn_cidr_and_wait_for_work_request(self, vcn_id, modify_vcn_cidr_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.core.VirtualNetworkClient.modify_vcn_cidr` and waits for the oci.work_requests.models.WorkRequest diff --git a/src/oci/database/models/__init__.py b/src/oci/database/models/__init__.py index 4b84aece86..64c1ed60ab 100644 --- a/src/oci/database/models/__init__.py +++ b/src/oci/database/models/__init__.py @@ -207,6 +207,7 @@ from .db_system_upgrade_history_entry import DbSystemUpgradeHistoryEntry from .db_system_upgrade_history_entry_summary import DbSystemUpgradeHistoryEntrySummary from .db_version_summary import DbVersionSummary +from .defined_file_system_configuration import DefinedFileSystemConfiguration from .deregister_autonomous_database_data_safe_details import DeregisterAutonomousDatabaseDataSafeDetails from .disaster_recovery_configuration import DisasterRecoveryConfiguration from .disk_performance_details import DiskPerformanceDetails @@ -247,6 +248,7 @@ from .external_pluggable_database import ExternalPluggableDatabase from .external_pluggable_database_summary import ExternalPluggableDatabaseSummary from .failover_data_guard_association_details import FailoverDataGuardAssociationDetails +from .file_system_configuration_detail import FileSystemConfigurationDetail from .flex_component_collection import FlexComponentCollection from .flex_component_summary import FlexComponentSummary from .generate_autonomous_database_wallet_details import GenerateAutonomousDatabaseWalletDetails @@ -582,6 +584,7 @@ "DbSystemUpgradeHistoryEntry": DbSystemUpgradeHistoryEntry, "DbSystemUpgradeHistoryEntrySummary": DbSystemUpgradeHistoryEntrySummary, "DbVersionSummary": DbVersionSummary, + "DefinedFileSystemConfiguration": DefinedFileSystemConfiguration, "DeregisterAutonomousDatabaseDataSafeDetails": DeregisterAutonomousDatabaseDataSafeDetails, "DisasterRecoveryConfiguration": DisasterRecoveryConfiguration, "DiskPerformanceDetails": DiskPerformanceDetails, @@ -622,6 +625,7 @@ "ExternalPluggableDatabase": ExternalPluggableDatabase, "ExternalPluggableDatabaseSummary": ExternalPluggableDatabaseSummary, "FailoverDataGuardAssociationDetails": FailoverDataGuardAssociationDetails, + "FileSystemConfigurationDetail": FileSystemConfigurationDetail, "FlexComponentCollection": FlexComponentCollection, "FlexComponentSummary": FlexComponentSummary, "GenerateAutonomousDatabaseWalletDetails": GenerateAutonomousDatabaseWalletDetails, diff --git a/src/oci/database/models/cloud_exadata_infrastructure.py b/src/oci/database/models/cloud_exadata_infrastructure.py index bc0f31117b..106ccb5c1a 100644 --- a/src/oci/database/models/cloud_exadata_infrastructure.py +++ b/src/oci/database/models/cloud_exadata_infrastructure.py @@ -186,6 +186,10 @@ def __init__(self, **kwargs): The value to assign to the monthly_db_server_version property of this CloudExadataInfrastructure. :type monthly_db_server_version: str + :param defined_file_system_configurations: + The value to assign to the defined_file_system_configurations property of this CloudExadataInfrastructure. + :type defined_file_system_configurations: list[oci.database.models.DefinedFileSystemConfiguration] + """ self.swagger_types = { 'id': 'str', @@ -221,7 +225,8 @@ def __init__(self, **kwargs): 'storage_server_version': 'str', 'db_server_version': 'str', 'monthly_storage_server_version': 'str', - 'monthly_db_server_version': 'str' + 'monthly_db_server_version': 'str', + 'defined_file_system_configurations': 'list[DefinedFileSystemConfiguration]' } self.attribute_map = { @@ -258,7 +263,8 @@ def __init__(self, **kwargs): 'storage_server_version': 'storageServerVersion', 'db_server_version': 'dbServerVersion', 'monthly_storage_server_version': 'monthlyStorageServerVersion', - 'monthly_db_server_version': 'monthlyDbServerVersion' + 'monthly_db_server_version': 'monthlyDbServerVersion', + 'defined_file_system_configurations': 'definedFileSystemConfigurations' } self._id = None @@ -295,6 +301,7 @@ def __init__(self, **kwargs): self._db_server_version = None self._monthly_storage_server_version = None self._monthly_db_server_version = None + self._defined_file_system_configurations = None @property def id(self): @@ -1168,6 +1175,30 @@ def monthly_db_server_version(self, monthly_db_server_version): """ self._monthly_db_server_version = monthly_db_server_version + @property + def defined_file_system_configurations(self): + """ + Gets the defined_file_system_configurations of this CloudExadataInfrastructure. + Details of the file system configuration of the Exadata infrastructure. + + + :return: The defined_file_system_configurations of this CloudExadataInfrastructure. + :rtype: list[oci.database.models.DefinedFileSystemConfiguration] + """ + return self._defined_file_system_configurations + + @defined_file_system_configurations.setter + def defined_file_system_configurations(self, defined_file_system_configurations): + """ + Sets the defined_file_system_configurations of this CloudExadataInfrastructure. + Details of the file system configuration of the Exadata infrastructure. + + + :param defined_file_system_configurations: The defined_file_system_configurations of this CloudExadataInfrastructure. + :type: list[oci.database.models.DefinedFileSystemConfiguration] + """ + self._defined_file_system_configurations = defined_file_system_configurations + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/database/models/cloud_exadata_infrastructure_summary.py b/src/oci/database/models/cloud_exadata_infrastructure_summary.py index a6f2e76c57..7e5eb0e99d 100644 --- a/src/oci/database/models/cloud_exadata_infrastructure_summary.py +++ b/src/oci/database/models/cloud_exadata_infrastructure_summary.py @@ -186,6 +186,10 @@ def __init__(self, **kwargs): The value to assign to the monthly_db_server_version property of this CloudExadataInfrastructureSummary. :type monthly_db_server_version: str + :param defined_file_system_configurations: + The value to assign to the defined_file_system_configurations property of this CloudExadataInfrastructureSummary. + :type defined_file_system_configurations: list[oci.database.models.DefinedFileSystemConfiguration] + """ self.swagger_types = { 'id': 'str', @@ -221,7 +225,8 @@ def __init__(self, **kwargs): 'storage_server_version': 'str', 'db_server_version': 'str', 'monthly_storage_server_version': 'str', - 'monthly_db_server_version': 'str' + 'monthly_db_server_version': 'str', + 'defined_file_system_configurations': 'list[DefinedFileSystemConfiguration]' } self.attribute_map = { @@ -258,7 +263,8 @@ def __init__(self, **kwargs): 'storage_server_version': 'storageServerVersion', 'db_server_version': 'dbServerVersion', 'monthly_storage_server_version': 'monthlyStorageServerVersion', - 'monthly_db_server_version': 'monthlyDbServerVersion' + 'monthly_db_server_version': 'monthlyDbServerVersion', + 'defined_file_system_configurations': 'definedFileSystemConfigurations' } self._id = None @@ -295,6 +301,7 @@ def __init__(self, **kwargs): self._db_server_version = None self._monthly_storage_server_version = None self._monthly_db_server_version = None + self._defined_file_system_configurations = None @property def id(self): @@ -1168,6 +1175,30 @@ def monthly_db_server_version(self, monthly_db_server_version): """ self._monthly_db_server_version = monthly_db_server_version + @property + def defined_file_system_configurations(self): + """ + Gets the defined_file_system_configurations of this CloudExadataInfrastructureSummary. + Details of the file system configuration of the Exadata infrastructure. + + + :return: The defined_file_system_configurations of this CloudExadataInfrastructureSummary. + :rtype: list[oci.database.models.DefinedFileSystemConfiguration] + """ + return self._defined_file_system_configurations + + @defined_file_system_configurations.setter + def defined_file_system_configurations(self, defined_file_system_configurations): + """ + Sets the defined_file_system_configurations of this CloudExadataInfrastructureSummary. + Details of the file system configuration of the Exadata infrastructure. + + + :param defined_file_system_configurations: The defined_file_system_configurations of this CloudExadataInfrastructureSummary. + :type: list[oci.database.models.DefinedFileSystemConfiguration] + """ + self._defined_file_system_configurations = defined_file_system_configurations + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/database/models/cloud_vm_cluster.py b/src/oci/database/models/cloud_vm_cluster.py index acb9ea0d53..40d803d76a 100644 --- a/src/oci/database/models/cloud_vm_cluster.py +++ b/src/oci/database/models/cloud_vm_cluster.py @@ -262,6 +262,10 @@ def __init__(self, **kwargs): The value to assign to the gi_software_image_id property of this CloudVmCluster. :type gi_software_image_id: str + :param file_system_configuration_details: + The value to assign to the file_system_configuration_details property of this CloudVmCluster. + :type file_system_configuration_details: list[oci.database.models.FileSystemConfigurationDetail] + """ self.swagger_types = { 'iorm_config_cache': 'ExadataIormConfig', @@ -311,7 +315,8 @@ def __init__(self, **kwargs): 'scan_listener_port_tcp': 'int', 'scan_listener_port_tcp_ssl': 'int', 'data_collection_options': 'DataCollectionOptions', - 'gi_software_image_id': 'str' + 'gi_software_image_id': 'str', + 'file_system_configuration_details': 'list[FileSystemConfigurationDetail]' } self.attribute_map = { @@ -362,7 +367,8 @@ def __init__(self, **kwargs): 'scan_listener_port_tcp': 'scanListenerPortTcp', 'scan_listener_port_tcp_ssl': 'scanListenerPortTcpSsl', 'data_collection_options': 'dataCollectionOptions', - 'gi_software_image_id': 'giSoftwareImageId' + 'gi_software_image_id': 'giSoftwareImageId', + 'file_system_configuration_details': 'fileSystemConfigurationDetails' } self._iorm_config_cache = None @@ -413,6 +419,7 @@ def __init__(self, **kwargs): self._scan_listener_port_tcp_ssl = None self._data_collection_options = None self._gi_software_image_id = None + self._file_system_configuration_details = None @property def iorm_config_cache(self): @@ -1702,6 +1709,30 @@ def gi_software_image_id(self, gi_software_image_id): """ self._gi_software_image_id = gi_software_image_id + @property + def file_system_configuration_details(self): + """ + Gets the file_system_configuration_details of this CloudVmCluster. + Details of the file system configuration of the VM cluster. + + + :return: The file_system_configuration_details of this CloudVmCluster. + :rtype: list[oci.database.models.FileSystemConfigurationDetail] + """ + return self._file_system_configuration_details + + @file_system_configuration_details.setter + def file_system_configuration_details(self, file_system_configuration_details): + """ + Sets the file_system_configuration_details of this CloudVmCluster. + Details of the file system configuration of the VM cluster. + + + :param file_system_configuration_details: The file_system_configuration_details of this CloudVmCluster. + :type: list[oci.database.models.FileSystemConfigurationDetail] + """ + self._file_system_configuration_details = file_system_configuration_details + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/database/models/cloud_vm_cluster_summary.py b/src/oci/database/models/cloud_vm_cluster_summary.py index 39efec8d5d..d662af1b58 100644 --- a/src/oci/database/models/cloud_vm_cluster_summary.py +++ b/src/oci/database/models/cloud_vm_cluster_summary.py @@ -258,6 +258,10 @@ def __init__(self, **kwargs): The value to assign to the gi_software_image_id property of this CloudVmClusterSummary. :type gi_software_image_id: str + :param file_system_configuration_details: + The value to assign to the file_system_configuration_details property of this CloudVmClusterSummary. + :type file_system_configuration_details: list[oci.database.models.FileSystemConfigurationDetail] + """ self.swagger_types = { 'id': 'str', @@ -306,7 +310,8 @@ def __init__(self, **kwargs): 'scan_listener_port_tcp': 'int', 'scan_listener_port_tcp_ssl': 'int', 'data_collection_options': 'DataCollectionOptions', - 'gi_software_image_id': 'str' + 'gi_software_image_id': 'str', + 'file_system_configuration_details': 'list[FileSystemConfigurationDetail]' } self.attribute_map = { @@ -356,7 +361,8 @@ def __init__(self, **kwargs): 'scan_listener_port_tcp': 'scanListenerPortTcp', 'scan_listener_port_tcp_ssl': 'scanListenerPortTcpSsl', 'data_collection_options': 'dataCollectionOptions', - 'gi_software_image_id': 'giSoftwareImageId' + 'gi_software_image_id': 'giSoftwareImageId', + 'file_system_configuration_details': 'fileSystemConfigurationDetails' } self._id = None @@ -406,6 +412,7 @@ def __init__(self, **kwargs): self._scan_listener_port_tcp_ssl = None self._data_collection_options = None self._gi_software_image_id = None + self._file_system_configuration_details = None @property def id(self): @@ -1675,6 +1682,30 @@ def gi_software_image_id(self, gi_software_image_id): """ self._gi_software_image_id = gi_software_image_id + @property + def file_system_configuration_details(self): + """ + Gets the file_system_configuration_details of this CloudVmClusterSummary. + Details of the file system configuration of the VM cluster. + + + :return: The file_system_configuration_details of this CloudVmClusterSummary. + :rtype: list[oci.database.models.FileSystemConfigurationDetail] + """ + return self._file_system_configuration_details + + @file_system_configuration_details.setter + def file_system_configuration_details(self, file_system_configuration_details): + """ + Sets the file_system_configuration_details of this CloudVmClusterSummary. + Details of the file system configuration of the VM cluster. + + + :param file_system_configuration_details: The file_system_configuration_details of this CloudVmClusterSummary. + :type: list[oci.database.models.FileSystemConfigurationDetail] + """ + self._file_system_configuration_details = file_system_configuration_details + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/database/models/create_cloud_vm_cluster_details.py b/src/oci/database/models/create_cloud_vm_cluster_details.py index ebf7095b02..5ba282d2dd 100644 --- a/src/oci/database/models/create_cloud_vm_cluster_details.py +++ b/src/oci/database/models/create_cloud_vm_cluster_details.py @@ -149,6 +149,10 @@ def __init__(self, **kwargs): The value to assign to the system_version property of this CreateCloudVmClusterDetails. :type system_version: str + :param file_system_configuration_details: + The value to assign to the file_system_configuration_details property of this CreateCloudVmClusterDetails. + :type file_system_configuration_details: list[oci.database.models.FileSystemConfigurationDetail] + """ self.swagger_types = { 'compartment_id': 'str', @@ -180,7 +184,8 @@ def __init__(self, **kwargs): 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'data_collection_options': 'DataCollectionOptions', - 'system_version': 'str' + 'system_version': 'str', + 'file_system_configuration_details': 'list[FileSystemConfigurationDetail]' } self.attribute_map = { @@ -213,7 +218,8 @@ def __init__(self, **kwargs): 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'data_collection_options': 'dataCollectionOptions', - 'system_version': 'systemVersion' + 'system_version': 'systemVersion', + 'file_system_configuration_details': 'fileSystemConfigurationDetails' } self._compartment_id = None @@ -246,6 +252,7 @@ def __init__(self, **kwargs): self._defined_tags = None self._data_collection_options = None self._system_version = None + self._file_system_configuration_details = None @property def compartment_id(self): @@ -1062,6 +1069,30 @@ def system_version(self, system_version): """ self._system_version = system_version + @property + def file_system_configuration_details(self): + """ + Gets the file_system_configuration_details of this CreateCloudVmClusterDetails. + Details of the file system configuration of the VM cluster. + + + :return: The file_system_configuration_details of this CreateCloudVmClusterDetails. + :rtype: list[oci.database.models.FileSystemConfigurationDetail] + """ + return self._file_system_configuration_details + + @file_system_configuration_details.setter + def file_system_configuration_details(self, file_system_configuration_details): + """ + Sets the file_system_configuration_details of this CreateCloudVmClusterDetails. + Details of the file system configuration of the VM cluster. + + + :param file_system_configuration_details: The file_system_configuration_details of this CreateCloudVmClusterDetails. + :type: list[oci.database.models.FileSystemConfigurationDetail] + """ + self._file_system_configuration_details = file_system_configuration_details + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/database/models/defined_file_system_configuration.py b/src/oci/database/models/defined_file_system_configuration.py new file mode 100644 index 0000000000..cdd58321f3 --- /dev/null +++ b/src/oci/database/models/defined_file_system_configuration.py @@ -0,0 +1,165 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DefinedFileSystemConfiguration(object): + """ + Details of the file system configuration of the Exadata infrastructure. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DefinedFileSystemConfiguration object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param mount_point: + The value to assign to the mount_point property of this DefinedFileSystemConfiguration. + :type mount_point: str + + :param min_size_gb: + The value to assign to the min_size_gb property of this DefinedFileSystemConfiguration. + :type min_size_gb: int + + :param is_resizable: + The value to assign to the is_resizable property of this DefinedFileSystemConfiguration. + :type is_resizable: bool + + :param is_backup_partition: + The value to assign to the is_backup_partition property of this DefinedFileSystemConfiguration. + :type is_backup_partition: bool + + """ + self.swagger_types = { + 'mount_point': 'str', + 'min_size_gb': 'int', + 'is_resizable': 'bool', + 'is_backup_partition': 'bool' + } + + self.attribute_map = { + 'mount_point': 'mountPoint', + 'min_size_gb': 'minSizeGb', + 'is_resizable': 'isResizable', + 'is_backup_partition': 'isBackupPartition' + } + + self._mount_point = None + self._min_size_gb = None + self._is_resizable = None + self._is_backup_partition = None + + @property + def mount_point(self): + """ + Gets the mount_point of this DefinedFileSystemConfiguration. + The mount point of file system. + + + :return: The mount_point of this DefinedFileSystemConfiguration. + :rtype: str + """ + return self._mount_point + + @mount_point.setter + def mount_point(self, mount_point): + """ + Sets the mount_point of this DefinedFileSystemConfiguration. + The mount point of file system. + + + :param mount_point: The mount_point of this DefinedFileSystemConfiguration. + :type: str + """ + self._mount_point = mount_point + + @property + def min_size_gb(self): + """ + Gets the min_size_gb of this DefinedFileSystemConfiguration. + The minimum size of file system. + + + :return: The min_size_gb of this DefinedFileSystemConfiguration. + :rtype: int + """ + return self._min_size_gb + + @min_size_gb.setter + def min_size_gb(self, min_size_gb): + """ + Sets the min_size_gb of this DefinedFileSystemConfiguration. + The minimum size of file system. + + + :param min_size_gb: The min_size_gb of this DefinedFileSystemConfiguration. + :type: int + """ + self._min_size_gb = min_size_gb + + @property + def is_resizable(self): + """ + Gets the is_resizable of this DefinedFileSystemConfiguration. + If true, the file system resize is allowed for the Exadata Infrastructure cluster. If false, the file system resize is not allowed. + + + :return: The is_resizable of this DefinedFileSystemConfiguration. + :rtype: bool + """ + return self._is_resizable + + @is_resizable.setter + def is_resizable(self, is_resizable): + """ + Sets the is_resizable of this DefinedFileSystemConfiguration. + If true, the file system resize is allowed for the Exadata Infrastructure cluster. If false, the file system resize is not allowed. + + + :param is_resizable: The is_resizable of this DefinedFileSystemConfiguration. + :type: bool + """ + self._is_resizable = is_resizable + + @property + def is_backup_partition(self): + """ + Gets the is_backup_partition of this DefinedFileSystemConfiguration. + If true, the file system is used to create a backup prior to Exadata VM OS update. + + + :return: The is_backup_partition of this DefinedFileSystemConfiguration. + :rtype: bool + """ + return self._is_backup_partition + + @is_backup_partition.setter + def is_backup_partition(self, is_backup_partition): + """ + Sets the is_backup_partition of this DefinedFileSystemConfiguration. + If true, the file system is used to create a backup prior to Exadata VM OS update. + + + :param is_backup_partition: The is_backup_partition of this DefinedFileSystemConfiguration. + :type: bool + """ + self._is_backup_partition = is_backup_partition + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/database/models/file_system_configuration_detail.py b/src/oci/database/models/file_system_configuration_detail.py new file mode 100644 index 0000000000..41fc2e9bb3 --- /dev/null +++ b/src/oci/database/models/file_system_configuration_detail.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FileSystemConfigurationDetail(object): + """ + Details of the file system configuration of the VM cluster. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FileSystemConfigurationDetail object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param mount_point: + The value to assign to the mount_point property of this FileSystemConfigurationDetail. + :type mount_point: str + + :param file_system_size_gb: + The value to assign to the file_system_size_gb property of this FileSystemConfigurationDetail. + :type file_system_size_gb: int + + """ + self.swagger_types = { + 'mount_point': 'str', + 'file_system_size_gb': 'int' + } + + self.attribute_map = { + 'mount_point': 'mountPoint', + 'file_system_size_gb': 'fileSystemSizeGb' + } + + self._mount_point = None + self._file_system_size_gb = None + + @property + def mount_point(self): + """ + Gets the mount_point of this FileSystemConfigurationDetail. + The mount point of file system. + + + :return: The mount_point of this FileSystemConfigurationDetail. + :rtype: str + """ + return self._mount_point + + @mount_point.setter + def mount_point(self, mount_point): + """ + Sets the mount_point of this FileSystemConfigurationDetail. + The mount point of file system. + + + :param mount_point: The mount_point of this FileSystemConfigurationDetail. + :type: str + """ + self._mount_point = mount_point + + @property + def file_system_size_gb(self): + """ + Gets the file_system_size_gb of this FileSystemConfigurationDetail. + The file system size to be allocated in GBs. + + + :return: The file_system_size_gb of this FileSystemConfigurationDetail. + :rtype: int + """ + return self._file_system_size_gb + + @file_system_size_gb.setter + def file_system_size_gb(self, file_system_size_gb): + """ + Sets the file_system_size_gb of this FileSystemConfigurationDetail. + The file system size to be allocated in GBs. + + + :param file_system_size_gb: The file_system_size_gb of this FileSystemConfigurationDetail. + :type: int + """ + self._file_system_size_gb = file_system_size_gb + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/database/models/update_cloud_vm_cluster_details.py b/src/oci/database/models/update_cloud_vm_cluster_details.py index d081f815cd..122fad7965 100644 --- a/src/oci/database/models/update_cloud_vm_cluster_details.py +++ b/src/oci/database/models/update_cloud_vm_cluster_details.py @@ -93,6 +93,10 @@ def __init__(self, **kwargs): The value to assign to the data_collection_options property of this UpdateCloudVmClusterDetails. :type data_collection_options: oci.database.models.DataCollectionOptions + :param file_system_configuration_details: + The value to assign to the file_system_configuration_details property of this UpdateCloudVmClusterDetails. + :type file_system_configuration_details: list[oci.database.models.FileSystemConfigurationDetail] + """ self.swagger_types = { 'display_name': 'str', @@ -110,7 +114,8 @@ def __init__(self, **kwargs): 'storage_size_in_gbs': 'int', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', - 'data_collection_options': 'DataCollectionOptions' + 'data_collection_options': 'DataCollectionOptions', + 'file_system_configuration_details': 'list[FileSystemConfigurationDetail]' } self.attribute_map = { @@ -129,7 +134,8 @@ def __init__(self, **kwargs): 'storage_size_in_gbs': 'storageSizeInGBs', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', - 'data_collection_options': 'dataCollectionOptions' + 'data_collection_options': 'dataCollectionOptions', + 'file_system_configuration_details': 'fileSystemConfigurationDetails' } self._display_name = None @@ -148,6 +154,7 @@ def __init__(self, **kwargs): self._freeform_tags = None self._defined_tags = None self._data_collection_options = None + self._file_system_configuration_details = None @property def display_name(self): @@ -564,6 +571,30 @@ def data_collection_options(self, data_collection_options): """ self._data_collection_options = data_collection_options + @property + def file_system_configuration_details(self): + """ + Gets the file_system_configuration_details of this UpdateCloudVmClusterDetails. + Details of the file system configuration of the VM cluster. + + + :return: The file_system_configuration_details of this UpdateCloudVmClusterDetails. + :rtype: list[oci.database.models.FileSystemConfigurationDetail] + """ + return self._file_system_configuration_details + + @file_system_configuration_details.setter + def file_system_configuration_details(self, file_system_configuration_details): + """ + Sets the file_system_configuration_details of this UpdateCloudVmClusterDetails. + Details of the file system configuration of the VM cluster. + + + :param file_system_configuration_details: The file_system_configuration_details of this UpdateCloudVmClusterDetails. + :type: list[oci.database.models.FileSystemConfigurationDetail] + """ + self._file_system_configuration_details = file_system_configuration_details + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/disaster_recovery/models/dr_plan_group.py b/src/oci/disaster_recovery/models/dr_plan_group.py index caff163937..d676fac520 100644 --- a/src/oci/disaster_recovery/models/dr_plan_group.py +++ b/src/oci/disaster_recovery/models/dr_plan_group.py @@ -27,6 +27,10 @@ class DrPlanGroup(object): #: This constant has a value of "BUILT_IN_PRECHECK" TYPE_BUILT_IN_PRECHECK = "BUILT_IN_PRECHECK" + #: A constant which can be used with the type property of a DrPlanGroup. + #: This constant has a value of "USER_DEFINED_PAUSE" + TYPE_USER_DEFINED_PAUSE = "USER_DEFINED_PAUSE" + def __init__(self, **kwargs): """ Initializes a new DrPlanGroup object with values from keyword arguments. @@ -38,7 +42,7 @@ def __init__(self, **kwargs): :param type: The value to assign to the type property of this DrPlanGroup. - Allowed values for this property are: "USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK", "USER_DEFINED_PAUSE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type type: str @@ -46,6 +50,10 @@ def __init__(self, **kwargs): The value to assign to the display_name property of this DrPlanGroup. :type display_name: str + :param is_pause_enabled: + The value to assign to the is_pause_enabled property of this DrPlanGroup. + :type is_pause_enabled: bool + :param steps: The value to assign to the steps property of this DrPlanGroup. :type steps: list[oci.disaster_recovery.models.DrPlanStep] @@ -55,6 +63,7 @@ def __init__(self, **kwargs): 'id': 'str', 'type': 'str', 'display_name': 'str', + 'is_pause_enabled': 'bool', 'steps': 'list[DrPlanStep]' } @@ -62,12 +71,14 @@ def __init__(self, **kwargs): 'id': 'id', 'type': 'type', 'display_name': 'displayName', + 'is_pause_enabled': 'isPauseEnabled', 'steps': 'steps' } self._id = None self._type = None self._display_name = None + self._is_pause_enabled = None self._steps = None @property @@ -106,7 +117,7 @@ def type(self): Example: `BUILT_IN` - Allowed values for this property are: "USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK", "USER_DEFINED_PAUSE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -127,7 +138,7 @@ def type(self, type): :param type: The type of this DrPlanGroup. :type: str """ - allowed_values = ["USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK"] + allowed_values = ["USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK", "USER_DEFINED_PAUSE"] if not value_allowed_none_or_none_sentinel(type, allowed_values): type = 'UNKNOWN_ENUM_VALUE' self._type = type @@ -160,6 +171,36 @@ def display_name(self, display_name): """ self._display_name = display_name + @property + def is_pause_enabled(self): + """ + Gets the is_pause_enabled of this DrPlanGroup. + A flag indicating whether this group should be enabled for execution. + This flag is only applicable to the `USER_DEFINED_PAUSE` group. The flag should be null for the remaining group types. + + Example: `true` + + + :return: The is_pause_enabled of this DrPlanGroup. + :rtype: bool + """ + return self._is_pause_enabled + + @is_pause_enabled.setter + def is_pause_enabled(self, is_pause_enabled): + """ + Sets the is_pause_enabled of this DrPlanGroup. + A flag indicating whether this group should be enabled for execution. + This flag is only applicable to the `USER_DEFINED_PAUSE` group. The flag should be null for the remaining group types. + + Example: `true` + + + :param is_pause_enabled: The is_pause_enabled of this DrPlanGroup. + :type: bool + """ + self._is_pause_enabled = is_pause_enabled + @property def steps(self): """ diff --git a/src/oci/disaster_recovery/models/dr_plan_group_execution.py b/src/oci/disaster_recovery/models/dr_plan_group_execution.py index 8a2ede63e9..01c65f31a3 100644 --- a/src/oci/disaster_recovery/models/dr_plan_group_execution.py +++ b/src/oci/disaster_recovery/models/dr_plan_group_execution.py @@ -27,6 +27,10 @@ class DrPlanGroupExecution(object): #: This constant has a value of "BUILT_IN_PRECHECK" TYPE_BUILT_IN_PRECHECK = "BUILT_IN_PRECHECK" + #: A constant which can be used with the type property of a DrPlanGroupExecution. + #: This constant has a value of "USER_DEFINED_PAUSE" + TYPE_USER_DEFINED_PAUSE = "USER_DEFINED_PAUSE" + #: A constant which can be used with the status property of a DrPlanGroupExecution. #: This constant has a value of "QUEUED" STATUS_QUEUED = "QUEUED" @@ -82,7 +86,7 @@ def __init__(self, **kwargs): :param type: The value to assign to the type property of this DrPlanGroupExecution. - Allowed values for this property are: "USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK", "USER_DEFINED_PAUSE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type type: str @@ -187,7 +191,7 @@ def type(self): Example: `BUILT_IN` - Allowed values for this property are: "USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK", "USER_DEFINED_PAUSE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -208,7 +212,7 @@ def type(self, type): :param type: The type of this DrPlanGroupExecution. :type: str """ - allowed_values = ["USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK"] + allowed_values = ["USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK", "USER_DEFINED_PAUSE"] if not value_allowed_none_or_none_sentinel(type, allowed_values): type = 'UNKNOWN_ENUM_VALUE' self._type = type diff --git a/src/oci/disaster_recovery/models/update_dr_plan_group_details.py b/src/oci/disaster_recovery/models/update_dr_plan_group_details.py index d9b628a9bb..5e132c7e95 100644 --- a/src/oci/disaster_recovery/models/update_dr_plan_group_details.py +++ b/src/oci/disaster_recovery/models/update_dr_plan_group_details.py @@ -27,6 +27,10 @@ class UpdateDrPlanGroupDetails(object): #: This constant has a value of "BUILT_IN_PRECHECK" TYPE_BUILT_IN_PRECHECK = "BUILT_IN_PRECHECK" + #: A constant which can be used with the type property of a UpdateDrPlanGroupDetails. + #: This constant has a value of "USER_DEFINED_PAUSE" + TYPE_USER_DEFINED_PAUSE = "USER_DEFINED_PAUSE" + def __init__(self, **kwargs): """ Initializes a new UpdateDrPlanGroupDetails object with values from keyword arguments. @@ -42,9 +46,13 @@ def __init__(self, **kwargs): :param type: The value to assign to the type property of this UpdateDrPlanGroupDetails. - Allowed values for this property are: "USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK" + Allowed values for this property are: "USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK", "USER_DEFINED_PAUSE" :type type: str + :param is_pause_enabled: + The value to assign to the is_pause_enabled property of this UpdateDrPlanGroupDetails. + :type is_pause_enabled: bool + :param steps: The value to assign to the steps property of this UpdateDrPlanGroupDetails. :type steps: list[oci.disaster_recovery.models.UpdateDrPlanStepDetails] @@ -54,6 +62,7 @@ def __init__(self, **kwargs): 'id': 'str', 'display_name': 'str', 'type': 'str', + 'is_pause_enabled': 'bool', 'steps': 'list[UpdateDrPlanStepDetails]' } @@ -61,12 +70,14 @@ def __init__(self, **kwargs): 'id': 'id', 'display_name': 'displayName', 'type': 'type', + 'is_pause_enabled': 'isPauseEnabled', 'steps': 'steps' } self._id = None self._display_name = None self._type = None + self._is_pause_enabled = None self._steps = None @property @@ -133,7 +144,7 @@ def type(self): Example: `BUILT_IN` - Allowed values for this property are: "USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK" + Allowed values for this property are: "USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK", "USER_DEFINED_PAUSE" :return: The type of this UpdateDrPlanGroupDetails. @@ -153,13 +164,43 @@ def type(self, type): :param type: The type of this UpdateDrPlanGroupDetails. :type: str """ - allowed_values = ["USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK"] + allowed_values = ["USER_DEFINED", "BUILT_IN", "BUILT_IN_PRECHECK", "USER_DEFINED_PAUSE"] if not value_allowed_none_or_none_sentinel(type, allowed_values): raise ValueError( f"Invalid value for `type`, must be None or one of {allowed_values}" ) self._type = type + @property + def is_pause_enabled(self): + """ + Gets the is_pause_enabled of this UpdateDrPlanGroupDetails. + A flag indicating whether this group should be enabled for execution. + This flag is only applicable to the `USER_DEFINED_PAUSE` group. The flag should be null for the remaining group types. + + Example: `true` + + + :return: The is_pause_enabled of this UpdateDrPlanGroupDetails. + :rtype: bool + """ + return self._is_pause_enabled + + @is_pause_enabled.setter + def is_pause_enabled(self, is_pause_enabled): + """ + Sets the is_pause_enabled of this UpdateDrPlanGroupDetails. + A flag indicating whether this group should be enabled for execution. + This flag is only applicable to the `USER_DEFINED_PAUSE` group. The flag should be null for the remaining group types. + + Example: `true` + + + :param is_pause_enabled: The is_pause_enabled of this UpdateDrPlanGroupDetails. + :type: bool + """ + self._is_pause_enabled = is_pause_enabled + @property def steps(self): """ diff --git a/src/oci/disaster_recovery/models/update_dr_plan_step_details.py b/src/oci/disaster_recovery/models/update_dr_plan_step_details.py index fc9c707971..4af9a58a55 100644 --- a/src/oci/disaster_recovery/models/update_dr_plan_step_details.py +++ b/src/oci/disaster_recovery/models/update_dr_plan_step_details.py @@ -140,6 +140,7 @@ def error_mode(self): """ Gets the error_mode of this UpdateDrPlanStepDetails. The error mode for this step. + The default error mode for the step is `STOP_ON_ERROR`. Allowed values for this property are: "STOP_ON_ERROR", "CONTINUE_ON_ERROR" @@ -154,6 +155,7 @@ def error_mode(self, error_mode): """ Sets the error_mode of this UpdateDrPlanStepDetails. The error mode for this step. + The default error mode for the step is `STOP_ON_ERROR`. :param error_mode: The error_mode of this UpdateDrPlanStepDetails. @@ -171,6 +173,7 @@ def timeout(self): """ Gets the timeout of this UpdateDrPlanStepDetails. The timeout in seconds for executing this step. + When creating a new step, if no timeout is specified, the default timeout is set to `3600` seconds. Example: `600` @@ -185,6 +188,7 @@ def timeout(self, timeout): """ Sets the timeout of this UpdateDrPlanStepDetails. The timeout in seconds for executing this step. + When creating a new step, if no timeout is specified, the default timeout is set to `3600` seconds. Example: `600` @@ -199,6 +203,7 @@ def is_enabled(self): """ Gets the is_enabled of this UpdateDrPlanStepDetails. A flag indicating whether this step should be enabled for execution. + The default value for the isEnabled flag is `true`. Example: `true` @@ -213,6 +218,7 @@ def is_enabled(self, is_enabled): """ Sets the is_enabled of this UpdateDrPlanStepDetails. A flag indicating whether this step should be enabled for execution. + The default value for the isEnabled flag is `true`. Example: `true` diff --git a/src/oci/load_balancer/load_balancer_client.py b/src/oci/load_balancer/load_balancer_client.py index 26b3584a86..a5876cc824 100644 --- a/src/oci/load_balancer/load_balancer_client.py +++ b/src/oci/load_balancer/load_balancer_client.py @@ -4711,6 +4711,7 @@ def list_listener_rules(self, load_balancer_id, listener_name, **kwargs): :param str listener_name: (required) The name of the listener the rules are associated with. + Example: `example_listener` :param str opc_request_id: (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a diff --git a/src/oci/load_balancer/models/__init__.py b/src/oci/load_balancer/models/__init__.py index e2d6197e63..391d2c23e6 100644 --- a/src/oci/load_balancer/models/__init__.py +++ b/src/oci/load_balancer/models/__init__.py @@ -41,6 +41,8 @@ from .hostname_details import HostnameDetails from .http_header_rule import HttpHeaderRule from .ip_address import IpAddress +from .ip_based_max_connections_rule import IpBasedMaxConnectionsRule +from .ip_max_connections import IpMaxConnections from .lb_cookie_session_persistence_configuration_details import LBCookieSessionPersistenceConfigurationDetails from .listener import Listener from .listener_details import ListenerDetails @@ -129,6 +131,8 @@ "HostnameDetails": HostnameDetails, "HttpHeaderRule": HttpHeaderRule, "IpAddress": IpAddress, + "IpBasedMaxConnectionsRule": IpBasedMaxConnectionsRule, + "IpMaxConnections": IpMaxConnections, "LBCookieSessionPersistenceConfigurationDetails": LBCookieSessionPersistenceConfigurationDetails, "Listener": Listener, "ListenerDetails": ListenerDetails, diff --git a/src/oci/load_balancer/models/add_http_request_header_rule.py b/src/oci/load_balancer/models/add_http_request_header_rule.py index 7643e00f28..3896a44e04 100644 --- a/src/oci/load_balancer/models/add_http_request_header_rule.py +++ b/src/oci/load_balancer/models/add_http_request_header_rule.py @@ -32,7 +32,7 @@ def __init__(self, **kwargs): :param action: The value to assign to the action property of this AddHttpRequestHeaderRule. - Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER" + Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", "IP_BASED_MAX_CONNECTIONS" :type action: str :param header: diff --git a/src/oci/load_balancer/models/add_http_response_header_rule.py b/src/oci/load_balancer/models/add_http_response_header_rule.py index 73e832899e..8fca17b419 100644 --- a/src/oci/load_balancer/models/add_http_response_header_rule.py +++ b/src/oci/load_balancer/models/add_http_response_header_rule.py @@ -33,7 +33,7 @@ def __init__(self, **kwargs): :param action: The value to assign to the action property of this AddHttpResponseHeaderRule. - Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER" + Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", "IP_BASED_MAX_CONNECTIONS" :type action: str :param header: diff --git a/src/oci/load_balancer/models/allow_rule.py b/src/oci/load_balancer/models/allow_rule.py index b6334097f8..67f6903c52 100644 --- a/src/oci/load_balancer/models/allow_rule.py +++ b/src/oci/load_balancer/models/allow_rule.py @@ -33,7 +33,7 @@ def __init__(self, **kwargs): :param action: The value to assign to the action property of this AllowRule. - Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER" + Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", "IP_BASED_MAX_CONNECTIONS" :type action: str :param conditions: diff --git a/src/oci/load_balancer/models/backend.py b/src/oci/load_balancer/models/backend.py index 0b9d663157..438236ed86 100644 --- a/src/oci/load_balancer/models/backend.py +++ b/src/oci/load_balancer/models/backend.py @@ -39,6 +39,10 @@ def __init__(self, **kwargs): The value to assign to the weight property of this Backend. :type weight: int + :param max_connections: + The value to assign to the max_connections property of this Backend. + :type max_connections: int + :param drain: The value to assign to the drain property of this Backend. :type drain: bool @@ -57,6 +61,7 @@ def __init__(self, **kwargs): 'ip_address': 'str', 'port': 'int', 'weight': 'int', + 'max_connections': 'int', 'drain': 'bool', 'backup': 'bool', 'offline': 'bool' @@ -67,6 +72,7 @@ def __init__(self, **kwargs): 'ip_address': 'ipAddress', 'port': 'port', 'weight': 'weight', + 'max_connections': 'maxConnections', 'drain': 'drain', 'backup': 'backup', 'offline': 'offline' @@ -76,6 +82,7 @@ def __init__(self, **kwargs): self._ip_address = None self._port = None self._weight = None + self._max_connections = None self._drain = None self._backup = None self._offline = None @@ -204,6 +211,34 @@ def weight(self, weight): """ self._weight = weight + @property + def max_connections(self): + """ + Gets the max_connections of this Backend. + The maximum number of simultaneous connections the load balancer can make to the backend. + + Example: `300` + + + :return: The max_connections of this Backend. + :rtype: int + """ + return self._max_connections + + @max_connections.setter + def max_connections(self, max_connections): + """ + Sets the max_connections of this Backend. + The maximum number of simultaneous connections the load balancer can make to the backend. + + Example: `300` + + + :param max_connections: The max_connections of this Backend. + :type: int + """ + self._max_connections = max_connections + @property def drain(self): """ diff --git a/src/oci/load_balancer/models/backend_details.py b/src/oci/load_balancer/models/backend_details.py index a77e6ceee0..74ea3684fd 100644 --- a/src/oci/load_balancer/models/backend_details.py +++ b/src/oci/load_balancer/models/backend_details.py @@ -32,6 +32,10 @@ def __init__(self, **kwargs): The value to assign to the weight property of this BackendDetails. :type weight: int + :param max_connections: + The value to assign to the max_connections property of this BackendDetails. + :type max_connections: int + :param backup: The value to assign to the backup property of this BackendDetails. :type backup: bool @@ -49,6 +53,7 @@ def __init__(self, **kwargs): 'ip_address': 'str', 'port': 'int', 'weight': 'int', + 'max_connections': 'int', 'backup': 'bool', 'drain': 'bool', 'offline': 'bool' @@ -58,6 +63,7 @@ def __init__(self, **kwargs): 'ip_address': 'ipAddress', 'port': 'port', 'weight': 'weight', + 'max_connections': 'maxConnections', 'backup': 'backup', 'drain': 'drain', 'offline': 'offline' @@ -66,6 +72,7 @@ def __init__(self, **kwargs): self._ip_address = None self._port = None self._weight = None + self._max_connections = None self._backup = None self._drain = None self._offline = None @@ -166,6 +173,34 @@ def weight(self, weight): """ self._weight = weight + @property + def max_connections(self): + """ + Gets the max_connections of this BackendDetails. + The maximum number of simultaneous connections the load balancer can make to the backend. + + Example: `300` + + + :return: The max_connections of this BackendDetails. + :rtype: int + """ + return self._max_connections + + @max_connections.setter + def max_connections(self, max_connections): + """ + Sets the max_connections of this BackendDetails. + The maximum number of simultaneous connections the load balancer can make to the backend. + + Example: `300` + + + :param max_connections: The max_connections of this BackendDetails. + :type: int + """ + self._max_connections = max_connections + @property def backup(self): """ diff --git a/src/oci/load_balancer/models/backend_set.py b/src/oci/load_balancer/models/backend_set.py index c44a91ec0d..09c61d4f98 100644 --- a/src/oci/load_balancer/models/backend_set.py +++ b/src/oci/load_balancer/models/backend_set.py @@ -42,6 +42,10 @@ def __init__(self, **kwargs): The value to assign to the backends property of this BackendSet. :type backends: list[oci.load_balancer.models.Backend] + :param backend_max_connections: + The value to assign to the backend_max_connections property of this BackendSet. + :type backend_max_connections: int + :param health_checker: The value to assign to the health_checker property of this BackendSet. :type health_checker: oci.load_balancer.models.HealthChecker @@ -63,6 +67,7 @@ def __init__(self, **kwargs): 'name': 'str', 'policy': 'str', 'backends': 'list[Backend]', + 'backend_max_connections': 'int', 'health_checker': 'HealthChecker', 'ssl_configuration': 'SSLConfiguration', 'session_persistence_configuration': 'SessionPersistenceConfigurationDetails', @@ -73,6 +78,7 @@ def __init__(self, **kwargs): 'name': 'name', 'policy': 'policy', 'backends': 'backends', + 'backend_max_connections': 'backendMaxConnections', 'health_checker': 'healthChecker', 'ssl_configuration': 'sslConfiguration', 'session_persistence_configuration': 'sessionPersistenceConfiguration', @@ -82,6 +88,7 @@ def __init__(self, **kwargs): self._name = None self._policy = None self._backends = None + self._backend_max_connections = None self._health_checker = None self._ssl_configuration = None self._session_persistence_configuration = None @@ -171,6 +178,36 @@ def backends(self, backends): """ self._backends = backends + @property + def backend_max_connections(self): + """ + Gets the backend_max_connections of this BackendSet. + The maximum number of simultaneous connections the load balancer can make to any backend + in the backend set unless the backend has its own maxConnections setting. + + Example: `300` + + + :return: The backend_max_connections of this BackendSet. + :rtype: int + """ + return self._backend_max_connections + + @backend_max_connections.setter + def backend_max_connections(self, backend_max_connections): + """ + Sets the backend_max_connections of this BackendSet. + The maximum number of simultaneous connections the load balancer can make to any backend + in the backend set unless the backend has its own maxConnections setting. + + Example: `300` + + + :param backend_max_connections: The backend_max_connections of this BackendSet. + :type: int + """ + self._backend_max_connections = backend_max_connections + @property def health_checker(self): """ diff --git a/src/oci/load_balancer/models/backend_set_details.py b/src/oci/load_balancer/models/backend_set_details.py index e225ee2758..6d6468abb0 100644 --- a/src/oci/load_balancer/models/backend_set_details.py +++ b/src/oci/load_balancer/models/backend_set_details.py @@ -36,6 +36,10 @@ def __init__(self, **kwargs): The value to assign to the backends property of this BackendSetDetails. :type backends: list[oci.load_balancer.models.BackendDetails] + :param backend_max_connections: + The value to assign to the backend_max_connections property of this BackendSetDetails. + :type backend_max_connections: int + :param health_checker: The value to assign to the health_checker property of this BackendSetDetails. :type health_checker: oci.load_balancer.models.HealthCheckerDetails @@ -56,6 +60,7 @@ def __init__(self, **kwargs): self.swagger_types = { 'policy': 'str', 'backends': 'list[BackendDetails]', + 'backend_max_connections': 'int', 'health_checker': 'HealthCheckerDetails', 'ssl_configuration': 'SSLConfigurationDetails', 'session_persistence_configuration': 'SessionPersistenceConfigurationDetails', @@ -65,6 +70,7 @@ def __init__(self, **kwargs): self.attribute_map = { 'policy': 'policy', 'backends': 'backends', + 'backend_max_connections': 'backendMaxConnections', 'health_checker': 'healthChecker', 'ssl_configuration': 'sslConfiguration', 'session_persistence_configuration': 'sessionPersistenceConfiguration', @@ -73,6 +79,7 @@ def __init__(self, **kwargs): self._policy = None self._backends = None + self._backend_max_connections = None self._health_checker = None self._ssl_configuration = None self._session_persistence_configuration = None @@ -128,6 +135,36 @@ def backends(self, backends): """ self._backends = backends + @property + def backend_max_connections(self): + """ + Gets the backend_max_connections of this BackendSetDetails. + The maximum number of simultaneous connections the load balancer can make to any backend + in the backend set unless the backend has its own maxConnections setting. + + Example: `300` + + + :return: The backend_max_connections of this BackendSetDetails. + :rtype: int + """ + return self._backend_max_connections + + @backend_max_connections.setter + def backend_max_connections(self, backend_max_connections): + """ + Sets the backend_max_connections of this BackendSetDetails. + The maximum number of simultaneous connections the load balancer can make to any backend + in the backend set unless the backend has its own maxConnections setting. + + Example: `300` + + + :param backend_max_connections: The backend_max_connections of this BackendSetDetails. + :type: int + """ + self._backend_max_connections = backend_max_connections + @property def health_checker(self): """ diff --git a/src/oci/load_balancer/models/control_access_using_http_methods_rule.py b/src/oci/load_balancer/models/control_access_using_http_methods_rule.py index 5ce3730029..74881a88fc 100644 --- a/src/oci/load_balancer/models/control_access_using_http_methods_rule.py +++ b/src/oci/load_balancer/models/control_access_using_http_methods_rule.py @@ -32,7 +32,7 @@ def __init__(self, **kwargs): :param action: The value to assign to the action property of this ControlAccessUsingHttpMethodsRule. - Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER" + Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", "IP_BASED_MAX_CONNECTIONS" :type action: str :param allowed_methods: diff --git a/src/oci/load_balancer/models/create_backend_details.py b/src/oci/load_balancer/models/create_backend_details.py index 035944f685..a37baade13 100644 --- a/src/oci/load_balancer/models/create_backend_details.py +++ b/src/oci/load_balancer/models/create_backend_details.py @@ -36,6 +36,10 @@ def __init__(self, **kwargs): The value to assign to the weight property of this CreateBackendDetails. :type weight: int + :param max_connections: + The value to assign to the max_connections property of this CreateBackendDetails. + :type max_connections: int + :param backup: The value to assign to the backup property of this CreateBackendDetails. :type backup: bool @@ -53,6 +57,7 @@ def __init__(self, **kwargs): 'ip_address': 'str', 'port': 'int', 'weight': 'int', + 'max_connections': 'int', 'backup': 'bool', 'drain': 'bool', 'offline': 'bool' @@ -62,6 +67,7 @@ def __init__(self, **kwargs): 'ip_address': 'ipAddress', 'port': 'port', 'weight': 'weight', + 'max_connections': 'maxConnections', 'backup': 'backup', 'drain': 'drain', 'offline': 'offline' @@ -70,6 +76,7 @@ def __init__(self, **kwargs): self._ip_address = None self._port = None self._weight = None + self._max_connections = None self._backup = None self._drain = None self._offline = None @@ -170,6 +177,34 @@ def weight(self, weight): """ self._weight = weight + @property + def max_connections(self): + """ + Gets the max_connections of this CreateBackendDetails. + The maximum number of simultaneous connections the load balancer can make to the backend. + + Example: `300` + + + :return: The max_connections of this CreateBackendDetails. + :rtype: int + """ + return self._max_connections + + @max_connections.setter + def max_connections(self, max_connections): + """ + Sets the max_connections of this CreateBackendDetails. + The maximum number of simultaneous connections the load balancer can make to the backend. + + Example: `300` + + + :param max_connections: The max_connections of this CreateBackendDetails. + :type: int + """ + self._max_connections = max_connections + @property def backup(self): """ diff --git a/src/oci/load_balancer/models/create_backend_set_details.py b/src/oci/load_balancer/models/create_backend_set_details.py index b293534168..cd9642674a 100644 --- a/src/oci/load_balancer/models/create_backend_set_details.py +++ b/src/oci/load_balancer/models/create_backend_set_details.py @@ -42,6 +42,10 @@ def __init__(self, **kwargs): The value to assign to the backends property of this CreateBackendSetDetails. :type backends: list[oci.load_balancer.models.BackendDetails] + :param backend_max_connections: + The value to assign to the backend_max_connections property of this CreateBackendSetDetails. + :type backend_max_connections: int + :param health_checker: The value to assign to the health_checker property of this CreateBackendSetDetails. :type health_checker: oci.load_balancer.models.HealthCheckerDetails @@ -63,6 +67,7 @@ def __init__(self, **kwargs): 'name': 'str', 'policy': 'str', 'backends': 'list[BackendDetails]', + 'backend_max_connections': 'int', 'health_checker': 'HealthCheckerDetails', 'ssl_configuration': 'SSLConfigurationDetails', 'session_persistence_configuration': 'SessionPersistenceConfigurationDetails', @@ -73,6 +78,7 @@ def __init__(self, **kwargs): 'name': 'name', 'policy': 'policy', 'backends': 'backends', + 'backend_max_connections': 'backendMaxConnections', 'health_checker': 'healthChecker', 'ssl_configuration': 'sslConfiguration', 'session_persistence_configuration': 'sessionPersistenceConfiguration', @@ -82,6 +88,7 @@ def __init__(self, **kwargs): self._name = None self._policy = None self._backends = None + self._backend_max_connections = None self._health_checker = None self._ssl_configuration = None self._session_persistence_configuration = None @@ -171,6 +178,36 @@ def backends(self, backends): """ self._backends = backends + @property + def backend_max_connections(self): + """ + Gets the backend_max_connections of this CreateBackendSetDetails. + The maximum number of simultaneous connections the load balancer can make to any backend + in the backend set unless the backend has its own maxConnections setting. + + Example: `300` + + + :return: The backend_max_connections of this CreateBackendSetDetails. + :rtype: int + """ + return self._backend_max_connections + + @backend_max_connections.setter + def backend_max_connections(self, backend_max_connections): + """ + Sets the backend_max_connections of this CreateBackendSetDetails. + The maximum number of simultaneous connections the load balancer can make to any backend + in the backend set unless the backend has its own maxConnections setting. + + Example: `300` + + + :param backend_max_connections: The backend_max_connections of this CreateBackendSetDetails. + :type: int + """ + self._backend_max_connections = backend_max_connections + @property def health_checker(self): """ diff --git a/src/oci/load_balancer/models/create_load_balancer_details.py b/src/oci/load_balancer/models/create_load_balancer_details.py index 50deddde03..3b3fbc28c8 100644 --- a/src/oci/load_balancer/models/create_load_balancer_details.py +++ b/src/oci/load_balancer/models/create_load_balancer_details.py @@ -50,6 +50,10 @@ def __init__(self, **kwargs): The value to assign to the is_private property of this CreateLoadBalancerDetails. :type is_private: bool + :param is_delete_protection_enabled: + The value to assign to the is_delete_protection_enabled property of this CreateLoadBalancerDetails. + :type is_delete_protection_enabled: bool + :param ip_mode: The value to assign to the ip_mode property of this CreateLoadBalancerDetails. Allowed values for this property are: "IPV4", "IPV6" @@ -110,6 +114,7 @@ def __init__(self, **kwargs): 'shape_name': 'str', 'shape_details': 'ShapeDetails', 'is_private': 'bool', + 'is_delete_protection_enabled': 'bool', 'ip_mode': 'str', 'reserved_ips': 'list[ReservedIP]', 'listeners': 'dict(str, ListenerDetails)', @@ -131,6 +136,7 @@ def __init__(self, **kwargs): 'shape_name': 'shapeName', 'shape_details': 'shapeDetails', 'is_private': 'isPrivate', + 'is_delete_protection_enabled': 'isDeleteProtectionEnabled', 'ip_mode': 'ipMode', 'reserved_ips': 'reservedIps', 'listeners': 'listeners', @@ -151,6 +157,7 @@ def __init__(self, **kwargs): self._shape_name = None self._shape_details = None self._is_private = None + self._is_delete_protection_enabled = None self._ip_mode = None self._reserved_ips = None self._listeners = None @@ -232,7 +239,7 @@ def shape_name(self): operation. Example: `flexible` - NOTE: Starting May 2023, Fixed shapes - 10Mbps, 100Mbps, 400Mbps, 8000Mbps would be deprecated and only shape + NOTE: After May 2023, Fixed shapes - 10Mbps, 100Mbps, 400Mbps, 8000Mbps would be deprecated and only shape allowed would be `Flexible` @@ -250,7 +257,7 @@ def shape_name(self, shape_name): operation. Example: `flexible` - NOTE: Starting May 2023, Fixed shapes - 10Mbps, 100Mbps, 400Mbps, 8000Mbps would be deprecated and only shape + NOTE: After May 2023, Fixed shapes - 10Mbps, 100Mbps, 400Mbps, 8000Mbps would be deprecated and only shape allowed would be `Flexible` @@ -333,6 +340,44 @@ def is_private(self, is_private): """ self._is_private = is_private + @property + def is_delete_protection_enabled(self): + """ + Gets the is_delete_protection_enabled of this CreateLoadBalancerDetails. + Whether or not the load balancer has delete protection enabled. + + If \"true\", the loadbalancer will be protected against deletion if configured to accept traffic. + + If \"false\", the loadbalancer will not be protected against deletion. + + Delete protection will not be enabled unless a value of \"true\" is provided. + Example: `true` + + + :return: The is_delete_protection_enabled of this CreateLoadBalancerDetails. + :rtype: bool + """ + return self._is_delete_protection_enabled + + @is_delete_protection_enabled.setter + def is_delete_protection_enabled(self, is_delete_protection_enabled): + """ + Sets the is_delete_protection_enabled of this CreateLoadBalancerDetails. + Whether or not the load balancer has delete protection enabled. + + If \"true\", the loadbalancer will be protected against deletion if configured to accept traffic. + + If \"false\", the loadbalancer will not be protected against deletion. + + Delete protection will not be enabled unless a value of \"true\" is provided. + Example: `true` + + + :param is_delete_protection_enabled: The is_delete_protection_enabled of this CreateLoadBalancerDetails. + :type: bool + """ + self._is_delete_protection_enabled = is_delete_protection_enabled + @property def ip_mode(self): """ diff --git a/src/oci/load_balancer/models/create_ssl_cipher_suite_details.py b/src/oci/load_balancer/models/create_ssl_cipher_suite_details.py index 1c61751d2c..b41eb1e725 100644 --- a/src/oci/load_balancer/models/create_ssl_cipher_suite_details.py +++ b/src/oci/load_balancer/models/create_ssl_cipher_suite_details.py @@ -191,9 +191,9 @@ class CreateSSLCipherSuiteDetails(object): * __oci-default-http2-tls-13-ssl-cipher-suite-v1__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" * __oci-default-http2-tls-12-13-ssl-cipher-suite-v1__ @@ -203,21 +203,21 @@ class CreateSSLCipherSuiteDetails(object): \"ECDHE-ECDSA-AES128-GCM-SHA256\" \"DHE-RSA-AES256-GCM-SHA384\" \"DHE-RSA-AES128-GCM-SHA256\" - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" * __oci-tls-13-recommended-ssl-cipher-suite-v1__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" * __oci-tls-12-13-wider-ssl-cipher-suite-v1__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" \"ECDHE-ECDSA-AES128-GCM-SHA256\" \"ECDHE-RSA-AES128-GCM-SHA256\" \"ECDHE-ECDSA-AES128-SHA256\" @@ -232,9 +232,9 @@ class CreateSSLCipherSuiteDetails(object): \"AES256-SHA256\" * __oci-tls-11-12-13-wider-ssl-cipher-suite-v1__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" \"ECDHE-ECDSA-AES128-GCM-SHA256\" \"ECDHE-RSA-AES128-GCM-SHA256\" \"ECDHE-ECDSA-AES128-SHA256\" @@ -353,11 +353,11 @@ def ciphers(self): * __TLSv1.3 ciphers__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" - \"TLS-AES-128-CCM-SHA256\" - \"TLS-AES-128-CCM-8-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" + \"TLS_AES_128_CCM_SHA256\" + \"TLS_AES_128_CCM_8_SHA256\" * __TLSv1.2 ciphers__ @@ -478,11 +478,11 @@ def ciphers(self, ciphers): * __TLSv1.3 ciphers__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" - \"TLS-AES-128-CCM-SHA256\" - \"TLS-AES-128-CCM-8-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" + \"TLS_AES_128_CCM_SHA256\" + \"TLS_AES_128_CCM_8_SHA256\" * __TLSv1.2 ciphers__ diff --git a/src/oci/load_balancer/models/extend_http_request_header_value_rule.py b/src/oci/load_balancer/models/extend_http_request_header_value_rule.py index a660ff1b0d..69c4088f62 100644 --- a/src/oci/load_balancer/models/extend_http_request_header_value_rule.py +++ b/src/oci/load_balancer/models/extend_http_request_header_value_rule.py @@ -36,7 +36,7 @@ def __init__(self, **kwargs): :param action: The value to assign to the action property of this ExtendHttpRequestHeaderValueRule. - Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER" + Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", "IP_BASED_MAX_CONNECTIONS" :type action: str :param header: diff --git a/src/oci/load_balancer/models/extend_http_response_header_value_rule.py b/src/oci/load_balancer/models/extend_http_response_header_value_rule.py index c3edaa8808..6f0bc2abbd 100644 --- a/src/oci/load_balancer/models/extend_http_response_header_value_rule.py +++ b/src/oci/load_balancer/models/extend_http_response_header_value_rule.py @@ -36,7 +36,7 @@ def __init__(self, **kwargs): :param action: The value to assign to the action property of this ExtendHttpResponseHeaderValueRule. - Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER" + Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", "IP_BASED_MAX_CONNECTIONS" :type action: str :param header: diff --git a/src/oci/load_balancer/models/http_header_rule.py b/src/oci/load_balancer/models/http_header_rule.py index 788ad3c636..33c9efd576 100644 --- a/src/oci/load_balancer/models/http_header_rule.py +++ b/src/oci/load_balancer/models/http_header_rule.py @@ -27,7 +27,7 @@ def __init__(self, **kwargs): :param action: The value to assign to the action property of this HttpHeaderRule. - Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER" + Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", "IP_BASED_MAX_CONNECTIONS" :type action: str :param are_invalid_characters_allowed: diff --git a/src/oci/load_balancer/models/ip_based_max_connections_rule.py b/src/oci/load_balancer/models/ip_based_max_connections_rule.py new file mode 100644 index 0000000000..4e8e870b83 --- /dev/null +++ b/src/oci/load_balancer/models/ip_based_max_connections_rule.py @@ -0,0 +1,118 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20170115 + +from .rule import Rule +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IpBasedMaxConnectionsRule(Rule): + """ + An object that represents the action of configuring an IP max connection rule which specifies + how many connections IPs can make to a listener. + """ + + def __init__(self, **kwargs): + """ + Initializes a new IpBasedMaxConnectionsRule object with values from keyword arguments. The default value of the :py:attr:`~oci.load_balancer.models.IpBasedMaxConnectionsRule.action` attribute + of this class is ``IP_BASED_MAX_CONNECTIONS`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param action: + The value to assign to the action property of this IpBasedMaxConnectionsRule. + Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", "IP_BASED_MAX_CONNECTIONS" + :type action: str + + :param default_max_connections: + The value to assign to the default_max_connections property of this IpBasedMaxConnectionsRule. + :type default_max_connections: int + + :param ip_max_connections: + The value to assign to the ip_max_connections property of this IpBasedMaxConnectionsRule. + :type ip_max_connections: list[oci.load_balancer.models.IpMaxConnections] + + """ + self.swagger_types = { + 'action': 'str', + 'default_max_connections': 'int', + 'ip_max_connections': 'list[IpMaxConnections]' + } + + self.attribute_map = { + 'action': 'action', + 'default_max_connections': 'defaultMaxConnections', + 'ip_max_connections': 'ipMaxConnections' + } + + self._action = None + self._default_max_connections = None + self._ip_max_connections = None + self._action = 'IP_BASED_MAX_CONNECTIONS' + + @property + def default_max_connections(self): + """ + Gets the default_max_connections of this IpBasedMaxConnectionsRule. + The maximum number of connections that the any IP can make to a listener unless the IP is mentioned + in maxConnections. If no defaultMaxConnections is specified the default is unlimited. + + + :return: The default_max_connections of this IpBasedMaxConnectionsRule. + :rtype: int + """ + return self._default_max_connections + + @default_max_connections.setter + def default_max_connections(self, default_max_connections): + """ + Sets the default_max_connections of this IpBasedMaxConnectionsRule. + The maximum number of connections that the any IP can make to a listener unless the IP is mentioned + in maxConnections. If no defaultMaxConnections is specified the default is unlimited. + + + :param default_max_connections: The default_max_connections of this IpBasedMaxConnectionsRule. + :type: int + """ + self._default_max_connections = default_max_connections + + @property + def ip_max_connections(self): + """ + Gets the ip_max_connections of this IpBasedMaxConnectionsRule. + An array of IPs that have a maxConnection setting different than the default and what + that maxConnection setting is + + + :return: The ip_max_connections of this IpBasedMaxConnectionsRule. + :rtype: list[oci.load_balancer.models.IpMaxConnections] + """ + return self._ip_max_connections + + @ip_max_connections.setter + def ip_max_connections(self, ip_max_connections): + """ + Sets the ip_max_connections of this IpBasedMaxConnectionsRule. + An array of IPs that have a maxConnection setting different than the default and what + that maxConnection setting is + + + :param ip_max_connections: The ip_max_connections of this IpBasedMaxConnectionsRule. + :type: list[oci.load_balancer.models.IpMaxConnections] + """ + self._ip_max_connections = ip_max_connections + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/load_balancer/models/ip_max_connections.py b/src/oci/load_balancer/models/ip_max_connections.py new file mode 100644 index 0000000000..48fe85820a --- /dev/null +++ b/src/oci/load_balancer/models/ip_max_connections.py @@ -0,0 +1,105 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20170115 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IpMaxConnections(object): + """ + An object that species the maximum number of connections the listed IPs can make to a listener. + """ + + def __init__(self, **kwargs): + """ + Initializes a new IpMaxConnections object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param ip_addresses: + The value to assign to the ip_addresses property of this IpMaxConnections. + :type ip_addresses: list[str] + + :param max_connections: + The value to assign to the max_connections property of this IpMaxConnections. + :type max_connections: int + + """ + self.swagger_types = { + 'ip_addresses': 'list[str]', + 'max_connections': 'int' + } + + self.attribute_map = { + 'ip_addresses': 'ipAddresses', + 'max_connections': 'maxConnections' + } + + self._ip_addresses = None + self._max_connections = None + + @property + def ip_addresses(self): + """ + **[Required]** Gets the ip_addresses of this IpMaxConnections. + Each element in the list should be valid IPv4 or IPv6 CIDR Block address. + Example: '[\"129.213.176.0/24\", \"150.136.187.0/24\", \"2002::1234:abcd:ffff:c0a8:101/64\"]' + + + :return: The ip_addresses of this IpMaxConnections. + :rtype: list[str] + """ + return self._ip_addresses + + @ip_addresses.setter + def ip_addresses(self, ip_addresses): + """ + Sets the ip_addresses of this IpMaxConnections. + Each element in the list should be valid IPv4 or IPv6 CIDR Block address. + Example: '[\"129.213.176.0/24\", \"150.136.187.0/24\", \"2002::1234:abcd:ffff:c0a8:101/64\"]' + + + :param ip_addresses: The ip_addresses of this IpMaxConnections. + :type: list[str] + """ + self._ip_addresses = ip_addresses + + @property + def max_connections(self): + """ + **[Required]** Gets the max_connections of this IpMaxConnections. + The max number of connections that the specified IPs can make to the Listener. + + + :return: The max_connections of this IpMaxConnections. + :rtype: int + """ + return self._max_connections + + @max_connections.setter + def max_connections(self, max_connections): + """ + Sets the max_connections of this IpMaxConnections. + The max number of connections that the specified IPs can make to the Listener. + + + :param max_connections: The max_connections of this IpMaxConnections. + :type: int + """ + self._max_connections = max_connections + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/load_balancer/models/load_balancer.py b/src/oci/load_balancer/models/load_balancer.py index c45599ea91..23c2e5c58d 100644 --- a/src/oci/load_balancer/models/load_balancer.py +++ b/src/oci/load_balancer/models/load_balancer.py @@ -92,6 +92,10 @@ def __init__(self, **kwargs): The value to assign to the is_private property of this LoadBalancer. :type is_private: bool + :param is_delete_protection_enabled: + The value to assign to the is_delete_protection_enabled property of this LoadBalancer. + :type is_delete_protection_enabled: bool + :param subnet_ids: The value to assign to the subnet_ids property of this LoadBalancer. :type subnet_ids: list[str] @@ -155,6 +159,7 @@ def __init__(self, **kwargs): 'shape_name': 'str', 'shape_details': 'ShapeDetails', 'is_private': 'bool', + 'is_delete_protection_enabled': 'bool', 'subnet_ids': 'list[str]', 'network_security_group_ids': 'list[str]', 'listeners': 'dict(str, Listener)', @@ -180,6 +185,7 @@ def __init__(self, **kwargs): 'shape_name': 'shapeName', 'shape_details': 'shapeDetails', 'is_private': 'isPrivate', + 'is_delete_protection_enabled': 'isDeleteProtectionEnabled', 'subnet_ids': 'subnetIds', 'network_security_group_ids': 'networkSecurityGroupIds', 'listeners': 'listeners', @@ -204,6 +210,7 @@ def __init__(self, **kwargs): self._shape_name = None self._shape_details = None self._is_private = None + self._is_delete_protection_enabled = None self._subnet_ids = None self._network_security_group_ids = None self._listeners = None @@ -486,6 +493,44 @@ def is_private(self, is_private): """ self._is_private = is_private + @property + def is_delete_protection_enabled(self): + """ + Gets the is_delete_protection_enabled of this LoadBalancer. + Whether or not the load balancer has delete protection enabled. + + If \"true\", the loadbalancer will be protected against deletion if configured to accept traffic. + + If \"false\", the loadbalancer will not be protected against deletion. + + Delete protection is not be enabled unless this field is set to \"true\". + Example: `true` + + + :return: The is_delete_protection_enabled of this LoadBalancer. + :rtype: bool + """ + return self._is_delete_protection_enabled + + @is_delete_protection_enabled.setter + def is_delete_protection_enabled(self, is_delete_protection_enabled): + """ + Sets the is_delete_protection_enabled of this LoadBalancer. + Whether or not the load balancer has delete protection enabled. + + If \"true\", the loadbalancer will be protected against deletion if configured to accept traffic. + + If \"false\", the loadbalancer will not be protected against deletion. + + Delete protection is not be enabled unless this field is set to \"true\". + Example: `true` + + + :param is_delete_protection_enabled: The is_delete_protection_enabled of this LoadBalancer. + :type: bool + """ + self._is_delete_protection_enabled = is_delete_protection_enabled + @property def subnet_ids(self): """ diff --git a/src/oci/load_balancer/models/redirect_rule.py b/src/oci/load_balancer/models/redirect_rule.py index 4aed67bd5d..2b2d655b80 100644 --- a/src/oci/load_balancer/models/redirect_rule.py +++ b/src/oci/load_balancer/models/redirect_rule.py @@ -34,7 +34,7 @@ def __init__(self, **kwargs): :param action: The value to assign to the action property of this RedirectRule. - Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER" + Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", "IP_BASED_MAX_CONNECTIONS" :type action: str :param response_code: diff --git a/src/oci/load_balancer/models/remove_http_request_header_rule.py b/src/oci/load_balancer/models/remove_http_request_header_rule.py index 0c8668fa44..1d8c20cbcc 100644 --- a/src/oci/load_balancer/models/remove_http_request_header_rule.py +++ b/src/oci/load_balancer/models/remove_http_request_header_rule.py @@ -27,7 +27,7 @@ def __init__(self, **kwargs): :param action: The value to assign to the action property of this RemoveHttpRequestHeaderRule. - Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER" + Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", "IP_BASED_MAX_CONNECTIONS" :type action: str :param header: diff --git a/src/oci/load_balancer/models/remove_http_response_header_rule.py b/src/oci/load_balancer/models/remove_http_response_header_rule.py index 8949d2d466..2acc536eff 100644 --- a/src/oci/load_balancer/models/remove_http_response_header_rule.py +++ b/src/oci/load_balancer/models/remove_http_response_header_rule.py @@ -29,7 +29,7 @@ def __init__(self, **kwargs): :param action: The value to assign to the action property of this RemoveHttpResponseHeaderRule. - Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER" + Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", "IP_BASED_MAX_CONNECTIONS" :type action: str :param header: diff --git a/src/oci/load_balancer/models/reserved_ip.py b/src/oci/load_balancer/models/reserved_ip.py index eadbb2bace..c1b2d5624d 100644 --- a/src/oci/load_balancer/models/reserved_ip.py +++ b/src/oci/load_balancer/models/reserved_ip.py @@ -39,6 +39,17 @@ def __init__(self, **kwargs): def id(self): """ Gets the id of this ReservedIP. + Ocid of the Reserved IP/Public Ip created with VCN. + + Reserved IPs are IPs which already registered using VCN API. + + Create a reserved Public IP and then while creating the load balancer pass the ocid of the reserved IP in this + field reservedIp to attach the Ip to Load balancer. Load balancer will be configured to listen to traffic on this IP. + + Reserved IPs will not be deleted when the Load balancer is deleted. They will be unattached from the Load balancer. + + Example: \"ocid1.publicip.oc1.phx.unique_ID\" + :return: The id of this ReservedIP. :rtype: str @@ -49,6 +60,17 @@ def id(self): def id(self, id): """ Sets the id of this ReservedIP. + Ocid of the Reserved IP/Public Ip created with VCN. + + Reserved IPs are IPs which already registered using VCN API. + + Create a reserved Public IP and then while creating the load balancer pass the ocid of the reserved IP in this + field reservedIp to attach the Ip to Load balancer. Load balancer will be configured to listen to traffic on this IP. + + Reserved IPs will not be deleted when the Load balancer is deleted. They will be unattached from the Load balancer. + + Example: \"ocid1.publicip.oc1.phx.unique_ID\" + :param id: The id of this ReservedIP. :type: str diff --git a/src/oci/load_balancer/models/rule.py b/src/oci/load_balancer/models/rule.py index 110dbc398d..af86f7adbd 100644 --- a/src/oci/load_balancer/models/rule.py +++ b/src/oci/load_balancer/models/rule.py @@ -55,6 +55,10 @@ class Rule(object): #: This constant has a value of "HTTP_HEADER" ACTION_HTTP_HEADER = "HTTP_HEADER" + #: A constant which can be used with the action property of a Rule. + #: This constant has a value of "IP_BASED_MAX_CONNECTIONS" + ACTION_IP_BASED_MAX_CONNECTIONS = "IP_BASED_MAX_CONNECTIONS" + def __init__(self, **kwargs): """ Initializes a new Rule object with values from keyword arguments. This class has the following subclasses and if you are using this class as input @@ -67,6 +71,7 @@ def __init__(self, **kwargs): * :class:`~oci.load_balancer.models.RemoveHttpResponseHeaderRule` * :class:`~oci.load_balancer.models.ControlAccessUsingHttpMethodsRule` * :class:`~oci.load_balancer.models.AllowRule` + * :class:`~oci.load_balancer.models.IpBasedMaxConnectionsRule` * :class:`~oci.load_balancer.models.HttpHeaderRule` * :class:`~oci.load_balancer.models.AddHttpResponseHeaderRule` * :class:`~oci.load_balancer.models.ExtendHttpResponseHeaderValueRule` @@ -75,7 +80,7 @@ def __init__(self, **kwargs): :param action: The value to assign to the action property of this Rule. - Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", "IP_BASED_MAX_CONNECTIONS", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type action: str @@ -119,6 +124,9 @@ def get_subtype(object_dictionary): if type == 'ALLOW': return 'AllowRule' + if type == 'IP_BASED_MAX_CONNECTIONS': + return 'IpBasedMaxConnectionsRule' + if type == 'HTTP_HEADER': return 'HttpHeaderRule' @@ -134,7 +142,7 @@ def get_subtype(object_dictionary): def action(self): """ **[Required]** Gets the action of this Rule. - Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", "IP_BASED_MAX_CONNECTIONS", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -151,7 +159,7 @@ def action(self, action): :param action: The action of this Rule. :type: str """ - allowed_values = ["ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER"] + allowed_values = ["ADD_HTTP_REQUEST_HEADER", "EXTEND_HTTP_REQUEST_HEADER_VALUE", "REMOVE_HTTP_REQUEST_HEADER", "ADD_HTTP_RESPONSE_HEADER", "EXTEND_HTTP_RESPONSE_HEADER_VALUE", "REMOVE_HTTP_RESPONSE_HEADER", "ALLOW", "CONTROL_ACCESS_USING_HTTP_METHODS", "REDIRECT", "HTTP_HEADER", "IP_BASED_MAX_CONNECTIONS"] if not value_allowed_none_or_none_sentinel(action, allowed_values): action = 'UNKNOWN_ENUM_VALUE' self._action = action diff --git a/src/oci/load_balancer/models/ssl_cipher_suite.py b/src/oci/load_balancer/models/ssl_cipher_suite.py index e0c6c75b75..68b0655caf 100644 --- a/src/oci/load_balancer/models/ssl_cipher_suite.py +++ b/src/oci/load_balancer/models/ssl_cipher_suite.py @@ -191,9 +191,9 @@ class SSLCipherSuite(object): * __oci-default-http2-tls-13-ssl-cipher-suite-v1__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" * __oci-default-http2-tls-12-13-ssl-cipher-suite-v1__ @@ -203,21 +203,21 @@ class SSLCipherSuite(object): \"ECDHE-ECDSA-AES128-GCM-SHA256\" \"DHE-RSA-AES256-GCM-SHA384\" \"DHE-RSA-AES128-GCM-SHA256\" - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" * __oci-tls-13-recommended-ssl-cipher-suite-v1__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" * __oci-tls-12-13-wider-ssl-cipher-suite-v1__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" \"ECDHE-ECDSA-AES128-GCM-SHA256\" \"ECDHE-RSA-AES128-GCM-SHA256\" \"ECDHE-ECDSA-AES128-SHA256\" @@ -232,9 +232,9 @@ class SSLCipherSuite(object): \"AES256-SHA256\" * __oci-tls-11-12-13-wider-ssl-cipher-suite-v1__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" \"ECDHE-ECDSA-AES128-GCM-SHA256\" \"ECDHE-RSA-AES128-GCM-SHA256\" \"ECDHE-ECDSA-AES128-SHA256\" @@ -353,11 +353,11 @@ def ciphers(self): * __TLSv1.3 ciphers__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" - \"TLS-AES-128-CCM-SHA256\" - \"TLS-AES-128-CCM-8-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" + \"TLS_AES_128_CCM_SHA256\" + \"TLS_AES_128_CCM_8_SHA256\" * __TLSv1.2 ciphers__ @@ -478,11 +478,11 @@ def ciphers(self, ciphers): * __TLSv1.3 ciphers__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" - \"TLS-AES-128-CCM-SHA256\" - \"TLS-AES-128-CCM-8-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" + \"TLS_AES_128_CCM_SHA256\" + \"TLS_AES_128_CCM_8_SHA256\" * __TLSv1.2 ciphers__ diff --git a/src/oci/load_balancer/models/ssl_cipher_suite_details.py b/src/oci/load_balancer/models/ssl_cipher_suite_details.py index 004917568b..92c9bf98c1 100644 --- a/src/oci/load_balancer/models/ssl_cipher_suite_details.py +++ b/src/oci/load_balancer/models/ssl_cipher_suite_details.py @@ -191,9 +191,9 @@ class SSLCipherSuiteDetails(object): * __oci-default-http2-tls-13-ssl-cipher-suite-v1__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" * __oci-default-http2-tls-12-13-ssl-cipher-suite-v1__ @@ -203,21 +203,21 @@ class SSLCipherSuiteDetails(object): \"ECDHE-ECDSA-AES128-GCM-SHA256\" \"DHE-RSA-AES256-GCM-SHA384\" \"DHE-RSA-AES128-GCM-SHA256\" - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" * __oci-tls-13-recommended-ssl-cipher-suite-v1__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" * __oci-tls-12-13-wider-ssl-cipher-suite-v1__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" \"ECDHE-ECDSA-AES128-GCM-SHA256\" \"ECDHE-RSA-AES128-GCM-SHA256\" \"ECDHE-ECDSA-AES128-SHA256\" @@ -232,9 +232,9 @@ class SSLCipherSuiteDetails(object): \"AES256-SHA256\" * __oci-tls-11-12-13-wider-ssl-cipher-suite-v1__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" \"ECDHE-ECDSA-AES128-GCM-SHA256\" \"ECDHE-RSA-AES128-GCM-SHA256\" \"ECDHE-ECDSA-AES128-SHA256\" @@ -353,11 +353,11 @@ def ciphers(self): * __TLSv1.3 ciphers__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" - \"TLS-AES-128-CCM-SHA256\" - \"TLS-AES-128-CCM-8-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" + \"TLS_AES_128_CCM_SHA256\" + \"TLS_AES_128_CCM_8_SHA256\" * __TLSv1.2 ciphers__ @@ -478,11 +478,11 @@ def ciphers(self, ciphers): * __TLSv1.3 ciphers__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" - \"TLS-AES-128-CCM-SHA256\" - \"TLS-AES-128-CCM-8-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" + \"TLS_AES_128_CCM_SHA256\" + \"TLS_AES_128_CCM_8_SHA256\" * __TLSv1.2 ciphers__ diff --git a/src/oci/load_balancer/models/update_backend_details.py b/src/oci/load_balancer/models/update_backend_details.py index 564321ce96..0451374c2d 100644 --- a/src/oci/load_balancer/models/update_backend_details.py +++ b/src/oci/load_balancer/models/update_backend_details.py @@ -24,6 +24,10 @@ def __init__(self, **kwargs): The value to assign to the weight property of this UpdateBackendDetails. :type weight: int + :param max_connections: + The value to assign to the max_connections property of this UpdateBackendDetails. + :type max_connections: int + :param backup: The value to assign to the backup property of this UpdateBackendDetails. :type backup: bool @@ -39,6 +43,7 @@ def __init__(self, **kwargs): """ self.swagger_types = { 'weight': 'int', + 'max_connections': 'int', 'backup': 'bool', 'drain': 'bool', 'offline': 'bool' @@ -46,12 +51,14 @@ def __init__(self, **kwargs): self.attribute_map = { 'weight': 'weight', + 'max_connections': 'maxConnections', 'backup': 'backup', 'drain': 'drain', 'offline': 'offline' } self._weight = None + self._max_connections = None self._backup = None self._drain = None self._offline = None @@ -96,6 +103,34 @@ def weight(self, weight): """ self._weight = weight + @property + def max_connections(self): + """ + Gets the max_connections of this UpdateBackendDetails. + The maximum number of simultaneous connections the load balancer can make to the backend. + + Example: `300` + + + :return: The max_connections of this UpdateBackendDetails. + :rtype: int + """ + return self._max_connections + + @max_connections.setter + def max_connections(self, max_connections): + """ + Sets the max_connections of this UpdateBackendDetails. + The maximum number of simultaneous connections the load balancer can make to the backend. + + Example: `300` + + + :param max_connections: The max_connections of this UpdateBackendDetails. + :type: int + """ + self._max_connections = max_connections + @property def backup(self): """ diff --git a/src/oci/load_balancer/models/update_backend_set_details.py b/src/oci/load_balancer/models/update_backend_set_details.py index 08ec127413..837f22f587 100644 --- a/src/oci/load_balancer/models/update_backend_set_details.py +++ b/src/oci/load_balancer/models/update_backend_set_details.py @@ -38,6 +38,10 @@ def __init__(self, **kwargs): The value to assign to the backends property of this UpdateBackendSetDetails. :type backends: list[oci.load_balancer.models.BackendDetails] + :param backend_max_connections: + The value to assign to the backend_max_connections property of this UpdateBackendSetDetails. + :type backend_max_connections: int + :param health_checker: The value to assign to the health_checker property of this UpdateBackendSetDetails. :type health_checker: oci.load_balancer.models.HealthCheckerDetails @@ -58,6 +62,7 @@ def __init__(self, **kwargs): self.swagger_types = { 'policy': 'str', 'backends': 'list[BackendDetails]', + 'backend_max_connections': 'int', 'health_checker': 'HealthCheckerDetails', 'ssl_configuration': 'SSLConfigurationDetails', 'session_persistence_configuration': 'SessionPersistenceConfigurationDetails', @@ -67,6 +72,7 @@ def __init__(self, **kwargs): self.attribute_map = { 'policy': 'policy', 'backends': 'backends', + 'backend_max_connections': 'backendMaxConnections', 'health_checker': 'healthChecker', 'ssl_configuration': 'sslConfiguration', 'session_persistence_configuration': 'sessionPersistenceConfiguration', @@ -75,6 +81,7 @@ def __init__(self, **kwargs): self._policy = None self._backends = None + self._backend_max_connections = None self._health_checker = None self._ssl_configuration = None self._session_persistence_configuration = None @@ -130,6 +137,36 @@ def backends(self, backends): """ self._backends = backends + @property + def backend_max_connections(self): + """ + Gets the backend_max_connections of this UpdateBackendSetDetails. + The maximum number of simultaneous connections the load balancer can make to any backend + in the backend set unless the backend has its own maxConnections setting. + + Example: `300` + + + :return: The backend_max_connections of this UpdateBackendSetDetails. + :rtype: int + """ + return self._backend_max_connections + + @backend_max_connections.setter + def backend_max_connections(self, backend_max_connections): + """ + Sets the backend_max_connections of this UpdateBackendSetDetails. + The maximum number of simultaneous connections the load balancer can make to any backend + in the backend set unless the backend has its own maxConnections setting. + + Example: `300` + + + :param backend_max_connections: The backend_max_connections of this UpdateBackendSetDetails. + :type: int + """ + self._backend_max_connections = backend_max_connections + @property def health_checker(self): """ diff --git a/src/oci/load_balancer/models/update_load_balancer_details.py b/src/oci/load_balancer/models/update_load_balancer_details.py index f6b9519d95..28596d73d0 100644 --- a/src/oci/load_balancer/models/update_load_balancer_details.py +++ b/src/oci/load_balancer/models/update_load_balancer_details.py @@ -26,6 +26,10 @@ def __init__(self, **kwargs): The value to assign to the display_name property of this UpdateLoadBalancerDetails. :type display_name: str + :param is_delete_protection_enabled: + The value to assign to the is_delete_protection_enabled property of this UpdateLoadBalancerDetails. + :type is_delete_protection_enabled: bool + :param freeform_tags: The value to assign to the freeform_tags property of this UpdateLoadBalancerDetails. :type freeform_tags: dict(str, str) @@ -37,17 +41,20 @@ def __init__(self, **kwargs): """ self.swagger_types = { 'display_name': 'str', + 'is_delete_protection_enabled': 'bool', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'display_name': 'displayName', + 'is_delete_protection_enabled': 'isDeleteProtectionEnabled', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } self._display_name = None + self._is_delete_protection_enabled = None self._freeform_tags = None self._defined_tags = None @@ -81,6 +88,46 @@ def display_name(self, display_name): """ self._display_name = display_name + @property + def is_delete_protection_enabled(self): + """ + Gets the is_delete_protection_enabled of this UpdateLoadBalancerDetails. + Whether or not the load balancer has delete protection enabled. + + If \"true\", the loadbalancer will be protected against deletion if configured to accept traffic. + + If \"false\", the loadbalancer will not be protected against deletion. + + If null or unset, the value for delete protection will not be changed. + + Example: `true` + + + :return: The is_delete_protection_enabled of this UpdateLoadBalancerDetails. + :rtype: bool + """ + return self._is_delete_protection_enabled + + @is_delete_protection_enabled.setter + def is_delete_protection_enabled(self, is_delete_protection_enabled): + """ + Sets the is_delete_protection_enabled of this UpdateLoadBalancerDetails. + Whether or not the load balancer has delete protection enabled. + + If \"true\", the loadbalancer will be protected against deletion if configured to accept traffic. + + If \"false\", the loadbalancer will not be protected against deletion. + + If null or unset, the value for delete protection will not be changed. + + Example: `true` + + + :param is_delete_protection_enabled: The is_delete_protection_enabled of this UpdateLoadBalancerDetails. + :type: bool + """ + self._is_delete_protection_enabled = is_delete_protection_enabled + @property def freeform_tags(self): """ diff --git a/src/oci/load_balancer/models/update_load_balancer_shape_details.py b/src/oci/load_balancer/models/update_load_balancer_shape_details.py index dd1e67cccb..c20832e6b3 100644 --- a/src/oci/load_balancer/models/update_load_balancer_shape_details.py +++ b/src/oci/load_balancer/models/update_load_balancer_shape_details.py @@ -57,7 +57,7 @@ def shape_name(self): Example: `flexible` - * NOTE: Fixed shapes 10Mbps, 100Mbps, 400Mbps, 8000Mbps will be deprecated from May 2023. This api + * NOTE: Fixed shapes 10Mbps, 100Mbps, 400Mbps, 8000Mbps will be deprecated after May 2023. This api * will only support `Flexible` shape after that date. @@ -81,7 +81,7 @@ def shape_name(self, shape_name): Example: `flexible` - * NOTE: Fixed shapes 10Mbps, 100Mbps, 400Mbps, 8000Mbps will be deprecated from May 2023. This api + * NOTE: Fixed shapes 10Mbps, 100Mbps, 400Mbps, 8000Mbps will be deprecated after May 2023. This api * will only support `Flexible` shape after that date. diff --git a/src/oci/load_balancer/models/update_ssl_cipher_suite_details.py b/src/oci/load_balancer/models/update_ssl_cipher_suite_details.py index 36315f37de..3e24ae0886 100644 --- a/src/oci/load_balancer/models/update_ssl_cipher_suite_details.py +++ b/src/oci/load_balancer/models/update_ssl_cipher_suite_details.py @@ -47,11 +47,11 @@ def ciphers(self): * __TLSv1.3 ciphers__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" - \"TLS-AES-128-CCM-SHA256\" - \"TLS-AES-128-CCM-8-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" + \"TLS_AES_128_CCM_SHA256\" + \"TLS_AES_128_CCM_8_SHA256\" * __TLSv1.2 ciphers__ @@ -172,11 +172,11 @@ def ciphers(self, ciphers): * __TLSv1.3 ciphers__ - \"TLS-AES-128-GCM-SHA256\" - \"TLS-AES-256-GCM-SHA384\" - \"TLS-CHACHA20-POLY1305-SHA256\" - \"TLS-AES-128-CCM-SHA256\" - \"TLS-AES-128-CCM-8-SHA256\" + \"TLS_AES_128_GCM_SHA256\" + \"TLS_AES_256_GCM_SHA384\" + \"TLS_CHACHA20_POLY1305_SHA256\" + \"TLS_AES_128_CCM_SHA256\" + \"TLS_AES_128_CCM_8_SHA256\" * __TLSv1.2 ciphers__ diff --git a/src/oci/version.py b/src/oci/version.py index 162ee16f59..6b375c1579 100644 --- a/src/oci/version.py +++ b/src/oci/version.py @@ -2,4 +2,4 @@ # Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -__version__ = "2.126.1" +__version__ = "2.126.2"