From 98d720ecb3e4fcea9591542f11ee3593c33cfe61 Mon Sep 17 00:00:00 2001 From: bhagwatvyas Date: Tue, 29 Sep 2020 17:57:10 +0000 Subject: [PATCH] Releasing version 2.21.6 --- CHANGELOG.rst | 11 + docs/api/apigateway.rst | 9 + .../oci.apigateway.ApiGatewayClient.rst | 8 + ...ay.ApiGatewayClientCompositeOperations.rst | 8 + .../oci.apigateway.models.Certificate.rst | 11 + ...pigateway.models.CertificateCollection.rst | 11 + ...i.apigateway.models.CertificateSummary.rst | 11 + ...ls.ChangeCertificateCompartmentDetails.rst | 11 + ...ateway.models.CreateCertificateDetails.rst | 11 + .../oci.apigateway.models.IpAddress.rst | 11 + ...ateway.models.UpdateCertificateDetails.rst | 11 + docs/api/core.rst | 17 + ....models.AddPublicIpPoolCapacityDetails.rst | 11 + ...e.models.ByoipAllocatedRangeCollection.rst | 11 + ...core.models.ByoipAllocatedRangeSummary.rst | 11 + .../models/oci.core.models.ByoipRange.rst | 11 + .../oci.core.models.ByoipRangeCollection.rst | 11 + .../oci.core.models.ByoipRangeSummary.rst | 11 + ...els.ChangeByoipRangeCompartmentDetails.rst | 11 + ...s.ChangePublicIpPoolCompartmentDetails.rst | 11 + ...ci.core.models.CreateByoipRangeDetails.rst | 11 + ....core.models.CreatePublicIpPoolDetails.rst | 11 + .../models/oci.core.models.PublicIpPool.rst | 11 + ...oci.core.models.PublicIpPoolCollection.rst | 11 + .../oci.core.models.PublicIpPoolSummary.rst | 11 + ...dels.RemovePublicIpPoolCapacityDetails.rst | 11 + ...ci.core.models.UpdateByoipRangeDetails.rst | 11 + ...UpdateInstanceConsoleConnectionDetails.rst | 11 + ....core.models.UpdatePublicIpPoolDetails.rst | 11 + docs/api/landing.rst | 1 + examples/showoci/CHANGELOG.rst | 10 + examples/showoci/README.md | 10 +- examples/showoci/showoci.py | 15 +- examples/showoci/showoci_data.py | 32 + examples/showoci/showoci_output.py | 56 + examples/showoci/showoci_service.py | 280 ++- src/oci/apigateway/__init__.py | 4 +- src/oci/apigateway/api_gateway_client.py | 622 ++++++ ...api_gateway_client_composite_operations.py | 149 ++ src/oci/apigateway/gateway_client.py | 5 + src/oci/apigateway/models/__init__.py | 14 + src/oci/apigateway/models/certificate.py | 523 +++++ .../models/certificate_collection.py | 70 + .../apigateway/models/certificate_summary.py | 424 ++++ .../change_certificate_compartment_details.py | 76 + .../models/create_certificate_details.py | 292 +++ .../models/create_gateway_details.py | 35 + src/oci/apigateway/models/gateway.py | 66 + src/oci/apigateway/models/gateway_summary.py | 35 + src/oci/apigateway/models/ip_address.py | 70 + .../models/update_certificate_details.py | 162 ++ .../models/update_gateway_details.py | 35 + src/oci/apigateway/models/work_request.py | 18 +- src/oci/core/compute_client.py | 85 + .../compute_client_composite_operations.py | 41 + src/oci/core/models/__init__.py | 34 + .../add_public_ip_pool_capacity_details.py | 103 + .../byoip_allocated_range_collection.py | 70 + .../models/byoip_allocated_range_summary.py | 101 + src/oci/core/models/byoip_range.py | 560 +++++ src/oci/core/models/byoip_range_collection.py | 70 + src/oci/core/models/byoip_range_summary.py | 348 +++ .../change_byoip_range_compartment_details.py | 76 + ...ange_public_ip_pool_compartment_details.py | 76 + .../core/models/create_byoip_range_details.py | 218 ++ ...e_cluster_network_instance_pool_details.py | 14 +- .../core/models/create_nat_gateway_details.py | 39 +- .../core/models/create_public_ip_details.py | 35 +- .../models/create_public_ip_pool_details.py | 185 ++ .../core/models/image_memory_constraints.py | 10 +- src/oci/core/models/instance.py | 4 + .../models/instance_availability_config.py | 18 +- ...tance_configuration_availability_config.py | 18 +- ...e_configuration_launch_instance_details.py | 4 + ...ch_instance_availability_config_details.py | 18 +- .../core/models/launch_instance_details.py | 4 + src/oci/core/models/nat_gateway.py | 39 +- src/oci/core/models/public_ip.py | 35 +- src/oci/core/models/public_ip_pool.py | 345 +++ .../core/models/public_ip_pool_collection.py | 70 + src/oci/core/models/public_ip_pool_summary.py | 286 +++ .../remove_public_ip_pool_capacity_details.py | 72 + .../core/models/update_byoip_range_details.py | 154 ++ ...te_instance_availability_config_details.py | 18 +- ...ate_instance_console_connection_details.py | 121 + .../core/models/update_instance_details.py | 4 + .../models/update_public_ip_pool_details.py | 154 ++ .../update_volume_backup_policy_details.py | 2 +- src/oci/core/virtual_network_client.py | 1958 +++++++++++++++-- ...ual_network_client_composite_operations.py | 357 +++ .../object_storage/object_storage_client.py | 34 +- src/oci/version.py | 2 +- 92 files changed, 8843 insertions(+), 260 deletions(-) create mode 100644 docs/api/apigateway/client/oci.apigateway.ApiGatewayClient.rst create mode 100644 docs/api/apigateway/client/oci.apigateway.ApiGatewayClientCompositeOperations.rst create mode 100644 docs/api/apigateway/models/oci.apigateway.models.Certificate.rst create mode 100644 docs/api/apigateway/models/oci.apigateway.models.CertificateCollection.rst create mode 100644 docs/api/apigateway/models/oci.apigateway.models.CertificateSummary.rst create mode 100644 docs/api/apigateway/models/oci.apigateway.models.ChangeCertificateCompartmentDetails.rst create mode 100644 docs/api/apigateway/models/oci.apigateway.models.CreateCertificateDetails.rst create mode 100644 docs/api/apigateway/models/oci.apigateway.models.IpAddress.rst create mode 100644 docs/api/apigateway/models/oci.apigateway.models.UpdateCertificateDetails.rst create mode 100644 docs/api/core/models/oci.core.models.AddPublicIpPoolCapacityDetails.rst create mode 100644 docs/api/core/models/oci.core.models.ByoipAllocatedRangeCollection.rst create mode 100644 docs/api/core/models/oci.core.models.ByoipAllocatedRangeSummary.rst create mode 100644 docs/api/core/models/oci.core.models.ByoipRange.rst create mode 100644 docs/api/core/models/oci.core.models.ByoipRangeCollection.rst create mode 100644 docs/api/core/models/oci.core.models.ByoipRangeSummary.rst create mode 100644 docs/api/core/models/oci.core.models.ChangeByoipRangeCompartmentDetails.rst create mode 100644 docs/api/core/models/oci.core.models.ChangePublicIpPoolCompartmentDetails.rst create mode 100644 docs/api/core/models/oci.core.models.CreateByoipRangeDetails.rst create mode 100644 docs/api/core/models/oci.core.models.CreatePublicIpPoolDetails.rst create mode 100644 docs/api/core/models/oci.core.models.PublicIpPool.rst create mode 100644 docs/api/core/models/oci.core.models.PublicIpPoolCollection.rst create mode 100644 docs/api/core/models/oci.core.models.PublicIpPoolSummary.rst create mode 100644 docs/api/core/models/oci.core.models.RemovePublicIpPoolCapacityDetails.rst create mode 100644 docs/api/core/models/oci.core.models.UpdateByoipRangeDetails.rst create mode 100644 docs/api/core/models/oci.core.models.UpdateInstanceConsoleConnectionDetails.rst create mode 100644 docs/api/core/models/oci.core.models.UpdatePublicIpPoolDetails.rst create mode 100644 src/oci/apigateway/api_gateway_client.py create mode 100644 src/oci/apigateway/api_gateway_client_composite_operations.py create mode 100644 src/oci/apigateway/models/certificate.py create mode 100644 src/oci/apigateway/models/certificate_collection.py create mode 100644 src/oci/apigateway/models/certificate_summary.py create mode 100644 src/oci/apigateway/models/change_certificate_compartment_details.py create mode 100644 src/oci/apigateway/models/create_certificate_details.py create mode 100644 src/oci/apigateway/models/ip_address.py create mode 100644 src/oci/apigateway/models/update_certificate_details.py create mode 100644 src/oci/core/models/add_public_ip_pool_capacity_details.py create mode 100644 src/oci/core/models/byoip_allocated_range_collection.py create mode 100644 src/oci/core/models/byoip_allocated_range_summary.py create mode 100644 src/oci/core/models/byoip_range.py create mode 100644 src/oci/core/models/byoip_range_collection.py create mode 100644 src/oci/core/models/byoip_range_summary.py create mode 100644 src/oci/core/models/change_byoip_range_compartment_details.py create mode 100644 src/oci/core/models/change_public_ip_pool_compartment_details.py create mode 100644 src/oci/core/models/create_byoip_range_details.py create mode 100644 src/oci/core/models/create_public_ip_pool_details.py create mode 100644 src/oci/core/models/public_ip_pool.py create mode 100644 src/oci/core/models/public_ip_pool_collection.py create mode 100644 src/oci/core/models/public_ip_pool_summary.py create mode 100644 src/oci/core/models/remove_public_ip_pool_capacity_details.py create mode 100644 src/oci/core/models/update_byoip_range_details.py create mode 100644 src/oci/core/models/update_instance_console_connection_details.py create mode 100644 src/oci/core/models/update_public_ip_pool_details.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index cb77bf2162..de2c91d7b4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,17 @@ Change Log All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.21.6 - 2020-09-29 +==================== + +Added +----- +* Support for specifying custom content dispositions when downloading objects in the Object Storage service +* Support for the “bring your own IP address” feature in the Virtual Networking service +* Support for updating the tags of instance console connections in the Compute service +* Support for custom SSL certificates on gateways in the API Gateway service + ==================== 2.21.5 - 2020-09-22 ==================== diff --git a/docs/api/apigateway.rst b/docs/api/apigateway.rst index 9bd3788f6d..466884d87a 100644 --- a/docs/api/apigateway.rst +++ b/docs/api/apigateway.rst @@ -6,9 +6,11 @@ Apigateway :nosignatures: :template: autosummary/service_client.rst + oci.apigateway.ApiGatewayClient oci.apigateway.DeploymentClient oci.apigateway.GatewayClient oci.apigateway.WorkRequestsClient + oci.apigateway.ApiGatewayClientCompositeOperations oci.apigateway.DeploymentClientCompositeOperations oci.apigateway.GatewayClientCompositeOperations oci.apigateway.WorkRequestsClientCompositeOperations @@ -34,9 +36,14 @@ Apigateway oci.apigateway.models.ApiSpecificationRouteResponsePolicies oci.apigateway.models.AuthenticationOnlyRouteAuthorizationPolicy oci.apigateway.models.AuthenticationPolicy + oci.apigateway.models.Certificate + oci.apigateway.models.CertificateCollection + oci.apigateway.models.CertificateSummary + oci.apigateway.models.ChangeCertificateCompartmentDetails oci.apigateway.models.ChangeDeploymentCompartmentDetails oci.apigateway.models.ChangeGatewayCompartmentDetails oci.apigateway.models.CorsPolicy + oci.apigateway.models.CreateCertificateDetails oci.apigateway.models.CreateDeploymentDetails oci.apigateway.models.CreateGatewayDetails oci.apigateway.models.CustomAuthenticationPolicy @@ -54,6 +61,7 @@ Apigateway oci.apigateway.models.HTTPBackend oci.apigateway.models.HeaderFieldSpecification oci.apigateway.models.HeaderTransformationPolicy + oci.apigateway.models.IpAddress oci.apigateway.models.JsonWebKey oci.apigateway.models.JsonWebTokenClaim oci.apigateway.models.JwtAuthenticationPolicy @@ -75,6 +83,7 @@ Apigateway oci.apigateway.models.StaticPublicKey oci.apigateway.models.StaticPublicKeySet oci.apigateway.models.StockResponseBackend + oci.apigateway.models.UpdateCertificateDetails oci.apigateway.models.UpdateDeploymentDetails oci.apigateway.models.UpdateGatewayDetails oci.apigateway.models.WorkRequest diff --git a/docs/api/apigateway/client/oci.apigateway.ApiGatewayClient.rst b/docs/api/apigateway/client/oci.apigateway.ApiGatewayClient.rst new file mode 100644 index 0000000000..7591f878d4 --- /dev/null +++ b/docs/api/apigateway/client/oci.apigateway.ApiGatewayClient.rst @@ -0,0 +1,8 @@ +ApiGatewayClient +================ + +.. currentmodule:: oci.apigateway + +.. autoclass:: ApiGatewayClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/apigateway/client/oci.apigateway.ApiGatewayClientCompositeOperations.rst b/docs/api/apigateway/client/oci.apigateway.ApiGatewayClientCompositeOperations.rst new file mode 100644 index 0000000000..d984e7ca43 --- /dev/null +++ b/docs/api/apigateway/client/oci.apigateway.ApiGatewayClientCompositeOperations.rst @@ -0,0 +1,8 @@ +ApiGatewayClientCompositeOperations +=================================== + +.. currentmodule:: oci.apigateway + +.. autoclass:: ApiGatewayClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/apigateway/models/oci.apigateway.models.Certificate.rst b/docs/api/apigateway/models/oci.apigateway.models.Certificate.rst new file mode 100644 index 0000000000..ab62f6763f --- /dev/null +++ b/docs/api/apigateway/models/oci.apigateway.models.Certificate.rst @@ -0,0 +1,11 @@ +Certificate +=========== + +.. currentmodule:: oci.apigateway.models + +.. autoclass:: Certificate + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apigateway/models/oci.apigateway.models.CertificateCollection.rst b/docs/api/apigateway/models/oci.apigateway.models.CertificateCollection.rst new file mode 100644 index 0000000000..636c82b76b --- /dev/null +++ b/docs/api/apigateway/models/oci.apigateway.models.CertificateCollection.rst @@ -0,0 +1,11 @@ +CertificateCollection +===================== + +.. currentmodule:: oci.apigateway.models + +.. autoclass:: CertificateCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apigateway/models/oci.apigateway.models.CertificateSummary.rst b/docs/api/apigateway/models/oci.apigateway.models.CertificateSummary.rst new file mode 100644 index 0000000000..5f3ce9e22a --- /dev/null +++ b/docs/api/apigateway/models/oci.apigateway.models.CertificateSummary.rst @@ -0,0 +1,11 @@ +CertificateSummary +================== + +.. currentmodule:: oci.apigateway.models + +.. autoclass:: CertificateSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apigateway/models/oci.apigateway.models.ChangeCertificateCompartmentDetails.rst b/docs/api/apigateway/models/oci.apigateway.models.ChangeCertificateCompartmentDetails.rst new file mode 100644 index 0000000000..89aa4674de --- /dev/null +++ b/docs/api/apigateway/models/oci.apigateway.models.ChangeCertificateCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeCertificateCompartmentDetails +=================================== + +.. currentmodule:: oci.apigateway.models + +.. autoclass:: ChangeCertificateCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apigateway/models/oci.apigateway.models.CreateCertificateDetails.rst b/docs/api/apigateway/models/oci.apigateway.models.CreateCertificateDetails.rst new file mode 100644 index 0000000000..04b18c1830 --- /dev/null +++ b/docs/api/apigateway/models/oci.apigateway.models.CreateCertificateDetails.rst @@ -0,0 +1,11 @@ +CreateCertificateDetails +======================== + +.. currentmodule:: oci.apigateway.models + +.. autoclass:: CreateCertificateDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apigateway/models/oci.apigateway.models.IpAddress.rst b/docs/api/apigateway/models/oci.apigateway.models.IpAddress.rst new file mode 100644 index 0000000000..56bd4981fd --- /dev/null +++ b/docs/api/apigateway/models/oci.apigateway.models.IpAddress.rst @@ -0,0 +1,11 @@ +IpAddress +========= + +.. currentmodule:: oci.apigateway.models + +.. autoclass:: IpAddress + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/apigateway/models/oci.apigateway.models.UpdateCertificateDetails.rst b/docs/api/apigateway/models/oci.apigateway.models.UpdateCertificateDetails.rst new file mode 100644 index 0000000000..944262ccef --- /dev/null +++ b/docs/api/apigateway/models/oci.apigateway.models.UpdateCertificateDetails.rst @@ -0,0 +1,11 @@ +UpdateCertificateDetails +======================== + +.. currentmodule:: oci.apigateway.models + +.. autoclass:: UpdateCertificateDetails + :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 7cfce36c92..0867866a31 100644 --- a/docs/api/core.rst +++ b/docs/api/core.rst @@ -26,6 +26,7 @@ Core Services oci.core.models.AddImageShapeCompatibilityEntryDetails oci.core.models.AddNetworkSecurityGroupSecurityRulesDetails + oci.core.models.AddPublicIpPoolCapacityDetails oci.core.models.AddSecurityRuleDetails oci.core.models.AddedNetworkSecurityGroupSecurityRules oci.core.models.AppCatalogListing @@ -54,9 +55,15 @@ Core Services oci.core.models.BootVolumeSourceFromBootVolumeDetails oci.core.models.BulkAddVirtualCircuitPublicPrefixesDetails oci.core.models.BulkDeleteVirtualCircuitPublicPrefixesDetails + oci.core.models.ByoipAllocatedRangeCollection + oci.core.models.ByoipAllocatedRangeSummary + oci.core.models.ByoipRange + oci.core.models.ByoipRangeCollection + oci.core.models.ByoipRangeSummary oci.core.models.CaptureConsoleHistoryDetails oci.core.models.ChangeBootVolumeBackupCompartmentDetails oci.core.models.ChangeBootVolumeCompartmentDetails + oci.core.models.ChangeByoipRangeCompartmentDetails oci.core.models.ChangeClusterNetworkCompartmentDetails oci.core.models.ChangeComputeImageCapabilitySchemaCompartmentDetails oci.core.models.ChangeCpeCompartmentDetails @@ -75,6 +82,7 @@ Core Services oci.core.models.ChangeNatGatewayCompartmentDetails oci.core.models.ChangeNetworkSecurityGroupCompartmentDetails oci.core.models.ChangePublicIpCompartmentDetails + oci.core.models.ChangePublicIpPoolCompartmentDetails oci.core.models.ChangeRemotePeeringConnectionCompartmentDetails oci.core.models.ChangeRouteTableCompartmentDetails oci.core.models.ChangeSecurityListCompartmentDetails @@ -111,6 +119,7 @@ Core Services oci.core.models.CreateAppCatalogSubscriptionDetails oci.core.models.CreateBootVolumeBackupDetails oci.core.models.CreateBootVolumeDetails + oci.core.models.CreateByoipRangeDetails oci.core.models.CreateClusterNetworkDetails oci.core.models.CreateClusterNetworkInstancePoolDetails oci.core.models.CreateComputeImageCapabilitySchemaDetails @@ -138,6 +147,7 @@ Core Services oci.core.models.CreateNetworkSecurityGroupDetails oci.core.models.CreatePrivateIpDetails oci.core.models.CreatePublicIpDetails + oci.core.models.CreatePublicIpPoolDetails oci.core.models.CreateRemotePeeringConnectionDetails oci.core.models.CreateRouteTableDetails oci.core.models.CreateSecurityListDetails @@ -258,8 +268,12 @@ Core Services oci.core.models.PortRange oci.core.models.PrivateIp oci.core.models.PublicIp + oci.core.models.PublicIpPool + oci.core.models.PublicIpPoolCollection + oci.core.models.PublicIpPoolSummary oci.core.models.RemotePeeringConnection oci.core.models.RemoveNetworkSecurityGroupSecurityRulesDetails + oci.core.models.RemovePublicIpPoolCapacityDetails oci.core.models.RouteRule oci.core.models.RouteTable oci.core.models.SecurityList @@ -282,6 +296,7 @@ Core Services oci.core.models.UpdateBootVolumeBackupDetails oci.core.models.UpdateBootVolumeDetails oci.core.models.UpdateBootVolumeKmsKeyDetails + oci.core.models.UpdateByoipRangeDetails oci.core.models.UpdateClusterNetworkDetails oci.core.models.UpdateComputeImageCapabilitySchemaDetails oci.core.models.UpdateConsoleHistoryDetails @@ -300,6 +315,7 @@ Core Services oci.core.models.UpdateInstanceAgentConfigDetails oci.core.models.UpdateInstanceAvailabilityConfigDetails oci.core.models.UpdateInstanceConfigurationDetails + oci.core.models.UpdateInstanceConsoleConnectionDetails oci.core.models.UpdateInstanceDetails oci.core.models.UpdateInstancePoolDetails oci.core.models.UpdateInstancePoolPlacementConfigurationDetails @@ -313,6 +329,7 @@ Core Services oci.core.models.UpdateNetworkSecurityGroupSecurityRulesDetails oci.core.models.UpdatePrivateIpDetails oci.core.models.UpdatePublicIpDetails + oci.core.models.UpdatePublicIpPoolDetails oci.core.models.UpdateRemotePeeringConnectionDetails oci.core.models.UpdateRouteTableDetails oci.core.models.UpdateSecurityListDetails diff --git a/docs/api/core/models/oci.core.models.AddPublicIpPoolCapacityDetails.rst b/docs/api/core/models/oci.core.models.AddPublicIpPoolCapacityDetails.rst new file mode 100644 index 0000000000..6f17ec84ad --- /dev/null +++ b/docs/api/core/models/oci.core.models.AddPublicIpPoolCapacityDetails.rst @@ -0,0 +1,11 @@ +AddPublicIpPoolCapacityDetails +============================== + +.. currentmodule:: oci.core.models + +.. autoclass:: AddPublicIpPoolCapacityDetails + :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.ByoipAllocatedRangeCollection.rst b/docs/api/core/models/oci.core.models.ByoipAllocatedRangeCollection.rst new file mode 100644 index 0000000000..93ee0841f0 --- /dev/null +++ b/docs/api/core/models/oci.core.models.ByoipAllocatedRangeCollection.rst @@ -0,0 +1,11 @@ +ByoipAllocatedRangeCollection +============================= + +.. currentmodule:: oci.core.models + +.. autoclass:: ByoipAllocatedRangeCollection + :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.ByoipAllocatedRangeSummary.rst b/docs/api/core/models/oci.core.models.ByoipAllocatedRangeSummary.rst new file mode 100644 index 0000000000..5291e936a5 --- /dev/null +++ b/docs/api/core/models/oci.core.models.ByoipAllocatedRangeSummary.rst @@ -0,0 +1,11 @@ +ByoipAllocatedRangeSummary +========================== + +.. currentmodule:: oci.core.models + +.. autoclass:: ByoipAllocatedRangeSummary + :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.ByoipRange.rst b/docs/api/core/models/oci.core.models.ByoipRange.rst new file mode 100644 index 0000000000..6f359eaa5b --- /dev/null +++ b/docs/api/core/models/oci.core.models.ByoipRange.rst @@ -0,0 +1,11 @@ +ByoipRange +========== + +.. currentmodule:: oci.core.models + +.. autoclass:: ByoipRange + :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.ByoipRangeCollection.rst b/docs/api/core/models/oci.core.models.ByoipRangeCollection.rst new file mode 100644 index 0000000000..7056fedb85 --- /dev/null +++ b/docs/api/core/models/oci.core.models.ByoipRangeCollection.rst @@ -0,0 +1,11 @@ +ByoipRangeCollection +==================== + +.. currentmodule:: oci.core.models + +.. autoclass:: ByoipRangeCollection + :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.ByoipRangeSummary.rst b/docs/api/core/models/oci.core.models.ByoipRangeSummary.rst new file mode 100644 index 0000000000..7750d3e07b --- /dev/null +++ b/docs/api/core/models/oci.core.models.ByoipRangeSummary.rst @@ -0,0 +1,11 @@ +ByoipRangeSummary +================= + +.. currentmodule:: oci.core.models + +.. autoclass:: ByoipRangeSummary + :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.ChangeByoipRangeCompartmentDetails.rst b/docs/api/core/models/oci.core.models.ChangeByoipRangeCompartmentDetails.rst new file mode 100644 index 0000000000..ecd2717576 --- /dev/null +++ b/docs/api/core/models/oci.core.models.ChangeByoipRangeCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeByoipRangeCompartmentDetails +================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: ChangeByoipRangeCompartmentDetails + :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.ChangePublicIpPoolCompartmentDetails.rst b/docs/api/core/models/oci.core.models.ChangePublicIpPoolCompartmentDetails.rst new file mode 100644 index 0000000000..063dc5f834 --- /dev/null +++ b/docs/api/core/models/oci.core.models.ChangePublicIpPoolCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangePublicIpPoolCompartmentDetails +==================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: ChangePublicIpPoolCompartmentDetails + :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.CreateByoipRangeDetails.rst b/docs/api/core/models/oci.core.models.CreateByoipRangeDetails.rst new file mode 100644 index 0000000000..070e3070b4 --- /dev/null +++ b/docs/api/core/models/oci.core.models.CreateByoipRangeDetails.rst @@ -0,0 +1,11 @@ +CreateByoipRangeDetails +======================= + +.. currentmodule:: oci.core.models + +.. autoclass:: CreateByoipRangeDetails + :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.CreatePublicIpPoolDetails.rst b/docs/api/core/models/oci.core.models.CreatePublicIpPoolDetails.rst new file mode 100644 index 0000000000..91bfc37f69 --- /dev/null +++ b/docs/api/core/models/oci.core.models.CreatePublicIpPoolDetails.rst @@ -0,0 +1,11 @@ +CreatePublicIpPoolDetails +========================= + +.. currentmodule:: oci.core.models + +.. autoclass:: CreatePublicIpPoolDetails + :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.PublicIpPool.rst b/docs/api/core/models/oci.core.models.PublicIpPool.rst new file mode 100644 index 0000000000..086666e180 --- /dev/null +++ b/docs/api/core/models/oci.core.models.PublicIpPool.rst @@ -0,0 +1,11 @@ +PublicIpPool +============ + +.. currentmodule:: oci.core.models + +.. autoclass:: PublicIpPool + :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.PublicIpPoolCollection.rst b/docs/api/core/models/oci.core.models.PublicIpPoolCollection.rst new file mode 100644 index 0000000000..28a694620c --- /dev/null +++ b/docs/api/core/models/oci.core.models.PublicIpPoolCollection.rst @@ -0,0 +1,11 @@ +PublicIpPoolCollection +====================== + +.. currentmodule:: oci.core.models + +.. autoclass:: PublicIpPoolCollection + :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.PublicIpPoolSummary.rst b/docs/api/core/models/oci.core.models.PublicIpPoolSummary.rst new file mode 100644 index 0000000000..1bbe3bfa77 --- /dev/null +++ b/docs/api/core/models/oci.core.models.PublicIpPoolSummary.rst @@ -0,0 +1,11 @@ +PublicIpPoolSummary +=================== + +.. currentmodule:: oci.core.models + +.. autoclass:: PublicIpPoolSummary + :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.RemovePublicIpPoolCapacityDetails.rst b/docs/api/core/models/oci.core.models.RemovePublicIpPoolCapacityDetails.rst new file mode 100644 index 0000000000..babbf99b4f --- /dev/null +++ b/docs/api/core/models/oci.core.models.RemovePublicIpPoolCapacityDetails.rst @@ -0,0 +1,11 @@ +RemovePublicIpPoolCapacityDetails +================================= + +.. currentmodule:: oci.core.models + +.. autoclass:: RemovePublicIpPoolCapacityDetails + :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.UpdateByoipRangeDetails.rst b/docs/api/core/models/oci.core.models.UpdateByoipRangeDetails.rst new file mode 100644 index 0000000000..4970290c57 --- /dev/null +++ b/docs/api/core/models/oci.core.models.UpdateByoipRangeDetails.rst @@ -0,0 +1,11 @@ +UpdateByoipRangeDetails +======================= + +.. currentmodule:: oci.core.models + +.. autoclass:: UpdateByoipRangeDetails + :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.UpdateInstanceConsoleConnectionDetails.rst b/docs/api/core/models/oci.core.models.UpdateInstanceConsoleConnectionDetails.rst new file mode 100644 index 0000000000..2dcad995ea --- /dev/null +++ b/docs/api/core/models/oci.core.models.UpdateInstanceConsoleConnectionDetails.rst @@ -0,0 +1,11 @@ +UpdateInstanceConsoleConnectionDetails +====================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: UpdateInstanceConsoleConnectionDetails + :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.UpdatePublicIpPoolDetails.rst b/docs/api/core/models/oci.core.models.UpdatePublicIpPoolDetails.rst new file mode 100644 index 0000000000..ffd358e347 --- /dev/null +++ b/docs/api/core/models/oci.core.models.UpdatePublicIpPoolDetails.rst @@ -0,0 +1,11 @@ +UpdatePublicIpPoolDetails +========================= + +.. currentmodule:: oci.core.models + +.. autoclass:: UpdatePublicIpPoolDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/landing.rst b/docs/api/landing.rst index b54831062d..18bd6960f1 100644 --- a/docs/api/landing.rst +++ b/docs/api/landing.rst @@ -5,6 +5,7 @@ API Reference * :doc:`Analytics ` * :doc:`Announcement ` +* :doc:`Api Gateway ` * :doc:`Deployment ` * :doc:`Gateway ` * :doc:`Work Requests ` diff --git a/examples/showoci/CHANGELOG.rst b/examples/showoci/CHANGELOG.rst index cdd1a0c3f7..5734addea1 100755 --- a/examples/showoci/CHANGELOG.rst +++ b/examples/showoci/CHANGELOG.rst @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +===================== +20.09.22 - 20.09.22 +===================== +* Added Cloud Guard using -sec flag +* Added Logging using -sec flag + +===================== +20.09.01 - 20.09.01 +===================== +* Fixed Mysql error while mysql deployed to several regions ===================== 20.08.25 - 2020-08-25 diff --git a/examples/showoci/README.md b/examples/showoci/README.md index 22dc27ad8e..5b9518704b 100755 --- a/examples/showoci/README.md +++ b/examples/showoci/README.md @@ -47,6 +47,8 @@ Output can be printer friendly, CSV files or JSON file. - oci.dns.DnsClient - oci.events.EventsClient - oci.waas.WaasClient +- oci.cloud_guard.CloudGuardClient +- oci.logging.LoggingManagementClient ** DISCLAIMER – This is not an official Oracle application @@ -146,10 +148,9 @@ Execute ``` $ ./showoci.py -usage: showoci.py [-h] [-a] [-ani] [-an] [-api] [-b] [-c] [-cn] [-d] [-e] [-edge] [-f] [-fun] [-i] [-ic] [-isc] [-l] [-lq] [-m] [-n] [-o] - [-paas] [-dataai] [-rm] [-s] [-nobackups] [-so] [-mc] [-nr] [-ip] [-dt] [-t PROFILE] [-p PROXY] [-rg REGION] - [-cp COMPART] [-cpr COMPART_RECUR] [-cpath COMPARTPATH] [-tenantid TENANTID] [-cf CONFIG] [-csv CSV] [-jf JOUTFILE] - [-js] [-sjf SJOUTFILE] [-cachef SERVICEFILE] [-caches] [--version] +usage: showoci.py [-h] [-a] [-ani] [-an] [-api] [-b] [-c] [-cn] [-d] [-e] [-edge] [-f] [-fun] [-i] [-ic] [-isc] [-l] [-lq] [-m] [-n] [-o] [-paas] [-dataai] [-rm] [-s] [-sec] + [-nobackups] [-so] [-mc] [-nr] [-ip] [-dt] [-t PROFILE] [-p PROXY] [-rg REGION] [-cp COMPART] [-cpr COMPART_RECUR] [-cpath COMPARTPATH] [-tenantid TENANTID] + [-cf CONFIG] [-csv CSV] [-jf JOUTFILE] [-js] [-sjf SJOUTFILE] [-cachef SERVICEFILE] [-caches] [--version] optional arguments: -h, --help show this help message and exit @@ -177,6 +178,7 @@ optional arguments: -dataai Print - D.Science, D.Catalog, D.Flow, ODA and BDS -rm Print Resource management -s Print Streams + -sec Print Security and Logging -nobackups Do not process backups -so Print Summary Only -mc exclude ManagedCompartmentForPaaS diff --git a/examples/showoci/showoci.py b/examples/showoci/showoci.py index fe91fb136f..1e93636cfd 100755 --- a/examples/showoci/showoci.py +++ b/examples/showoci/showoci.py @@ -64,6 +64,8 @@ # - oci.bds.BdsClient # - oci.waas.WaasClient # - oci.mysql.DbSystemClient +# - oci.cloud_guard.CloudGuardClient +# - oci.logging.LoggingManagementClient # # Modules Not Yet Covered: # - oci.secrets.SecretsClient @@ -74,7 +76,10 @@ # - oci.data_safe.DataSafeClient # - oci.ocvp.EsxiHostClient and oci.ocvp.SddcClient # - oci.usage_api.UsageapiClient -# +# - oci.sch.ServiceConnectorClient +# - oci.os_management.OsManagementClient +# - oci.log_analytics.LogAnalyticsClient + ########################################################################## from __future__ import print_function from showoci_data import ShowOCIData @@ -86,7 +91,7 @@ import argparse import datetime -version = "20.08.25" +version = "20.09.22" ########################################################################## # check OCI version @@ -280,6 +285,7 @@ def set_parser_arguments(): parser.add_argument('-dataai', action='store_true', default=False, dest='data_ai', help='Print - D.Science, D.Catalog, D.Flow, ODA and BDS') parser.add_argument('-rm', action='store_true', default=False, dest='orm', help='Print Resource management') parser.add_argument('-s', action='store_true', default=False, dest='streams', help='Print Streams') + parser.add_argument('-sec', action='store_true', default=False, dest='security', help='Print Security and Logging') parser.add_argument('-nobackups', action='store_true', default=False, dest='skip_backups', help='Do not process backups') parser.add_argument('-so', action='store_true', default=False, dest='sumonly', help='Print Summary Only') @@ -313,7 +319,7 @@ def set_parser_arguments(): result.compute or result.object or result.load or result.database or result.file or result.email or result.orm or result.container or result.streams or result.budgets or result.monitoring or result.edge or result.announcement or result.limits or result.paas_native or - result.api or result.function or result.data_ai): + result.api or result.function or result.data_ai or result.security): parser.print_help() @@ -400,6 +406,9 @@ def set_service_extract_flags(cmd): if cmd.all or cmd.allnoiam or cmd.edge: prm.read_edge = True + if cmd.all or cmd.allnoiam or cmd.security: + prm.read_security = True + if cmd.noroot: prm.read_root_compartment = False diff --git a/examples/showoci/showoci_data.py b/examples/showoci/showoci_data.py index 646226014c..bbd8aa6644 100755 --- a/examples/showoci/showoci_data.py +++ b/examples/showoci/showoci_data.py @@ -325,6 +325,14 @@ def __get_oci_region_data(self, region_name): data['paas_services'] = value has_data = True + # security and logging services + if self.service.flags.read_security: + value = self.__get_security_main(region_name, compartment) + if value is not None: + if len(value) > 0: + data['security'] = value + has_data = True + # data ai if self.service.flags.read_data_ai: value = self.__get_data_ai_main(region_name, compartment) @@ -2741,6 +2749,30 @@ def __get_paas_native_main(self, region_name, compartment): self.__print_error("__get_paas_native_main", e) pass + ########################################################################## + # Security and Logging + ########################################################################## + + def __get_security_main(self, region_name, compartment): + try: + security_services = {} + + # cloud guard + cg = self.service.search_multi_items(self.service.C_SECURITY, self.service.C_SECURITY_CLOUD_GUARD, 'region_name', region_name, 'compartment_id', compartment['id']) + if cg: + security_services['cloud_guard'] = cg + + # logging + log = self.service.search_multi_items(self.service.C_SECURITY, self.service.C_SECURITY_LOGGING, 'region_name', region_name, 'compartment_id', compartment['id']) + if log: + security_services['logging'] = log + + return security_services + + except Exception as e: + self.__print_error("__get_security_main", e) + pass + ########################################################################## # Data AI ########################################################################## diff --git a/examples/showoci/showoci_output.py b/examples/showoci/showoci_output.py index f9995e5d7c..854ee22c29 100755 --- a/examples/showoci/showoci_output.py +++ b/examples/showoci/showoci_output.py @@ -1402,6 +1402,41 @@ def __print_paas_services_main(self, paas_services): except Exception as e: self.__print_error("__print_paas_services_main", e) + ########################################################################## + # Security + ########################################################################## + def __print_security_main(self, security): + + try: + if not security: + return + + # cloud guard + if 'cloud_guard' in security: + self.print_header("Cloud Guard", 2) + for val in security['cloud_guard']: + print(self.taba + val['display_name'] + ", (Target = " + val['target_resource_type'] + "), Created: " + val['time_created'][0:16] + " (" + val['lifecycle_state'] + "), Total Recipes : " + val['recipe_count']) + print("") + + # Logging + if 'logging' in security: + self.print_header("Logging Groups", 2) + for val in security['logging']: + print(self.taba + val['display_name'] + ", (" + val['description'] + "), Created: " + val['time_created'][0:16]) + for log in val['logs']: + print(self.taba + self.tabs + "Log: " + log['display_name'] + + ", Enabled = " + log['is_enabled'] + + ", " + log['source_service'] + + " (" + log['source_sourcetype'] + ")" + + ", Category = " + log['source_category'] + + ", Resource: " + str(log['source_resource'] + "..").split(".")[1] + + ", State: " + log['lifecycle_state'] + + ", Created: " + log['time_created'][0:16]) + print("") + + except Exception as e: + self.__print_error("__print_security_main", e) + ########################################################################## # Data AI ########################################################################## @@ -1806,6 +1841,8 @@ def __print_region_data(self, region_name, data): self.__print_quotas_main(cdata['quotas']) if 'paas_services' in cdata: self.__print_paas_services_main(cdata['paas_services']) + if 'security' in cdata: + self.__print_security_main(cdata['security']) if 'data_ai' in cdata: self.__print_data_ai(cdata['data_ai']) if 'apigateways' in cdata: @@ -1952,6 +1989,23 @@ def __summary_paas_services_main(self, paas_services): except Exception as e: self.__print_error("__summary_paas_services_main", e) + ########################################################################## + # security + ########################################################################## + def __summary_security(self, security): + + try: + if not security: + return + + if 'cloud_guard' in security: + self.__summary_core_size(security['cloud_guard']) + if 'logging' in security: + self.__summary_core_size(security['logging']) + + except Exception as e: + self.__print_error("__summary_security", e) + ########################################################################## # data ai services ########################################################################## @@ -2258,6 +2312,8 @@ def __summary_region_data(self, region_name, data): self.__summary_load_balancer_main(cdata['load_balancer']) if 'paas_services' in cdata: self.__summary_paas_services_main(cdata['paas_services']) + if 'security' in cdata: + self.__summary_security(cdata['security']) if 'data_ai' in cdata: self.__summary_data_ai_main(cdata['data_ai']) diff --git a/examples/showoci/showoci_service.py b/examples/showoci/showoci_service.py index fd9d51dbca..01c5380b65 100755 --- a/examples/showoci/showoci_service.py +++ b/examples/showoci/showoci_service.py @@ -48,6 +48,7 @@ class ShowOCIFlags(object): read_budgets = False read_monitoring_notifications = False read_edge = False + read_security = False read_announcement = False read_ManagedCompartmentForPaaS = True read_root_compartment = True @@ -111,7 +112,8 @@ def is_loop_on_compartments(self): self.read_limits or self.read_api or self.read_function or - self.read_data_ai) + self.read_data_ai or + self.read_security) ############################################ # check if to load basic network (vcn+subnets) @@ -131,7 +133,7 @@ def is_load_basic_network(self): # class ShowOCIService ########################################################################## class ShowOCIService(object): - oci_compatible_version = "2.18.0" + oci_compatible_version = "2.21.4" ########################################################################## # Global Constants @@ -288,6 +290,11 @@ class ShowOCIService(object): C_DATA_AI_ODA = "oda" C_DATA_AI_BDS = "bds" + # Security and Logging + C_SECURITY = "security" + C_SECURITY_CLOUD_GUARD = "cloud_guard" + C_SECURITY_LOGGING = "logging" + # Error flag and reboot migration error = 0 warning = 0 @@ -911,6 +918,10 @@ def __load_oci_region_data(self, region_name): if self.flags.read_function: self.__load_functions_main() + # Security and Logging + if self.flags.read_security: + self.__load_security_main() + et = time.time() - region_start_time print("*** Elapsed Region '" + region_name + "' - " + '{:02d}:{:02d}:{:02d}'.format(round(et // 3600), (round(et % 3600 // 60)), round(et % 60)) + " ***") @@ -6389,16 +6400,17 @@ def __load_database_mysql(self, mysql_client, compartments): databases = oci.pagination.list_call_get_all_results( mysql_client.list_db_systems, compartment['id'], - sort_by="displayName", - retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY + sort_by="displayName" ).data + # mysql throw service error often, ignoring incase it does except oci.exceptions.ServiceError as e: if self.__check_service_error(e.code): self.__load_print_auth_warning("m", False) continue else: - raise + print("e - " + str(e)) + return data # loop on auto # databases = oci.mysql.models.DbSystemSummary @@ -8903,3 +8915,261 @@ def __load_quotas(self, quotas_client, compartments): except Exception as e: self.__print_error("__load_quotas", e) return data + + ########################################################################## + # __load_security_main + ########################################################################## + # + # OCI Classes used: + # + # oci.cloud_guard.CloudGuardClient(config, **kwargs) + # oci.logging.LoggingManagementClient(config, **kwargs) + ########################################################################## + def __load_security_main(self): + + try: + print("Security and Logging Services...") + + # clients + cg_client = oci.cloud_guard.CloudGuardClient(self.config, signer=self.signer, timeout=1) + log_client = oci.logging.LoggingManagementClient(self.config, signer=self.signer, timeout=1) + + if self.flags.proxy: + cg_client.base_client.session.proxies = {'https': self.flags.proxy} + log_client.base_client.session.proxies = {'https': self.flags.proxy} + + # reference to compartments + compartments = self.get_compartment() + + # add the key if not exists + self.__initialize_data_key(self.C_SECURITY, self.C_SECURITY_CLOUD_GUARD) + self.__initialize_data_key(self.C_SECURITY, self.C_SECURITY_LOGGING) + + # reference to paas + sec = self.data[self.C_SECURITY] + + # append the data + sec[self.C_SECURITY_CLOUD_GUARD] += self.__load_security_cloud_guard(cg_client, compartments) + sec[self.C_SECURITY_LOGGING] += self.__load_security_log_groups(log_client, compartments) + + print("") + + except oci.exceptions.RequestException: + raise + except oci.exceptions.ServiceError: + raise + except Exception as e: + self.__print_error("__load_security_main", e) + + ########################################################################## + # __load_security_cloud_guard + ########################################################################## + def __load_security_cloud_guard(self, cg_client, compartments): + + data = [] + cnt = 0 + start_time = time.time() + + try: + self.__load_print_status("Cloud Guard") + + # loop on all compartments + for compartment in compartments: + + # skip managed paas compartment + if self.__if_managed_paas_compartment(compartment['name']): + print(".", end="") + continue + + array = [] + try: + array = oci.pagination.list_call_get_all_results( + cg_client.list_targets, + compartment['id'], + sort_by="displayName" + ).data + + except oci.exceptions.ServiceError as e: + if self.__check_service_error(e.code): + self.__load_print_auth_warning() + continue + raise + except oci.exceptions.ConnectTimeout: + self.__load_print_auth_warning() + continue + + print(".", end="") + + # item = oci.cloud_guard.models.TargetSummary + for item in array: + if (item.lifecycle_state == 'ACTIVE' or item.lifecycle_state == 'UPDATING'): + + val = {'id': str(item.id), + 'display_name': str(item.display_name), + 'target_resource_type': str(item.target_resource_type), + 'target_resource_id': str(item.target_resource_id), + 'recipe_count': str(item.recipe_count), + 'time_created': str(item.time_created), + 'time_updated': str(item.time_updated), + 'lifecycle_state': str(item.lifecycle_state), + 'lifecyle_details': str(item.lifecyle_details), + 'sum_info': "Cloud Guard", + 'sum_size_gb': str(1), + 'system_tags': [] if item.system_tags is None else item.system_tags, + 'defined_tags': [] if item.defined_tags is None else item.defined_tags, + 'freeform_tags': [] if item.freeform_tags is None else item.freeform_tags, + 'compartment_name': str(compartment['name']), + 'compartment_id': str(compartment['id']), + 'region_name': str(self.config['region'])} + + # add the data + cnt += 1 + data.append(val) + + self.__load_print_cnt(cnt, start_time) + return data + + except oci.exceptions.RequestException as e: + if self.__check_request_error(e): + return data + raise + except Exception as e: + self.__print_error("__load_security_cloud_guard", e) + return data + + ########################################################################## + # __load_security_log_groups + ########################################################################## + def __load_security_log_groups(self, log_client, compartments): + + data = [] + cnt = 0 + start_time = time.time() + + try: + self.__load_print_status("Logging Groups") + + # loop on all compartments + for compartment in compartments: + + # skip managed paas compartment + if self.__if_managed_paas_compartment(compartment['name']): + print(".", end="") + continue + + array = [] + try: + array = oci.pagination.list_call_get_all_results( + log_client.list_log_groups, + compartment['id'], + sort_by="displayName" + ).data + + except oci.exceptions.ServiceError as e: + if self.__check_service_error(e.code): + self.__load_print_auth_warning() + continue + raise + except oci.exceptions.ConnectTimeout: + self.__load_print_auth_warning() + continue + + print(".", end="") + + # item = oci.logging.models.LogGroupSummary + for item in array: + val = { + 'id': str(item.id), + 'display_name': str(item.display_name), + 'description': str(item.description), + 'time_created': str(item.time_created), + 'time_last_modified': str(item.time_last_modified), + 'sum_info': "Log Groups", + 'sum_size_gb': str(1), + 'logs': [], + 'defined_tags': [] if item.defined_tags is None else item.defined_tags, + 'freeform_tags': [] if item.freeform_tags is None else item.freeform_tags, + 'compartment_name': str(compartment['name']), + 'compartment_id': str(compartment['id']), + 'region_name': str(self.config['region']) + } + + ###################### + # obtain logs info + ###################### + logs = [] + try: + logs = oci.pagination.list_call_get_all_results( + log_client.list_logs, + item.id, + sort_by="displayName" + ).data + + except oci.exceptions.ServiceError as e: + if self.__check_service_error(e.code): + self.__load_print_auth_warning() + continue + raise + except oci.exceptions.ConnectTimeout: + self.__load_print_auth_warning() + continue + + # log_item = oci.logging.models.LogSummary + for log_item in logs: + log_val = { + 'id': str(log_item.id), + 'display_name': str(log_item.display_name), + 'is_enabled': str(log_item.is_enabled), + 'source_service': "", + 'source_category': "", + 'source_sourcetype': "", + 'source_resource': "", + 'source_parameters': {}, + 'lifecycle_state': str(log_item.lifecycle_state), + 'log_type': str(log_item.log_type), + 'defined_tags': [] if item.defined_tags is None else item.defined_tags, + 'freeform_tags': [] if item.freeform_tags is None else item.freeform_tags, + 'time_created': str(log_item.time_created), + 'retention_duration': str(log_item.retention_duration), + 'time_last_modified': str(log_item.time_last_modified), + 'compartment_name': str(compartment['name']), + 'compartment_id': str(compartment['id']), + 'region_name': str(self.config['region']) + } + + # source and archive configuration + try: + # oci.logging.models.Archiving + archiving = log_item.configuration.archiving + log_val['archiving'] = str(archiving.is_enabled) + + # oci.logging.models.Source + source = log_item.configuration.source + log_val['source_sourcetype'] = str(source.source_type) + + # oci.logging.models.OciService + if source.source_type == 'OCISERVICE': + log_val['source_service'] = str(source.service) + log_val['source_category'] = str(source.category) + log_val['source_resource'] = str(source.resource) + log_val['source_parameters'] = source.parameters + + except Exception: + continue + + val["logs"].append(log_val) + + # add the data + cnt += 1 + data.append(val) + + self.__load_print_cnt(cnt, start_time) + return data + + except oci.exceptions.RequestException as e: + if self.__check_request_error(e): + return data + raise + except Exception as e: + self.__print_error("__load_security_log_groups", e) + return data diff --git a/src/oci/apigateway/__init__.py b/src/oci/apigateway/__init__.py index 643e6f6f8b..cbbe2b6112 100644 --- a/src/oci/apigateway/__init__.py +++ b/src/oci/apigateway/__init__.py @@ -5,6 +5,8 @@ from __future__ import absolute_import +from .api_gateway_client import ApiGatewayClient +from .api_gateway_client_composite_operations import ApiGatewayClientCompositeOperations from .deployment_client import DeploymentClient from .deployment_client_composite_operations import DeploymentClientCompositeOperations from .gateway_client import GatewayClient @@ -13,4 +15,4 @@ from .work_requests_client_composite_operations import WorkRequestsClientCompositeOperations from . import models -__all__ = ["DeploymentClient", "DeploymentClientCompositeOperations", "GatewayClient", "GatewayClientCompositeOperations", "WorkRequestsClient", "WorkRequestsClientCompositeOperations", "models"] +__all__ = ["ApiGatewayClient", "ApiGatewayClientCompositeOperations", "DeploymentClient", "DeploymentClientCompositeOperations", "GatewayClient", "GatewayClientCompositeOperations", "WorkRequestsClient", "WorkRequestsClientCompositeOperations", "models"] diff --git a/src/oci/apigateway/api_gateway_client.py b/src/oci/apigateway/api_gateway_client.py new file mode 100644 index 0000000000..18579c9e83 --- /dev/null +++ b/src/oci/apigateway/api_gateway_client.py @@ -0,0 +1,622 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + +from __future__ import absolute_import + +from oci._vendor import requests # noqa: F401 +from oci._vendor import six + +from oci import retry # noqa: F401 +from oci.base_client import BaseClient +from oci.config import get_config_value_or_default, validate_config +from oci.signer import Signer +from oci.util import Sentinel, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME +from .models import apigateway_type_mapping +missing = Sentinel("Missing") + + +class ApiGatewayClient(object): + """ + API for the API Gateway service. Use this API to manage gateways, deployments, and related items. + For more information, see + [Overview of API Gateway](/iaas/Content/APIGateway/Concepts/apigatewayoverview.htm). + """ + + def __init__(self, config, **kwargs): + """ + Creates a new service client + + :param dict config: + Configuration keys and values as per `SDK and Tool Configuration `__. + The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be passed. You can validate_config + the dict using :py:meth:`~oci.config.validate_config` + + :param str service_endpoint: (optional) + The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is + not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit + need to specify a service endpoint. + + :param timeout: (optional) + The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided + as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If + a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout. + :type timeout: float or tuple(float, float) + + :param signer: (optional) + The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values + provided in the config parameter. + + One use case for this parameter is for `Instance Principals authentication `__ + by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument + :type signer: :py:class:`~oci.signer.AbstractBaseSigner` + + :param obj retry_strategy: (optional) + A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default. + Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation. + Any value provided at the operation level will override whatever is specified at the client level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + """ + validate_config(config, signer=kwargs.get('signer')) + if 'signer' in kwargs: + signer = kwargs['signer'] + + elif AUTHENTICATION_TYPE_FIELD_NAME in config: + signer = get_signer_from_authentication_type(config) + + else: + signer = Signer( + tenancy=config["tenancy"], + user=config["user"], + fingerprint=config["fingerprint"], + private_key_file_location=config.get("key_file"), + pass_phrase=get_config_value_or_default(config, "pass_phrase"), + private_key_content=config.get("key_content") + ) + + base_client_init_kwargs = { + 'regional_client': True, + 'service_endpoint': kwargs.get('service_endpoint'), + 'timeout': kwargs.get('timeout'), + 'base_path': '/20190501', + 'service_endpoint_template': 'https://apigateway.{region}.oci.{secondLevelDomain}', + 'skip_deserialization': kwargs.get('skip_deserialization', False) + } + self.base_client = BaseClient("api_gateway", config, signer, apigateway_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + + def change_certificate_compartment(self, certificate_id, change_certificate_compartment_details, **kwargs): + """ + Changes the certificate compartment. + + + :param str certificate_id: (required) + The ocid of the certificate. + + :param ChangeCertificateCompartmentDetails change_certificate_compartment_details: (required) + Details of the target compartment. + + :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 + might be rejected. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + The client request id for tracing. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/certificates/{certificateId}/actions/changeCompartment" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "change_certificate_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "if-match": kwargs.get("if_match", missing), + "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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + 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=change_certificate_compartment_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_certificate_compartment_details) + + def create_certificate(self, create_certificate_details, **kwargs): + """ + Creates a new Certificate. + + + :param CreateCertificateDetails create_certificate_details: (required) + Details for the new certificate + + :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 + might be rejected. + + :param str opc_request_id: (optional) + The client request id for tracing. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Certificate` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/certificates" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_certificate got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_certificate_details, + response_type="Certificate") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_certificate_details, + response_type="Certificate") + + def delete_certificate(self, certificate_id, **kwargs): + """ + Deletes the certificate with the given identifier. + + + :param str certificate_id: (required) + The ocid of the certificate. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + The client request id for tracing. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/certificates/{certificateId}" + method = "DELETE" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "delete_certificate got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def get_certificate(self, certificate_id, **kwargs): + """ + Gets a certificate by identifier. + + + :param str certificate_id: (required) + The ocid of the certificate. + + :param str opc_request_id: (optional) + The client request id for tracing. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.Certificate` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/certificates/{certificateId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "get_certificate got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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="Certificate") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Certificate") + + def list_certificates(self, compartment_id, **kwargs): + """ + Returns a list of certificates. + + + :param str compartment_id: (required) + The ocid of the compartment in which to list resources. + + :param str display_name: (optional) + A user-friendly name. Does not have to be unique, and it's changeable. + + Example: `My new resource` + + :param str lifecycle_state: (optional) + A filter to return only resources that match the given lifecycle state. + + Example: `ACTIVE` or `DELETED` + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_order: (optional) + The sort order to use, either 'asc' or 'desc'. The default order depends on the sortBy value. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can provide one sort order (`sortOrder`). + Default order for `timeCreated` is descending. Default order for + `displayName` is ascending. The `displayName` sort order is case + sensitive. + + Allowed values are: "timeCreated", "displayName" + + :param str opc_request_id: (optional) + The client request id for tracing. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.apigateway.models.CertificateCollection` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/certificates" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "display_name", + "lifecycle_state", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_certificates got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "displayName": kwargs.get("display_name", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="CertificateCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="CertificateCollection") + + def update_certificate(self, certificate_id, update_certificate_details, **kwargs): + """ + Updates a certificate with the given identifier + + + :param str certificate_id: (required) + The ocid of the certificate. + + :param UpdateCertificateDetails update_certificate_details: (required) + The information to be updated. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + The client request id for tracing. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/certificates/{certificateId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_certificate got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "certificateId": certificate_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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=update_certificate_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_certificate_details) diff --git a/src/oci/apigateway/api_gateway_client_composite_operations.py b/src/oci/apigateway/api_gateway_client_composite_operations.py new file mode 100644 index 0000000000..7b2d2645c9 --- /dev/null +++ b/src/oci/apigateway/api_gateway_client_composite_operations.py @@ -0,0 +1,149 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class ApiGatewayClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.apigateway.ApiGatewayClient` and offers convenience methods + for operations that would otherwise need to be chained together. For example, instead of performing an action + on a resource (e.g. launching an instance, creating a load balancer) and then using a waiter to wait for the resource + to enter a given state, you can call a single method in this class to accomplish the same functionality + """ + + def __init__(self, client, **kwargs): + """ + Creates a new ApiGatewayClientCompositeOperations object + + :param ApiGatewayClient client: + The service client which will be wrapped by this object + """ + self.client = client + + def create_certificate_and_wait_for_state(self, create_certificate_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.ApiGatewayClient.create_certificate` and waits for the :py:class:`~oci.apigateway.models.WorkRequest` + to enter the given state(s). + + :param CreateCertificateDetails create_certificate_details: (required) + Details for the new certificate + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.ApiGatewayClient.create_certificate` + + :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.create_certificate(create_certificate_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_certificate_and_wait_for_state(self, certificate_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.ApiGatewayClient.delete_certificate` and waits for the :py:class:`~oci.apigateway.models.WorkRequest` + to enter the given state(s). + + :param str certificate_id: (required) + The ocid of the certificate. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.ApiGatewayClient.delete_certificate` + + :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 = None + try: + operation_result = self.client.delete_certificate(certificate_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_certificate_and_wait_for_state(self, certificate_id, update_certificate_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.apigateway.ApiGatewayClient.update_certificate` and waits for the :py:class:`~oci.apigateway.models.WorkRequest` + to enter the given state(s). + + :param str certificate_id: (required) + The ocid of the certificate. + + :param UpdateCertificateDetails update_certificate_details: (required) + The information to be updated. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.apigateway.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.apigateway.ApiGatewayClient.update_certificate` + + :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.update_certificate(certificate_id, update_certificate_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) diff --git a/src/oci/apigateway/gateway_client.py b/src/oci/apigateway/gateway_client.py index ee0c65f28e..652b896f4e 100644 --- a/src/oci/apigateway/gateway_client.py +++ b/src/oci/apigateway/gateway_client.py @@ -414,6 +414,9 @@ def list_gateways(self, compartment_id, **kwargs): :param str compartment_id: (required) The ocid of the compartment in which to list resources. + :param str certificate_id: (optional) + Filter gateways by the certificate ocid. + :param str display_name: (optional) A user-friendly name. Does not have to be unique, and it's changeable. @@ -465,6 +468,7 @@ def list_gateways(self, compartment_id, **kwargs): # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", + "certificate_id", "display_name", "lifecycle_state", "limit", @@ -501,6 +505,7 @@ def list_gateways(self, compartment_id, **kwargs): query_params = { "compartmentId": compartment_id, + "certificateId": kwargs.get("certificate_id", missing), "displayName": kwargs.get("display_name", missing), "lifecycleState": kwargs.get("lifecycle_state", missing), "limit": kwargs.get("limit", missing), diff --git a/src/oci/apigateway/models/__init__.py b/src/oci/apigateway/models/__init__.py index 286287d389..b863e80485 100644 --- a/src/oci/apigateway/models/__init__.py +++ b/src/oci/apigateway/models/__init__.py @@ -16,9 +16,14 @@ from .api_specification_route_response_policies import ApiSpecificationRouteResponsePolicies from .authentication_only_route_authorization_policy import AuthenticationOnlyRouteAuthorizationPolicy from .authentication_policy import AuthenticationPolicy +from .certificate import Certificate +from .certificate_collection import CertificateCollection +from .certificate_summary import CertificateSummary +from .change_certificate_compartment_details import ChangeCertificateCompartmentDetails from .change_deployment_compartment_details import ChangeDeploymentCompartmentDetails from .change_gateway_compartment_details import ChangeGatewayCompartmentDetails from .cors_policy import CorsPolicy +from .create_certificate_details import CreateCertificateDetails from .create_deployment_details import CreateDeploymentDetails from .create_gateway_details import CreateGatewayDetails from .custom_authentication_policy import CustomAuthenticationPolicy @@ -36,6 +41,7 @@ from .http_backend import HTTPBackend from .header_field_specification import HeaderFieldSpecification from .header_transformation_policy import HeaderTransformationPolicy +from .ip_address import IpAddress from .json_web_key import JsonWebKey from .json_web_token_claim import JsonWebTokenClaim from .jwt_authentication_policy import JwtAuthenticationPolicy @@ -57,6 +63,7 @@ from .static_public_key import StaticPublicKey from .static_public_key_set import StaticPublicKeySet from .stock_response_backend import StockResponseBackend +from .update_certificate_details import UpdateCertificateDetails from .update_deployment_details import UpdateDeploymentDetails from .update_gateway_details import UpdateGatewayDetails from .work_request import WorkRequest @@ -82,9 +89,14 @@ "ApiSpecificationRouteResponsePolicies": ApiSpecificationRouteResponsePolicies, "AuthenticationOnlyRouteAuthorizationPolicy": AuthenticationOnlyRouteAuthorizationPolicy, "AuthenticationPolicy": AuthenticationPolicy, + "Certificate": Certificate, + "CertificateCollection": CertificateCollection, + "CertificateSummary": CertificateSummary, + "ChangeCertificateCompartmentDetails": ChangeCertificateCompartmentDetails, "ChangeDeploymentCompartmentDetails": ChangeDeploymentCompartmentDetails, "ChangeGatewayCompartmentDetails": ChangeGatewayCompartmentDetails, "CorsPolicy": CorsPolicy, + "CreateCertificateDetails": CreateCertificateDetails, "CreateDeploymentDetails": CreateDeploymentDetails, "CreateGatewayDetails": CreateGatewayDetails, "CustomAuthenticationPolicy": CustomAuthenticationPolicy, @@ -102,6 +114,7 @@ "HTTPBackend": HTTPBackend, "HeaderFieldSpecification": HeaderFieldSpecification, "HeaderTransformationPolicy": HeaderTransformationPolicy, + "IpAddress": IpAddress, "JsonWebKey": JsonWebKey, "JsonWebTokenClaim": JsonWebTokenClaim, "JwtAuthenticationPolicy": JwtAuthenticationPolicy, @@ -123,6 +136,7 @@ "StaticPublicKey": StaticPublicKey, "StaticPublicKeySet": StaticPublicKeySet, "StockResponseBackend": StockResponseBackend, + "UpdateCertificateDetails": UpdateCertificateDetails, "UpdateDeploymentDetails": UpdateDeploymentDetails, "UpdateGatewayDetails": UpdateGatewayDetails, "WorkRequest": WorkRequest, diff --git a/src/oci/apigateway/models/certificate.py b/src/oci/apigateway/models/certificate.py new file mode 100644 index 0000000000..fff5e715f3 --- /dev/null +++ b/src/oci/apigateway/models/certificate.py @@ -0,0 +1,523 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 Certificate(object): + """ + A certificate contains information to be installed on a gateway to secure the traffic going + through it. + For more information, see + `API Gateway Concepts`__. + + __ https://docs.cloud.oracle.com/iaas/Content/APIGateway/Concepts/apigatewayconcepts.htm + """ + + #: A constant which can be used with the lifecycle_state property of a Certificate. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a Certificate. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Certificate. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a Certificate. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a Certificate. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a Certificate. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new Certificate object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param id: + The value to assign to the id property of this Certificate. + :type id: str + + :param display_name: + The value to assign to the display_name property of this Certificate. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this Certificate. + :type compartment_id: str + + :param subject_names: + The value to assign to the subject_names property of this Certificate. + :type subject_names: list[str] + + :param time_not_valid_after: + The value to assign to the time_not_valid_after property of this Certificate. + :type time_not_valid_after: datetime + + :param certificate: + The value to assign to the certificate property of this Certificate. + :type certificate: str + + :param intermediate_certificates: + The value to assign to the intermediate_certificates property of this Certificate. + :type intermediate_certificates: str + + :param time_created: + The value to assign to the time_created property of this Certificate. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this Certificate. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Certificate. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this Certificate. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this Certificate. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this Certificate. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'subject_names': 'list[str]', + 'time_not_valid_after': 'datetime', + 'certificate': 'str', + 'intermediate_certificates': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'subject_names': 'subjectNames', + 'time_not_valid_after': 'timeNotValidAfter', + 'certificate': 'certificate', + 'intermediate_certificates': 'intermediateCertificates', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._display_name = None + self._compartment_id = None + self._subject_names = None + self._time_not_valid_after = None + self._certificate = None + self._intermediate_certificates = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Certificate. + The `OCID`__ of the resource. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The id of this Certificate. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Certificate. + The `OCID`__ of the resource. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param id: The id of this Certificate. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this Certificate. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Example: `My new resource` + + + :return: The display_name of this Certificate. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Certificate. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Example: `My new resource` + + + :param display_name: The display_name of this Certificate. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Certificate. + The `OCID`__ of the compartment in which the + resource is created. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this Certificate. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Certificate. + The `OCID`__ of the compartment in which the + resource is created. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this Certificate. + :type: str + """ + self._compartment_id = compartment_id + + @property + def subject_names(self): + """ + **[Required]** Gets the subject_names of this Certificate. + The entity to be secured by the certificate and additional host names. + + + :return: The subject_names of this Certificate. + :rtype: list[str] + """ + return self._subject_names + + @subject_names.setter + def subject_names(self, subject_names): + """ + Sets the subject_names of this Certificate. + The entity to be secured by the certificate and additional host names. + + + :param subject_names: The subject_names of this Certificate. + :type: list[str] + """ + self._subject_names = subject_names + + @property + def time_not_valid_after(self): + """ + **[Required]** Gets the time_not_valid_after of this Certificate. + The date and time the certificate will expire. + + + :return: The time_not_valid_after of this Certificate. + :rtype: datetime + """ + return self._time_not_valid_after + + @time_not_valid_after.setter + def time_not_valid_after(self, time_not_valid_after): + """ + Sets the time_not_valid_after of this Certificate. + The date and time the certificate will expire. + + + :param time_not_valid_after: The time_not_valid_after of this Certificate. + :type: datetime + """ + self._time_not_valid_after = time_not_valid_after + + @property + def certificate(self): + """ + **[Required]** Gets the certificate of this Certificate. + The data of the leaf certificate in pem format. + + + :return: The certificate of this Certificate. + :rtype: str + """ + return self._certificate + + @certificate.setter + def certificate(self, certificate): + """ + Sets the certificate of this Certificate. + The data of the leaf certificate in pem format. + + + :param certificate: The certificate of this Certificate. + :type: str + """ + self._certificate = certificate + + @property + def intermediate_certificates(self): + """ + Gets the intermediate_certificates of this Certificate. + The intermediate certificate data associated with the certificate in pem format. + + + :return: The intermediate_certificates of this Certificate. + :rtype: str + """ + return self._intermediate_certificates + + @intermediate_certificates.setter + def intermediate_certificates(self, intermediate_certificates): + """ + Sets the intermediate_certificates of this Certificate. + The intermediate certificate data associated with the certificate in pem format. + + + :param intermediate_certificates: The intermediate_certificates of this Certificate. + :type: str + """ + self._intermediate_certificates = intermediate_certificates + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this Certificate. + The time this resource was created. An RFC3339 formatted datetime string. + + + :return: The time_created of this Certificate. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Certificate. + The time this resource was created. An RFC3339 formatted datetime string. + + + :param time_created: The time_created of this Certificate. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this Certificate. + The time this resource was last updated. An RFC3339 formatted datetime string. + + + :return: The time_updated of this Certificate. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Certificate. + The time this resource was last updated. An RFC3339 formatted datetime string. + + + :param time_updated: The time_updated of this Certificate. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this Certificate. + The current state of the certificate. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Certificate. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Certificate. + The current state of the certificate. + + + :param lifecycle_state: The lifecycle_state of this Certificate. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this Certificate. + A message describing the current state in more detail. + For example, can be used to provide actionable information for a + resource in a Failed state. + + + :return: The lifecycle_details of this Certificate. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this Certificate. + A message describing the current state in more detail. + For example, can be used to provide actionable information for a + resource in a Failed state. + + + :param lifecycle_details: The lifecycle_details of this Certificate. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this Certificate. + Free-form tags for this resource. Each tag is a simple key-value pair + with no predefined name, type, or namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this Certificate. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Certificate. + Free-form tags for this resource. Each tag is a simple key-value pair + with no predefined name, type, or namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this Certificate. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this Certificate. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this Certificate. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this Certificate. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this Certificate. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + 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/apigateway/models/certificate_collection.py b/src/oci/apigateway/models/certificate_collection.py new file mode 100644 index 0000000000..ec24ead36e --- /dev/null +++ b/src/oci/apigateway/models/certificate_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 CertificateCollection(object): + """ + Collection of certificate summaries. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this CertificateCollection. + :type items: list[CertificateSummary] + + """ + self.swagger_types = { + 'items': 'list[CertificateSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this CertificateCollection. + Certificate summaries. + + + :return: The items of this CertificateCollection. + :rtype: list[CertificateSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this CertificateCollection. + Certificate summaries. + + + :param items: The items of this CertificateCollection. + :type: list[CertificateSummary] + """ + self._items = items + + 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/apigateway/models/certificate_summary.py b/src/oci/apigateway/models/certificate_summary.py new file mode 100644 index 0000000000..d3e8ccf44b --- /dev/null +++ b/src/oci/apigateway/models/certificate_summary.py @@ -0,0 +1,424 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 CertificateSummary(object): + """ + A summary of the certificate. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CertificateSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param id: + The value to assign to the id property of this CertificateSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this CertificateSummary. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this CertificateSummary. + :type compartment_id: str + + :param subject_names: + The value to assign to the subject_names property of this CertificateSummary. + :type subject_names: list[str] + + :param time_not_valid_after: + The value to assign to the time_not_valid_after property of this CertificateSummary. + :type time_not_valid_after: datetime + + :param time_created: + The value to assign to the time_created property of this CertificateSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this CertificateSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this CertificateSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this CertificateSummary. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CertificateSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CertificateSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'subject_names': 'list[str]', + 'time_not_valid_after': 'datetime', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'subject_names': 'subjectNames', + 'time_not_valid_after': 'timeNotValidAfter', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._display_name = None + self._compartment_id = None + self._subject_names = None + self._time_not_valid_after = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this CertificateSummary. + The `OCID`__ of the resource. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The id of this CertificateSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this CertificateSummary. + The `OCID`__ of the resource. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param id: The id of this CertificateSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this CertificateSummary. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Example: `My new resource` + + + :return: The display_name of this CertificateSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CertificateSummary. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Example: `My new resource` + + + :param display_name: The display_name of this CertificateSummary. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CertificateSummary. + The `OCID`__ of the compartment in which the + resource is created. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CertificateSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CertificateSummary. + The `OCID`__ of the compartment in which the + resource is created. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CertificateSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def subject_names(self): + """ + **[Required]** Gets the subject_names of this CertificateSummary. + The entity to be secured by the certificate and additional host names. + + + :return: The subject_names of this CertificateSummary. + :rtype: list[str] + """ + return self._subject_names + + @subject_names.setter + def subject_names(self, subject_names): + """ + Sets the subject_names of this CertificateSummary. + The entity to be secured by the certificate and additional host names. + + + :param subject_names: The subject_names of this CertificateSummary. + :type: list[str] + """ + self._subject_names = subject_names + + @property + def time_not_valid_after(self): + """ + **[Required]** Gets the time_not_valid_after of this CertificateSummary. + The date and time the certificate will expire. + + + :return: The time_not_valid_after of this CertificateSummary. + :rtype: datetime + """ + return self._time_not_valid_after + + @time_not_valid_after.setter + def time_not_valid_after(self, time_not_valid_after): + """ + Sets the time_not_valid_after of this CertificateSummary. + The date and time the certificate will expire. + + + :param time_not_valid_after: The time_not_valid_after of this CertificateSummary. + :type: datetime + """ + self._time_not_valid_after = time_not_valid_after + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this CertificateSummary. + The time this resource was created. An RFC3339 formatted datetime string. + + + :return: The time_created of this CertificateSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CertificateSummary. + The time this resource was created. An RFC3339 formatted datetime string. + + + :param time_created: The time_created of this CertificateSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this CertificateSummary. + The time this resource was last updated. An RFC3339 formatted datetime string. + + + :return: The time_updated of this CertificateSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this CertificateSummary. + The time this resource was last updated. An RFC3339 formatted datetime string. + + + :param time_updated: The time_updated of this CertificateSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this CertificateSummary. + The current state of the certificate. + + + :return: The lifecycle_state of this CertificateSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this CertificateSummary. + The current state of the certificate. + + + :param lifecycle_state: The lifecycle_state of this CertificateSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this CertificateSummary. + A message describing the current state in more detail. + For example, can be used to provide actionable information for a + resource in a Failed state. + + + :return: The lifecycle_details of this CertificateSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this CertificateSummary. + A message describing the current state in more detail. + For example, can be used to provide actionable information for a + resource in a Failed state. + + + :param lifecycle_details: The lifecycle_details of this CertificateSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CertificateSummary. + Free-form tags for this resource. Each tag is a simple key-value pair + with no predefined name, type, or namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CertificateSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CertificateSummary. + Free-form tags for this resource. Each tag is a simple key-value pair + with no predefined name, type, or namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CertificateSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CertificateSummary. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CertificateSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CertificateSummary. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CertificateSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + 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/apigateway/models/change_certificate_compartment_details.py b/src/oci/apigateway/models/change_certificate_compartment_details.py new file mode 100644 index 0000000000..1af7e8f8e6 --- /dev/null +++ b/src/oci/apigateway/models/change_certificate_compartment_details.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 ChangeCertificateCompartmentDetails(object): + """ + The new compartment details for the certificate. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeCertificateCompartmentDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this ChangeCertificateCompartmentDetails. + :type compartment_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId' + } + + self._compartment_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ChangeCertificateCompartmentDetails. + The `OCID`__ of the compartment in which the + resource is created. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeCertificateCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeCertificateCompartmentDetails. + The `OCID`__ of the compartment in which the + resource is created. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeCertificateCompartmentDetails. + :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/apigateway/models/create_certificate_details.py b/src/oci/apigateway/models/create_certificate_details.py new file mode 100644 index 0000000000..1cc21e0db9 --- /dev/null +++ b/src/oci/apigateway/models/create_certificate_details.py @@ -0,0 +1,292 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 CreateCertificateDetails(object): + """ + Information about a new certificate. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateCertificateDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this CreateCertificateDetails. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateCertificateDetails. + :type compartment_id: str + + :param private_key: + The value to assign to the private_key property of this CreateCertificateDetails. + :type private_key: str + + :param certificate: + The value to assign to the certificate property of this CreateCertificateDetails. + :type certificate: str + + :param intermediate_certificates: + The value to assign to the intermediate_certificates property of this CreateCertificateDetails. + :type intermediate_certificates: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateCertificateDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateCertificateDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'compartment_id': 'str', + 'private_key': 'str', + 'certificate': 'str', + 'intermediate_certificates': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'private_key': 'privateKey', + 'certificate': 'certificate', + 'intermediate_certificates': 'intermediateCertificates', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._compartment_id = None + self._private_key = None + self._certificate = None + self._intermediate_certificates = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateCertificateDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Example: `My new resource` + + + :return: The display_name of this CreateCertificateDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateCertificateDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Example: `My new resource` + + + :param display_name: The display_name of this CreateCertificateDetails. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateCertificateDetails. + The `OCID`__ of the compartment in which the + resource is created. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateCertificateDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateCertificateDetails. + The `OCID`__ of the compartment in which the + resource is created. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateCertificateDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def private_key(self): + """ + **[Required]** Gets the private_key of this CreateCertificateDetails. + The private key associated with the certificate in pem format. + + + :return: The private_key of this CreateCertificateDetails. + :rtype: str + """ + return self._private_key + + @private_key.setter + def private_key(self, private_key): + """ + Sets the private_key of this CreateCertificateDetails. + The private key associated with the certificate in pem format. + + + :param private_key: The private_key of this CreateCertificateDetails. + :type: str + """ + self._private_key = private_key + + @property + def certificate(self): + """ + **[Required]** Gets the certificate of this CreateCertificateDetails. + The data of the leaf certificate in pem format. + + + :return: The certificate of this CreateCertificateDetails. + :rtype: str + """ + return self._certificate + + @certificate.setter + def certificate(self, certificate): + """ + Sets the certificate of this CreateCertificateDetails. + The data of the leaf certificate in pem format. + + + :param certificate: The certificate of this CreateCertificateDetails. + :type: str + """ + self._certificate = certificate + + @property + def intermediate_certificates(self): + """ + Gets the intermediate_certificates of this CreateCertificateDetails. + The intermediate certificate data associated with the certificate in pem format. + + + :return: The intermediate_certificates of this CreateCertificateDetails. + :rtype: str + """ + return self._intermediate_certificates + + @intermediate_certificates.setter + def intermediate_certificates(self, intermediate_certificates): + """ + Sets the intermediate_certificates of this CreateCertificateDetails. + The intermediate certificate data associated with the certificate in pem format. + + + :param intermediate_certificates: The intermediate_certificates of this CreateCertificateDetails. + :type: str + """ + self._intermediate_certificates = intermediate_certificates + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateCertificateDetails. + Free-form tags for this resource. Each tag is a simple key-value pair + with no predefined name, type, or namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateCertificateDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateCertificateDetails. + Free-form tags for this resource. Each tag is a simple key-value pair + with no predefined name, type, or namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateCertificateDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateCertificateDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateCertificateDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateCertificateDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateCertificateDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + 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/apigateway/models/create_gateway_details.py b/src/oci/apigateway/models/create_gateway_details.py index 8f8d93ea76..1e3c0cc944 100644 --- a/src/oci/apigateway/models/create_gateway_details.py +++ b/src/oci/apigateway/models/create_gateway_details.py @@ -34,6 +34,10 @@ def __init__(self, **kwargs): The value to assign to the subnet_id property of this CreateGatewayDetails. :type subnet_id: str + :param certificate_id: + The value to assign to the certificate_id property of this CreateGatewayDetails. + :type certificate_id: str + :param freeform_tags: The value to assign to the freeform_tags property of this CreateGatewayDetails. :type freeform_tags: dict(str, str) @@ -48,6 +52,7 @@ def __init__(self, **kwargs): 'compartment_id': 'str', 'endpoint_type': 'str', 'subnet_id': 'str', + 'certificate_id': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -57,6 +62,7 @@ def __init__(self, **kwargs): 'compartment_id': 'compartmentId', 'endpoint_type': 'endpointType', 'subnet_id': 'subnetId', + 'certificate_id': 'certificateId', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -65,6 +71,7 @@ def __init__(self, **kwargs): self._compartment_id = None self._endpoint_type = None self._subnet_id = None + self._certificate_id = None self._freeform_tags = None self._defined_tags = None @@ -188,6 +195,34 @@ def subnet_id(self, subnet_id): """ self._subnet_id = subnet_id + @property + def certificate_id(self): + """ + Gets the certificate_id of this CreateGatewayDetails. + The `OCID`__ of the resource. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The certificate_id of this CreateGatewayDetails. + :rtype: str + """ + return self._certificate_id + + @certificate_id.setter + def certificate_id(self, certificate_id): + """ + Sets the certificate_id of this CreateGatewayDetails. + The `OCID`__ of the resource. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param certificate_id: The certificate_id of this CreateGatewayDetails. + :type: str + """ + self._certificate_id = certificate_id + @property def freeform_tags(self): """ diff --git a/src/oci/apigateway/models/gateway.py b/src/oci/apigateway/models/gateway.py index 2173bcf87b..f1a37d15ed 100644 --- a/src/oci/apigateway/models/gateway.py +++ b/src/oci/apigateway/models/gateway.py @@ -97,6 +97,14 @@ def __init__(self, **kwargs): The value to assign to the hostname property of this Gateway. :type hostname: str + :param certificate_id: + The value to assign to the certificate_id property of this Gateway. + :type certificate_id: str + + :param ip_addresses: + The value to assign to the ip_addresses property of this Gateway. + :type ip_addresses: list[IpAddress] + :param freeform_tags: The value to assign to the freeform_tags property of this Gateway. :type freeform_tags: dict(str, str) @@ -117,6 +125,8 @@ def __init__(self, **kwargs): 'lifecycle_state': 'str', 'lifecycle_details': 'str', 'hostname': 'str', + 'certificate_id': 'str', + 'ip_addresses': 'list[IpAddress]', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -132,6 +142,8 @@ def __init__(self, **kwargs): 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', 'hostname': 'hostname', + 'certificate_id': 'certificateId', + 'ip_addresses': 'ipAddresses', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -146,6 +158,8 @@ def __init__(self, **kwargs): self._lifecycle_state = None self._lifecycle_details = None self._hostname = None + self._certificate_id = None + self._ip_addresses = None self._freeform_tags = None self._defined_tags = None @@ -433,6 +447,58 @@ def hostname(self, hostname): """ self._hostname = hostname + @property + def certificate_id(self): + """ + Gets the certificate_id of this Gateway. + The `OCID`__ of the resource. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The certificate_id of this Gateway. + :rtype: str + """ + return self._certificate_id + + @certificate_id.setter + def certificate_id(self, certificate_id): + """ + Sets the certificate_id of this Gateway. + The `OCID`__ of the resource. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param certificate_id: The certificate_id of this Gateway. + :type: str + """ + self._certificate_id = certificate_id + + @property + def ip_addresses(self): + """ + Gets the ip_addresses of this Gateway. + An array of IP addresses associated with the gateway. + + + :return: The ip_addresses of this Gateway. + :rtype: list[IpAddress] + """ + return self._ip_addresses + + @ip_addresses.setter + def ip_addresses(self, ip_addresses): + """ + Sets the ip_addresses of this Gateway. + An array of IP addresses associated with the gateway. + + + :param ip_addresses: The ip_addresses of this Gateway. + :type: list[IpAddress] + """ + self._ip_addresses = ip_addresses + @property def freeform_tags(self): """ diff --git a/src/oci/apigateway/models/gateway_summary.py b/src/oci/apigateway/models/gateway_summary.py index 840b2734b6..47996e39a1 100644 --- a/src/oci/apigateway/models/gateway_summary.py +++ b/src/oci/apigateway/models/gateway_summary.py @@ -58,6 +58,10 @@ def __init__(self, **kwargs): The value to assign to the hostname property of this GatewaySummary. :type hostname: str + :param certificate_id: + The value to assign to the certificate_id property of this GatewaySummary. + :type certificate_id: str + :param freeform_tags: The value to assign to the freeform_tags property of this GatewaySummary. :type freeform_tags: dict(str, str) @@ -78,6 +82,7 @@ def __init__(self, **kwargs): 'lifecycle_state': 'str', 'lifecycle_details': 'str', 'hostname': 'str', + 'certificate_id': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -93,6 +98,7 @@ def __init__(self, **kwargs): 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', 'hostname': 'hostname', + 'certificate_id': 'certificateId', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -107,6 +113,7 @@ def __init__(self, **kwargs): self._lifecycle_state = None self._lifecycle_details = None self._hostname = None + self._certificate_id = None self._freeform_tags = None self._defined_tags = None @@ -382,6 +389,34 @@ def hostname(self, hostname): """ self._hostname = hostname + @property + def certificate_id(self): + """ + Gets the certificate_id of this GatewaySummary. + The `OCID`__ of the resource. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The certificate_id of this GatewaySummary. + :rtype: str + """ + return self._certificate_id + + @certificate_id.setter + def certificate_id(self, certificate_id): + """ + Sets the certificate_id of this GatewaySummary. + The `OCID`__ of the resource. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param certificate_id: The certificate_id of this GatewaySummary. + :type: str + """ + self._certificate_id = certificate_id + @property def freeform_tags(self): """ diff --git a/src/oci/apigateway/models/ip_address.py b/src/oci/apigateway/models/ip_address.py new file mode 100644 index 0000000000..0bfc6ad059 --- /dev/null +++ b/src/oci/apigateway/models/ip_address.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 IpAddress(object): + """ + IP address associated with the gateway. + """ + + def __init__(self, **kwargs): + """ + Initializes a new IpAddress 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 IpAddress. + :type ip_address: str + + """ + self.swagger_types = { + 'ip_address': 'str' + } + + self.attribute_map = { + 'ip_address': 'ipAddress' + } + + self._ip_address = None + + @property + def ip_address(self): + """ + **[Required]** Gets the ip_address of this IpAddress. + An IP address. + + + :return: The ip_address of this IpAddress. + :rtype: str + """ + return self._ip_address + + @ip_address.setter + def ip_address(self, ip_address): + """ + Sets the ip_address of this IpAddress. + An IP address. + + + :param ip_address: The ip_address of this IpAddress. + :type: str + """ + self._ip_address = ip_address + + 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/apigateway/models/update_certificate_details.py b/src/oci/apigateway/models/update_certificate_details.py new file mode 100644 index 0000000000..39a70acf92 --- /dev/null +++ b/src/oci/apigateway/models/update_certificate_details.py @@ -0,0 +1,162 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 UpdateCertificateDetails(object): + """ + The information to be updated. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateCertificateDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this UpdateCertificateDetails. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateCertificateDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateCertificateDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateCertificateDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Example: `My new resource` + + + :return: The display_name of this UpdateCertificateDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateCertificateDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Example: `My new resource` + + + :param display_name: The display_name of this UpdateCertificateDetails. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateCertificateDetails. + Free-form tags for this resource. Each tag is a simple key-value pair + with no predefined name, type, or namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateCertificateDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateCertificateDetails. + Free-form tags for this resource. Each tag is a simple key-value pair + with no predefined name, type, or namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateCertificateDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateCertificateDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateCertificateDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateCertificateDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see + `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateCertificateDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + 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/apigateway/models/update_gateway_details.py b/src/oci/apigateway/models/update_gateway_details.py index 89fe22636e..7778243943 100644 --- a/src/oci/apigateway/models/update_gateway_details.py +++ b/src/oci/apigateway/models/update_gateway_details.py @@ -22,6 +22,10 @@ def __init__(self, **kwargs): The value to assign to the display_name property of this UpdateGatewayDetails. :type display_name: str + :param certificate_id: + The value to assign to the certificate_id property of this UpdateGatewayDetails. + :type certificate_id: str + :param freeform_tags: The value to assign to the freeform_tags property of this UpdateGatewayDetails. :type freeform_tags: dict(str, str) @@ -33,17 +37,20 @@ def __init__(self, **kwargs): """ self.swagger_types = { 'display_name': 'str', + 'certificate_id': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } self.attribute_map = { 'display_name': 'displayName', + 'certificate_id': 'certificateId', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } self._display_name = None + self._certificate_id = None self._freeform_tags = None self._defined_tags = None @@ -77,6 +84,34 @@ def display_name(self, display_name): """ self._display_name = display_name + @property + def certificate_id(self): + """ + Gets the certificate_id of this UpdateGatewayDetails. + The `OCID`__ of the resource. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The certificate_id of this UpdateGatewayDetails. + :rtype: str + """ + return self._certificate_id + + @certificate_id.setter + def certificate_id(self, certificate_id): + """ + Sets the certificate_id of this UpdateGatewayDetails. + The `OCID`__ of the resource. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param certificate_id: The certificate_id of this UpdateGatewayDetails. + :type: str + """ + self._certificate_id = certificate_id + @property def freeform_tags(self): """ diff --git a/src/oci/apigateway/models/work_request.py b/src/oci/apigateway/models/work_request.py index da279b8fa6..2ad949b9c1 100644 --- a/src/oci/apigateway/models/work_request.py +++ b/src/oci/apigateway/models/work_request.py @@ -37,6 +37,18 @@ class WorkRequest(object): #: This constant has a value of "DELETE_DEPLOYMENT" OPERATION_TYPE_DELETE_DEPLOYMENT = "DELETE_DEPLOYMENT" + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_CERTIFICATE" + OPERATION_TYPE_CREATE_CERTIFICATE = "CREATE_CERTIFICATE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_CERTIFICATE" + OPERATION_TYPE_UPDATE_CERTIFICATE = "UPDATE_CERTIFICATE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_CERTIFICATE" + OPERATION_TYPE_DELETE_CERTIFICATE = "DELETE_CERTIFICATE" + #: A constant which can be used with the status property of a WorkRequest. #: This constant has a value of "ACCEPTED" STATUS_ACCEPTED = "ACCEPTED" @@ -72,7 +84,7 @@ def __init__(self, **kwargs): :param operation_type: The value to assign to the operation_type property of this WorkRequest. - Allowed values for this property are: "CREATE_GATEWAY", "UPDATE_GATEWAY", "DELETE_GATEWAY", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATE_GATEWAY", "UPDATE_GATEWAY", "DELETE_GATEWAY", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT", "CREATE_CERTIFICATE", "UPDATE_CERTIFICATE", "DELETE_CERTIFICATE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type operation_type: str @@ -175,7 +187,7 @@ def operation_type(self): **[Required]** Gets the operation_type of this WorkRequest. The type of the work request. - Allowed values for this property are: "CREATE_GATEWAY", "UPDATE_GATEWAY", "DELETE_GATEWAY", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATE_GATEWAY", "UPDATE_GATEWAY", "DELETE_GATEWAY", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT", "CREATE_CERTIFICATE", "UPDATE_CERTIFICATE", "DELETE_CERTIFICATE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -194,7 +206,7 @@ def operation_type(self, operation_type): :param operation_type: The operation_type of this WorkRequest. :type: str """ - allowed_values = ["CREATE_GATEWAY", "UPDATE_GATEWAY", "DELETE_GATEWAY", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT"] + allowed_values = ["CREATE_GATEWAY", "UPDATE_GATEWAY", "DELETE_GATEWAY", "CREATE_DEPLOYMENT", "UPDATE_DEPLOYMENT", "DELETE_DEPLOYMENT", "CREATE_CERTIFICATE", "UPDATE_CERTIFICATE", "DELETE_CERTIFICATE"] if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): operation_type = 'UNKNOWN_ENUM_VALUE' self._operation_type = operation_type diff --git a/src/oci/core/compute_client.py b/src/oci/core/compute_client.py index 8386e8aae5..77898ac619 100644 --- a/src/oci/core/compute_client.py +++ b/src/oci/core/compute_client.py @@ -6425,3 +6425,88 @@ def update_instance(self, instance_id, update_instance_details, **kwargs): header_params=header_params, body=update_instance_details, response_type="Instance") + + def update_instance_console_connection(self, instance_console_connection_id, update_instance_console_connection_details, **kwargs): + """ + Updates the defined tags and free-form tags for the specified instance console connection. + + + :param str instance_console_connection_id: (required) + The OCID of the instance console connection. + + :param UpdateInstanceConsoleConnectionDetails update_instance_console_connection_details: (required) + Update instanceConsoleConnection tags + + :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 if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.InstanceConsoleConnection` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/instanceConsoleConnections/{instanceConsoleConnectionId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_instance_console_connection got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "instanceConsoleConnectionId": instance_console_connection_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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=update_instance_console_connection_details, + response_type="InstanceConsoleConnection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_instance_console_connection_details, + response_type="InstanceConsoleConnection") diff --git a/src/oci/core/compute_client_composite_operations.py b/src/oci/core/compute_client_composite_operations.py index 17f890c40c..c52baa84a9 100644 --- a/src/oci/core/compute_client_composite_operations.py +++ b/src/oci/core/compute_client_composite_operations.py @@ -1207,3 +1207,44 @@ def update_instance_and_wait_for_state(self, instance_id, update_instance_detail return result_to_return except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_instance_console_connection_and_wait_for_state(self, instance_console_connection_id, update_instance_console_connection_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.ComputeClient.update_instance_console_connection` and waits for the :py:class:`~oci.core.models.InstanceConsoleConnection` acted upon + to enter the given state(s). + + :param str instance_console_connection_id: (required) + The OCID of the instance console connection. + + :param UpdateInstanceConsoleConnectionDetails update_instance_console_connection_details: (required) + Update instanceConsoleConnection tags + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.InstanceConsoleConnection.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.ComputeClient.update_instance_console_connection` + + :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.update_instance_console_connection(instance_console_connection_id, update_instance_console_connection_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_instance_console_connection(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) diff --git a/src/oci/core/models/__init__.py b/src/oci/core/models/__init__.py index 4e9a620b7e..d122992eae 100644 --- a/src/oci/core/models/__init__.py +++ b/src/oci/core/models/__init__.py @@ -6,6 +6,7 @@ from .add_image_shape_compatibility_entry_details import AddImageShapeCompatibilityEntryDetails from .add_network_security_group_security_rules_details import AddNetworkSecurityGroupSecurityRulesDetails +from .add_public_ip_pool_capacity_details import AddPublicIpPoolCapacityDetails from .add_security_rule_details import AddSecurityRuleDetails from .added_network_security_group_security_rules import AddedNetworkSecurityGroupSecurityRules from .app_catalog_listing import AppCatalogListing @@ -34,9 +35,15 @@ from .boot_volume_source_from_boot_volume_details import BootVolumeSourceFromBootVolumeDetails from .bulk_add_virtual_circuit_public_prefixes_details import BulkAddVirtualCircuitPublicPrefixesDetails from .bulk_delete_virtual_circuit_public_prefixes_details import BulkDeleteVirtualCircuitPublicPrefixesDetails +from .byoip_allocated_range_collection import ByoipAllocatedRangeCollection +from .byoip_allocated_range_summary import ByoipAllocatedRangeSummary +from .byoip_range import ByoipRange +from .byoip_range_collection import ByoipRangeCollection +from .byoip_range_summary import ByoipRangeSummary from .capture_console_history_details import CaptureConsoleHistoryDetails from .change_boot_volume_backup_compartment_details import ChangeBootVolumeBackupCompartmentDetails from .change_boot_volume_compartment_details import ChangeBootVolumeCompartmentDetails +from .change_byoip_range_compartment_details import ChangeByoipRangeCompartmentDetails from .change_cluster_network_compartment_details import ChangeClusterNetworkCompartmentDetails from .change_compute_image_capability_schema_compartment_details import ChangeComputeImageCapabilitySchemaCompartmentDetails from .change_cpe_compartment_details import ChangeCpeCompartmentDetails @@ -55,6 +62,7 @@ from .change_nat_gateway_compartment_details import ChangeNatGatewayCompartmentDetails from .change_network_security_group_compartment_details import ChangeNetworkSecurityGroupCompartmentDetails from .change_public_ip_compartment_details import ChangePublicIpCompartmentDetails +from .change_public_ip_pool_compartment_details import ChangePublicIpPoolCompartmentDetails from .change_remote_peering_connection_compartment_details import ChangeRemotePeeringConnectionCompartmentDetails from .change_route_table_compartment_details import ChangeRouteTableCompartmentDetails from .change_security_list_compartment_details import ChangeSecurityListCompartmentDetails @@ -91,6 +99,7 @@ from .create_app_catalog_subscription_details import CreateAppCatalogSubscriptionDetails from .create_boot_volume_backup_details import CreateBootVolumeBackupDetails from .create_boot_volume_details import CreateBootVolumeDetails +from .create_byoip_range_details import CreateByoipRangeDetails from .create_cluster_network_details import CreateClusterNetworkDetails from .create_cluster_network_instance_pool_details import CreateClusterNetworkInstancePoolDetails from .create_compute_image_capability_schema_details import CreateComputeImageCapabilitySchemaDetails @@ -118,6 +127,7 @@ from .create_network_security_group_details import CreateNetworkSecurityGroupDetails from .create_private_ip_details import CreatePrivateIpDetails from .create_public_ip_details import CreatePublicIpDetails +from .create_public_ip_pool_details import CreatePublicIpPoolDetails from .create_remote_peering_connection_details import CreateRemotePeeringConnectionDetails from .create_route_table_details import CreateRouteTableDetails from .create_security_list_details import CreateSecurityListDetails @@ -238,8 +248,12 @@ from .port_range import PortRange from .private_ip import PrivateIp from .public_ip import PublicIp +from .public_ip_pool import PublicIpPool +from .public_ip_pool_collection import PublicIpPoolCollection +from .public_ip_pool_summary import PublicIpPoolSummary from .remote_peering_connection import RemotePeeringConnection from .remove_network_security_group_security_rules_details import RemoveNetworkSecurityGroupSecurityRulesDetails +from .remove_public_ip_pool_capacity_details import RemovePublicIpPoolCapacityDetails from .route_rule import RouteRule from .route_table import RouteTable from .security_list import SecurityList @@ -262,6 +276,7 @@ from .update_boot_volume_backup_details import UpdateBootVolumeBackupDetails from .update_boot_volume_details import UpdateBootVolumeDetails from .update_boot_volume_kms_key_details import UpdateBootVolumeKmsKeyDetails +from .update_byoip_range_details import UpdateByoipRangeDetails from .update_cluster_network_details import UpdateClusterNetworkDetails from .update_compute_image_capability_schema_details import UpdateComputeImageCapabilitySchemaDetails from .update_console_history_details import UpdateConsoleHistoryDetails @@ -280,6 +295,7 @@ from .update_instance_agent_config_details import UpdateInstanceAgentConfigDetails from .update_instance_availability_config_details import UpdateInstanceAvailabilityConfigDetails from .update_instance_configuration_details import UpdateInstanceConfigurationDetails +from .update_instance_console_connection_details import UpdateInstanceConsoleConnectionDetails from .update_instance_details import UpdateInstanceDetails from .update_instance_pool_details import UpdateInstancePoolDetails from .update_instance_pool_placement_configuration_details import UpdateInstancePoolPlacementConfigurationDetails @@ -293,6 +309,7 @@ from .update_network_security_group_security_rules_details import UpdateNetworkSecurityGroupSecurityRulesDetails from .update_private_ip_details import UpdatePrivateIpDetails from .update_public_ip_details import UpdatePublicIpDetails +from .update_public_ip_pool_details import UpdatePublicIpPoolDetails from .update_remote_peering_connection_details import UpdateRemotePeeringConnectionDetails from .update_route_table_details import UpdateRouteTableDetails from .update_security_list_details import UpdateSecurityListDetails @@ -339,6 +356,7 @@ core_type_mapping = { "AddImageShapeCompatibilityEntryDetails": AddImageShapeCompatibilityEntryDetails, "AddNetworkSecurityGroupSecurityRulesDetails": AddNetworkSecurityGroupSecurityRulesDetails, + "AddPublicIpPoolCapacityDetails": AddPublicIpPoolCapacityDetails, "AddSecurityRuleDetails": AddSecurityRuleDetails, "AddedNetworkSecurityGroupSecurityRules": AddedNetworkSecurityGroupSecurityRules, "AppCatalogListing": AppCatalogListing, @@ -367,9 +385,15 @@ "BootVolumeSourceFromBootVolumeDetails": BootVolumeSourceFromBootVolumeDetails, "BulkAddVirtualCircuitPublicPrefixesDetails": BulkAddVirtualCircuitPublicPrefixesDetails, "BulkDeleteVirtualCircuitPublicPrefixesDetails": BulkDeleteVirtualCircuitPublicPrefixesDetails, + "ByoipAllocatedRangeCollection": ByoipAllocatedRangeCollection, + "ByoipAllocatedRangeSummary": ByoipAllocatedRangeSummary, + "ByoipRange": ByoipRange, + "ByoipRangeCollection": ByoipRangeCollection, + "ByoipRangeSummary": ByoipRangeSummary, "CaptureConsoleHistoryDetails": CaptureConsoleHistoryDetails, "ChangeBootVolumeBackupCompartmentDetails": ChangeBootVolumeBackupCompartmentDetails, "ChangeBootVolumeCompartmentDetails": ChangeBootVolumeCompartmentDetails, + "ChangeByoipRangeCompartmentDetails": ChangeByoipRangeCompartmentDetails, "ChangeClusterNetworkCompartmentDetails": ChangeClusterNetworkCompartmentDetails, "ChangeComputeImageCapabilitySchemaCompartmentDetails": ChangeComputeImageCapabilitySchemaCompartmentDetails, "ChangeCpeCompartmentDetails": ChangeCpeCompartmentDetails, @@ -388,6 +412,7 @@ "ChangeNatGatewayCompartmentDetails": ChangeNatGatewayCompartmentDetails, "ChangeNetworkSecurityGroupCompartmentDetails": ChangeNetworkSecurityGroupCompartmentDetails, "ChangePublicIpCompartmentDetails": ChangePublicIpCompartmentDetails, + "ChangePublicIpPoolCompartmentDetails": ChangePublicIpPoolCompartmentDetails, "ChangeRemotePeeringConnectionCompartmentDetails": ChangeRemotePeeringConnectionCompartmentDetails, "ChangeRouteTableCompartmentDetails": ChangeRouteTableCompartmentDetails, "ChangeSecurityListCompartmentDetails": ChangeSecurityListCompartmentDetails, @@ -424,6 +449,7 @@ "CreateAppCatalogSubscriptionDetails": CreateAppCatalogSubscriptionDetails, "CreateBootVolumeBackupDetails": CreateBootVolumeBackupDetails, "CreateBootVolumeDetails": CreateBootVolumeDetails, + "CreateByoipRangeDetails": CreateByoipRangeDetails, "CreateClusterNetworkDetails": CreateClusterNetworkDetails, "CreateClusterNetworkInstancePoolDetails": CreateClusterNetworkInstancePoolDetails, "CreateComputeImageCapabilitySchemaDetails": CreateComputeImageCapabilitySchemaDetails, @@ -451,6 +477,7 @@ "CreateNetworkSecurityGroupDetails": CreateNetworkSecurityGroupDetails, "CreatePrivateIpDetails": CreatePrivateIpDetails, "CreatePublicIpDetails": CreatePublicIpDetails, + "CreatePublicIpPoolDetails": CreatePublicIpPoolDetails, "CreateRemotePeeringConnectionDetails": CreateRemotePeeringConnectionDetails, "CreateRouteTableDetails": CreateRouteTableDetails, "CreateSecurityListDetails": CreateSecurityListDetails, @@ -571,8 +598,12 @@ "PortRange": PortRange, "PrivateIp": PrivateIp, "PublicIp": PublicIp, + "PublicIpPool": PublicIpPool, + "PublicIpPoolCollection": PublicIpPoolCollection, + "PublicIpPoolSummary": PublicIpPoolSummary, "RemotePeeringConnection": RemotePeeringConnection, "RemoveNetworkSecurityGroupSecurityRulesDetails": RemoveNetworkSecurityGroupSecurityRulesDetails, + "RemovePublicIpPoolCapacityDetails": RemovePublicIpPoolCapacityDetails, "RouteRule": RouteRule, "RouteTable": RouteTable, "SecurityList": SecurityList, @@ -595,6 +626,7 @@ "UpdateBootVolumeBackupDetails": UpdateBootVolumeBackupDetails, "UpdateBootVolumeDetails": UpdateBootVolumeDetails, "UpdateBootVolumeKmsKeyDetails": UpdateBootVolumeKmsKeyDetails, + "UpdateByoipRangeDetails": UpdateByoipRangeDetails, "UpdateClusterNetworkDetails": UpdateClusterNetworkDetails, "UpdateComputeImageCapabilitySchemaDetails": UpdateComputeImageCapabilitySchemaDetails, "UpdateConsoleHistoryDetails": UpdateConsoleHistoryDetails, @@ -613,6 +645,7 @@ "UpdateInstanceAgentConfigDetails": UpdateInstanceAgentConfigDetails, "UpdateInstanceAvailabilityConfigDetails": UpdateInstanceAvailabilityConfigDetails, "UpdateInstanceConfigurationDetails": UpdateInstanceConfigurationDetails, + "UpdateInstanceConsoleConnectionDetails": UpdateInstanceConsoleConnectionDetails, "UpdateInstanceDetails": UpdateInstanceDetails, "UpdateInstancePoolDetails": UpdateInstancePoolDetails, "UpdateInstancePoolPlacementConfigurationDetails": UpdateInstancePoolPlacementConfigurationDetails, @@ -626,6 +659,7 @@ "UpdateNetworkSecurityGroupSecurityRulesDetails": UpdateNetworkSecurityGroupSecurityRulesDetails, "UpdatePrivateIpDetails": UpdatePrivateIpDetails, "UpdatePublicIpDetails": UpdatePublicIpDetails, + "UpdatePublicIpPoolDetails": UpdatePublicIpPoolDetails, "UpdateRemotePeeringConnectionDetails": UpdateRemotePeeringConnectionDetails, "UpdateRouteTableDetails": UpdateRouteTableDetails, "UpdateSecurityListDetails": UpdateSecurityListDetails, diff --git a/src/oci/core/models/add_public_ip_pool_capacity_details.py b/src/oci/core/models/add_public_ip_pool_capacity_details.py new file mode 100644 index 0000000000..8f8d5073e5 --- /dev/null +++ b/src/oci/core/models/add_public_ip_pool_capacity_details.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 AddPublicIpPoolCapacityDetails(object): + """ + The data to add capacity to a public ip pool + """ + + def __init__(self, **kwargs): + """ + Initializes a new AddPublicIpPoolCapacityDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param byoip_range_id: + The value to assign to the byoip_range_id property of this AddPublicIpPoolCapacityDetails. + :type byoip_range_id: str + + :param cidr_block: + The value to assign to the cidr_block property of this AddPublicIpPoolCapacityDetails. + :type cidr_block: str + + """ + self.swagger_types = { + 'byoip_range_id': 'str', + 'cidr_block': 'str' + } + + self.attribute_map = { + 'byoip_range_id': 'byoipRangeId', + 'cidr_block': 'cidrBlock' + } + + self._byoip_range_id = None + self._cidr_block = None + + @property + def byoip_range_id(self): + """ + **[Required]** Gets the byoip_range_id of this AddPublicIpPoolCapacityDetails. + The OCID of the Byoip Range Id object to whch the cidr block belongs. + + + :return: The byoip_range_id of this AddPublicIpPoolCapacityDetails. + :rtype: str + """ + return self._byoip_range_id + + @byoip_range_id.setter + def byoip_range_id(self, byoip_range_id): + """ + Sets the byoip_range_id of this AddPublicIpPoolCapacityDetails. + The OCID of the Byoip Range Id object to whch the cidr block belongs. + + + :param byoip_range_id: The byoip_range_id of this AddPublicIpPoolCapacityDetails. + :type: str + """ + self._byoip_range_id = byoip_range_id + + @property + def cidr_block(self): + """ + **[Required]** Gets the cidr_block of this AddPublicIpPoolCapacityDetails. + The CIDR IP address range to be added to the Public Ip Pool + Example: `10.0.1.0/24` + + + :return: The cidr_block of this AddPublicIpPoolCapacityDetails. + :rtype: str + """ + return self._cidr_block + + @cidr_block.setter + def cidr_block(self, cidr_block): + """ + Sets the cidr_block of this AddPublicIpPoolCapacityDetails. + The CIDR IP address range to be added to the Public Ip Pool + Example: `10.0.1.0/24` + + + :param cidr_block: The cidr_block of this AddPublicIpPoolCapacityDetails. + :type: str + """ + self._cidr_block = cidr_block + + 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/byoip_allocated_range_collection.py b/src/oci/core/models/byoip_allocated_range_collection.py new file mode 100644 index 0000000000..f3985bbfcb --- /dev/null +++ b/src/oci/core/models/byoip_allocated_range_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 ByoipAllocatedRangeCollection(object): + """ + Results of a ListByoipAllocatedRanges operation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ByoipAllocatedRangeCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this ByoipAllocatedRangeCollection. + :type items: list[ByoipAllocatedRangeSummary] + + """ + self.swagger_types = { + 'items': 'list[ByoipAllocatedRangeSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ByoipAllocatedRangeCollection. + list of Byoip allocated ranges as part of public IP pool + + + :return: The items of this ByoipAllocatedRangeCollection. + :rtype: list[ByoipAllocatedRangeSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ByoipAllocatedRangeCollection. + list of Byoip allocated ranges as part of public IP pool + + + :param items: The items of this ByoipAllocatedRangeCollection. + :type: list[ByoipAllocatedRangeSummary] + """ + self._items = items + + 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/byoip_allocated_range_summary.py b/src/oci/core/models/byoip_allocated_range_summary.py new file mode 100644 index 0000000000..dee687b2af --- /dev/null +++ b/src/oci/core/models/byoip_allocated_range_summary.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 ByoipAllocatedRangeSummary(object): + """ + Subrange of ByoipRange which is allocated to a PublicIpPool + """ + + def __init__(self, **kwargs): + """ + Initializes a new ByoipAllocatedRangeSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param cidr_block: + The value to assign to the cidr_block property of this ByoipAllocatedRangeSummary. + :type cidr_block: str + + :param public_ip_pool_id: + The value to assign to the public_ip_pool_id property of this ByoipAllocatedRangeSummary. + :type public_ip_pool_id: str + + """ + self.swagger_types = { + 'cidr_block': 'str', + 'public_ip_pool_id': 'str' + } + + self.attribute_map = { + 'cidr_block': 'cidrBlock', + 'public_ip_pool_id': 'publicIpPoolId' + } + + self._cidr_block = None + self._public_ip_pool_id = None + + @property + def cidr_block(self): + """ + Gets the cidr_block of this ByoipAllocatedRangeSummary. + The address range part of the ByoipRange which is used for a publicIpPool. + + + :return: The cidr_block of this ByoipAllocatedRangeSummary. + :rtype: str + """ + return self._cidr_block + + @cidr_block.setter + def cidr_block(self, cidr_block): + """ + Sets the cidr_block of this ByoipAllocatedRangeSummary. + The address range part of the ByoipRange which is used for a publicIpPool. + + + :param cidr_block: The cidr_block of this ByoipAllocatedRangeSummary. + :type: str + """ + self._cidr_block = cidr_block + + @property + def public_ip_pool_id(self): + """ + Gets the public_ip_pool_id of this ByoipAllocatedRangeSummary. + The OCID of the PublicIpPool containing the part of the Byoip range. + + + :return: The public_ip_pool_id of this ByoipAllocatedRangeSummary. + :rtype: str + """ + return self._public_ip_pool_id + + @public_ip_pool_id.setter + def public_ip_pool_id(self, public_ip_pool_id): + """ + Sets the public_ip_pool_id of this ByoipAllocatedRangeSummary. + The OCID of the PublicIpPool containing the part of the Byoip range. + + + :param public_ip_pool_id: The public_ip_pool_id of this ByoipAllocatedRangeSummary. + :type: str + """ + self._public_ip_pool_id = public_ip_pool_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/byoip_range.py b/src/oci/core/models/byoip_range.py new file mode 100644 index 0000000000..6cde4a4b19 --- /dev/null +++ b/src/oci/core/models/byoip_range.py @@ -0,0 +1,560 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 ByoipRange(object): + """ + A ByoipRange, is an IP address prefix that the user owns and wishes to import into OCI. + """ + + #: A constant which can be used with the lifecycle_details property of a ByoipRange. + #: This constant has a value of "CREATING" + LIFECYCLE_DETAILS_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_details property of a ByoipRange. + #: This constant has a value of "VALIDATING" + LIFECYCLE_DETAILS_VALIDATING = "VALIDATING" + + #: A constant which can be used with the lifecycle_details property of a ByoipRange. + #: This constant has a value of "PROVISIONED" + LIFECYCLE_DETAILS_PROVISIONED = "PROVISIONED" + + #: A constant which can be used with the lifecycle_details property of a ByoipRange. + #: This constant has a value of "ACTIVE" + LIFECYCLE_DETAILS_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_details property of a ByoipRange. + #: This constant has a value of "FAILED" + LIFECYCLE_DETAILS_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_details property of a ByoipRange. + #: This constant has a value of "DELETING" + LIFECYCLE_DETAILS_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_details property of a ByoipRange. + #: This constant has a value of "DELETED" + LIFECYCLE_DETAILS_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a ByoipRange. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ByoipRange. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a ByoipRange. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ByoipRange. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a ByoipRange. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new ByoipRange object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param cidr_block: + The value to assign to the cidr_block property of this ByoipRange. + :type cidr_block: str + + :param compartment_id: + The value to assign to the compartment_id property of this ByoipRange. + :type compartment_id: str + + :param defined_tags: + The value to assign to the defined_tags property of this ByoipRange. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this ByoipRange. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ByoipRange. + :type freeform_tags: dict(str, str) + + :param id: + The value to assign to the id property of this ByoipRange. + :type id: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this ByoipRange. + Allowed values for this property are: "CREATING", "VALIDATING", "PROVISIONED", "ACTIVE", "FAILED", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_details: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ByoipRange. + Allowed values for this property are: "INACTIVE", "UPDATING", "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this ByoipRange. + :type time_created: datetime + + :param time_validated: + The value to assign to the time_validated property of this ByoipRange. + :type time_validated: datetime + + :param time_advertised: + The value to assign to the time_advertised property of this ByoipRange. + :type time_advertised: datetime + + :param time_withdrawn: + The value to assign to the time_withdrawn property of this ByoipRange. + :type time_withdrawn: datetime + + :param validation_token: + The value to assign to the validation_token property of this ByoipRange. + :type validation_token: str + + """ + self.swagger_types = { + 'cidr_block': 'str', + 'compartment_id': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)', + 'id': 'str', + 'lifecycle_details': 'str', + 'lifecycle_state': 'str', + 'time_created': 'datetime', + 'time_validated': 'datetime', + 'time_advertised': 'datetime', + 'time_withdrawn': 'datetime', + 'validation_token': 'str' + } + + self.attribute_map = { + 'cidr_block': 'cidrBlock', + 'compartment_id': 'compartmentId', + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags', + 'id': 'id', + 'lifecycle_details': 'lifecycleDetails', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated', + 'time_validated': 'timeValidated', + 'time_advertised': 'timeAdvertised', + 'time_withdrawn': 'timeWithdrawn', + 'validation_token': 'validationToken' + } + + self._cidr_block = None + self._compartment_id = None + self._defined_tags = None + self._display_name = None + self._freeform_tags = None + self._id = None + self._lifecycle_details = None + self._lifecycle_state = None + self._time_created = None + self._time_validated = None + self._time_advertised = None + self._time_withdrawn = None + self._validation_token = None + + @property + def cidr_block(self): + """ + **[Required]** Gets the cidr_block of this ByoipRange. + The address range the user is on-boarding. + + + :return: The cidr_block of this ByoipRange. + :rtype: str + """ + return self._cidr_block + + @cidr_block.setter + def cidr_block(self, cidr_block): + """ + Sets the cidr_block of this ByoipRange. + The address range the user is on-boarding. + + + :param cidr_block: The cidr_block of this ByoipRange. + :type: str + """ + self._cidr_block = cidr_block + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ByoipRange. + The OCID of the compartment containing the Byoip Range. + + + :return: The compartment_id of this ByoipRange. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ByoipRange. + The OCID of the compartment containing the Byoip Range. + + + :param compartment_id: The compartment_id of this ByoipRange. + :type: str + """ + self._compartment_id = compartment_id + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ByoipRange. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ByoipRange. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this ByoipRange. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ByoipRange. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this ByoipRange. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid + entering confidential information. + + + :return: The display_name of this ByoipRange. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ByoipRange. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid + entering confidential information. + + + :param display_name: The display_name of this ByoipRange. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ByoipRange. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ByoipRange. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ByoipRange. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ByoipRange. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def id(self): + """ + **[Required]** Gets the id of this ByoipRange. + The Oracle ID (OCID) of the Byoip Range. + + + :return: The id of this ByoipRange. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ByoipRange. + The Oracle ID (OCID) of the Byoip Range. + + + :param id: The id of this ByoipRange. + :type: str + """ + self._id = id + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this ByoipRange. + The Byoip Range's current substate. + + Allowed values for this property are: "CREATING", "VALIDATING", "PROVISIONED", "ACTIVE", "FAILED", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_details of this ByoipRange. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ByoipRange. + The Byoip Range's current substate. + + + :param lifecycle_details: The lifecycle_details of this ByoipRange. + :type: str + """ + allowed_values = ["CREATING", "VALIDATING", "PROVISIONED", "ACTIVE", "FAILED", "DELETING", "DELETED"] + if not value_allowed_none_or_none_sentinel(lifecycle_details, allowed_values): + lifecycle_details = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_details = lifecycle_details + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ByoipRange. + The Byoip Range's current state. + + Allowed values for this property are: "INACTIVE", "UPDATING", "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this ByoipRange. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ByoipRange. + The Byoip Range's current state. + + + :param lifecycle_state: The lifecycle_state of this ByoipRange. + :type: str + """ + allowed_values = ["INACTIVE", "UPDATING", "ACTIVE", "DELETING", "DELETED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ByoipRange. + The date and time the Byoip Range was created, in the format defined by `RFC3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this ByoipRange. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ByoipRange. + The date and time the Byoip Range was created, in the format defined by `RFC3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this ByoipRange. + :type: datetime + """ + self._time_created = time_created + + @property + def time_validated(self): + """ + Gets the time_validated of this ByoipRange. + The date and time the Byoip Range was validated, in the format defined by `RFC3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_validated of this ByoipRange. + :rtype: datetime + """ + return self._time_validated + + @time_validated.setter + def time_validated(self, time_validated): + """ + Sets the time_validated of this ByoipRange. + The date and time the Byoip Range was validated, in the format defined by `RFC3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_validated: The time_validated of this ByoipRange. + :type: datetime + """ + self._time_validated = time_validated + + @property + def time_advertised(self): + """ + Gets the time_advertised of this ByoipRange. + The date and time the Byoip Range was advertised, in the format defined by `RFC3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_advertised of this ByoipRange. + :rtype: datetime + """ + return self._time_advertised + + @time_advertised.setter + def time_advertised(self, time_advertised): + """ + Sets the time_advertised of this ByoipRange. + The date and time the Byoip Range was advertised, in the format defined by `RFC3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_advertised: The time_advertised of this ByoipRange. + :type: datetime + """ + self._time_advertised = time_advertised + + @property + def time_withdrawn(self): + """ + Gets the time_withdrawn of this ByoipRange. + The date and time the Byoip Range was withdrawn, in the format defined by `RFC3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_withdrawn of this ByoipRange. + :rtype: datetime + """ + return self._time_withdrawn + + @time_withdrawn.setter + def time_withdrawn(self, time_withdrawn): + """ + Sets the time_withdrawn of this ByoipRange. + The date and time the Byoip Range was withdrawn, in the format defined by `RFC3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_withdrawn: The time_withdrawn of this ByoipRange. + :type: datetime + """ + self._time_withdrawn = time_withdrawn + + @property + def validation_token(self): + """ + **[Required]** Gets the validation_token of this ByoipRange. + This is an internally generated ASCII string that the user will then use as part of the validation process. Specifically, they will need to add the token string generated by the service to their Internet Registry record. + + + :return: The validation_token of this ByoipRange. + :rtype: str + """ + return self._validation_token + + @validation_token.setter + def validation_token(self, validation_token): + """ + Sets the validation_token of this ByoipRange. + This is an internally generated ASCII string that the user will then use as part of the validation process. Specifically, they will need to add the token string generated by the service to their Internet Registry record. + + + :param validation_token: The validation_token of this ByoipRange. + :type: str + """ + self._validation_token = validation_token + + 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/byoip_range_collection.py b/src/oci/core/models/byoip_range_collection.py new file mode 100644 index 0000000000..c4640b56e9 --- /dev/null +++ b/src/oci/core/models/byoip_range_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 ByoipRangeCollection(object): + """ + Results of a ListByoipRange operation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ByoipRangeCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this ByoipRangeCollection. + :type items: list[ByoipRangeSummary] + + """ + self.swagger_types = { + 'items': 'list[ByoipRangeSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ByoipRangeCollection. + list of Byoip Range object summaries + + + :return: The items of this ByoipRangeCollection. + :rtype: list[ByoipRangeSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ByoipRangeCollection. + list of Byoip Range object summaries + + + :param items: The items of this ByoipRangeCollection. + :type: list[ByoipRangeSummary] + """ + self._items = items + + 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/byoip_range_summary.py b/src/oci/core/models/byoip_range_summary.py new file mode 100644 index 0000000000..dcc396fb88 --- /dev/null +++ b/src/oci/core/models/byoip_range_summary.py @@ -0,0 +1,348 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 ByoipRangeSummary(object): + """ + Summary information about a ByoipRange + """ + + def __init__(self, **kwargs): + """ + Initializes a new ByoipRangeSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param cidr_block: + The value to assign to the cidr_block property of this ByoipRangeSummary. + :type cidr_block: str + + :param compartment_id: + The value to assign to the compartment_id property of this ByoipRangeSummary. + :type compartment_id: str + + :param defined_tags: + The value to assign to the defined_tags property of this ByoipRangeSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this ByoipRangeSummary. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ByoipRangeSummary. + :type freeform_tags: dict(str, str) + + :param id: + The value to assign to the id property of this ByoipRangeSummary. + :type id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ByoipRangeSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this ByoipRangeSummary. + :type lifecycle_details: str + + :param time_created: + The value to assign to the time_created property of this ByoipRangeSummary. + :type time_created: datetime + + """ + self.swagger_types = { + 'cidr_block': 'str', + 'compartment_id': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)', + 'id': 'str', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'cidr_block': 'cidrBlock', + 'compartment_id': 'compartmentId', + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags', + 'id': 'id', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'time_created': 'timeCreated' + } + + self._cidr_block = None + self._compartment_id = None + self._defined_tags = None + self._display_name = None + self._freeform_tags = None + self._id = None + self._lifecycle_state = None + self._lifecycle_details = None + self._time_created = None + + @property + def cidr_block(self): + """ + Gets the cidr_block of this ByoipRangeSummary. + The address range the user is on-boarding. + + + :return: The cidr_block of this ByoipRangeSummary. + :rtype: str + """ + return self._cidr_block + + @cidr_block.setter + def cidr_block(self, cidr_block): + """ + Sets the cidr_block of this ByoipRangeSummary. + The address range the user is on-boarding. + + + :param cidr_block: The cidr_block of this ByoipRangeSummary. + :type: str + """ + self._cidr_block = cidr_block + + @property + def compartment_id(self): + """ + Gets the compartment_id of this ByoipRangeSummary. + The OCID of the compartment containing the Byoip Range. + + + :return: The compartment_id of this ByoipRangeSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ByoipRangeSummary. + The OCID of the compartment containing the Byoip Range. + + + :param compartment_id: The compartment_id of this ByoipRangeSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ByoipRangeSummary. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ByoipRangeSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this ByoipRangeSummary. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ByoipRangeSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this ByoipRangeSummary. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid + entering confidential information. + + + :return: The display_name of this ByoipRangeSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ByoipRangeSummary. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid + entering confidential information. + + + :param display_name: The display_name of this ByoipRangeSummary. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ByoipRangeSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ByoipRangeSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ByoipRangeSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ByoipRangeSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def id(self): + """ + Gets the id of this ByoipRangeSummary. + The Oracle ID (OCID) of the Byoip Range. + + + :return: The id of this ByoipRangeSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ByoipRangeSummary. + The Oracle ID (OCID) of the Byoip Range. + + + :param id: The id of this ByoipRangeSummary. + :type: str + """ + self._id = id + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this ByoipRangeSummary. + The Byoip Range's current state. + + + :return: The lifecycle_state of this ByoipRangeSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ByoipRangeSummary. + The Byoip Range's current state. + + + :param lifecycle_state: The lifecycle_state of this ByoipRangeSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this ByoipRangeSummary. + The Byoip Range's current lifeCycle substate. + + + :return: The lifecycle_details of this ByoipRangeSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ByoipRangeSummary. + The Byoip Range's current lifeCycle substate. + + + :param lifecycle_details: The lifecycle_details of this ByoipRangeSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def time_created(self): + """ + Gets the time_created of this ByoipRangeSummary. + The date and time the Byoip Range was created, in the format defined by `RFC3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this ByoipRangeSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ByoipRangeSummary. + The date and time the Byoip Range was created, in the format defined by `RFC3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this ByoipRangeSummary. + :type: datetime + """ + self._time_created = time_created + + 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/change_byoip_range_compartment_details.py b/src/oci/core/models/change_byoip_range_compartment_details.py new file mode 100644 index 0000000000..57489d9c2d --- /dev/null +++ b/src/oci/core/models/change_byoip_range_compartment_details.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 ChangeByoipRangeCompartmentDetails(object): + """ + The configuration details for the move operation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeByoipRangeCompartmentDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this ChangeByoipRangeCompartmentDetails. + :type compartment_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId' + } + + self._compartment_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ChangeByoipRangeCompartmentDetails. + The `OCID`__ of the compartment to move the + Byoip Range to. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeByoipRangeCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeByoipRangeCompartmentDetails. + The `OCID`__ of the compartment to move the + Byoip Range to. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeByoipRangeCompartmentDetails. + :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/change_public_ip_pool_compartment_details.py b/src/oci/core/models/change_public_ip_pool_compartment_details.py new file mode 100644 index 0000000000..c48e264e42 --- /dev/null +++ b/src/oci/core/models/change_public_ip_pool_compartment_details.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 ChangePublicIpPoolCompartmentDetails(object): + """ + The configuration details for the move operation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangePublicIpPoolCompartmentDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this ChangePublicIpPoolCompartmentDetails. + :type compartment_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId' + } + + self._compartment_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ChangePublicIpPoolCompartmentDetails. + The `OCID`__ of the compartment to move the + Public IP Pool to. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangePublicIpPoolCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangePublicIpPoolCompartmentDetails. + The `OCID`__ of the compartment to move the + Public IP Pool to. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangePublicIpPoolCompartmentDetails. + :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/create_byoip_range_details.py b/src/oci/core/models/create_byoip_range_details.py new file mode 100644 index 0000000000..ac9c9e013f --- /dev/null +++ b/src/oci/core/models/create_byoip_range_details.py @@ -0,0 +1,218 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 CreateByoipRangeDetails(object): + """ + The data to create a Byoip Range + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateByoipRangeDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param cidr_block: + The value to assign to the cidr_block property of this CreateByoipRangeDetails. + :type cidr_block: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateByoipRangeDetails. + :type compartment_id: str + + :param defined_tags: + The value to assign to the defined_tags property of this CreateByoipRangeDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this CreateByoipRangeDetails. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateByoipRangeDetails. + :type freeform_tags: dict(str, str) + + """ + self.swagger_types = { + 'cidr_block': 'str', + 'compartment_id': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)' + } + + self.attribute_map = { + 'cidr_block': 'cidrBlock', + 'compartment_id': 'compartmentId', + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags' + } + + self._cidr_block = None + self._compartment_id = None + self._defined_tags = None + self._display_name = None + self._freeform_tags = None + + @property + def cidr_block(self): + """ + **[Required]** Gets the cidr_block of this CreateByoipRangeDetails. + The CIDR IP address range of the prefix. + Example: `10.0.1.0/24` + + + :return: The cidr_block of this CreateByoipRangeDetails. + :rtype: str + """ + return self._cidr_block + + @cidr_block.setter + def cidr_block(self, cidr_block): + """ + Sets the cidr_block of this CreateByoipRangeDetails. + The CIDR IP address range of the prefix. + Example: `10.0.1.0/24` + + + :param cidr_block: The cidr_block of this CreateByoipRangeDetails. + :type: str + """ + self._cidr_block = cidr_block + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateByoipRangeDetails. + The OCID of the compartment to contain the Byoip Range. + + + :return: The compartment_id of this CreateByoipRangeDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateByoipRangeDetails. + The OCID of the compartment to contain the Byoip Range. + + + :param compartment_id: The compartment_id of this CreateByoipRangeDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateByoipRangeDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateByoipRangeDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateByoipRangeDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateByoipRangeDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this CreateByoipRangeDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :return: The display_name of this CreateByoipRangeDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateByoipRangeDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :param display_name: The display_name of this CreateByoipRangeDetails. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateByoipRangeDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateByoipRangeDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateByoipRangeDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateByoipRangeDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + 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/create_cluster_network_instance_pool_details.py b/src/oci/core/models/create_cluster_network_instance_pool_details.py index ec82d817ef..e931f72583 100644 --- a/src/oci/core/models/create_cluster_network_instance_pool_details.py +++ b/src/oci/core/models/create_cluster_network_instance_pool_details.py @@ -189,8 +189,11 @@ def size(self): **[Required]** Gets the size of this CreateClusterNetworkInstancePoolDetails. The number of instances that should be in the instance pool. - If the required number of instances is not available or if some instances fail to launch, - the cluster network is not created. + For cluster networks with 10 or more instances, the cluster network is created if the required + number of instances is available and at least 95% of the instances in the pool launch + successfully. For cluster networks with less than 10 instances, all instances in the pool must + launch successfully. If the cluster network fails to launch, wait a few minutes, and then try + creating it again. :return: The size of this CreateClusterNetworkInstancePoolDetails. @@ -204,8 +207,11 @@ def size(self, size): Sets the size of this CreateClusterNetworkInstancePoolDetails. The number of instances that should be in the instance pool. - If the required number of instances is not available or if some instances fail to launch, - the cluster network is not created. + For cluster networks with 10 or more instances, the cluster network is created if the required + number of instances is available and at least 95% of the instances in the pool launch + successfully. For cluster networks with less than 10 instances, all instances in the pool must + launch successfully. If the cluster network fails to launch, wait a few minutes, and then try + creating it again. :param size: The size of this CreateClusterNetworkInstancePoolDetails. diff --git a/src/oci/core/models/create_nat_gateway_details.py b/src/oci/core/models/create_nat_gateway_details.py index dc7912c5eb..4e2f0e4468 100644 --- a/src/oci/core/models/create_nat_gateway_details.py +++ b/src/oci/core/models/create_nat_gateway_details.py @@ -42,6 +42,10 @@ def __init__(self, **kwargs): The value to assign to the vcn_id property of this CreateNatGatewayDetails. :type vcn_id: str + :param public_ip_id: + The value to assign to the public_ip_id property of this CreateNatGatewayDetails. + :type public_ip_id: str + """ self.swagger_types = { 'compartment_id': 'str', @@ -49,7 +53,8 @@ def __init__(self, **kwargs): 'display_name': 'str', 'freeform_tags': 'dict(str, str)', 'block_traffic': 'bool', - 'vcn_id': 'str' + 'vcn_id': 'str', + 'public_ip_id': 'str' } self.attribute_map = { @@ -58,7 +63,8 @@ def __init__(self, **kwargs): 'display_name': 'displayName', 'freeform_tags': 'freeformTags', 'block_traffic': 'blockTraffic', - 'vcn_id': 'vcnId' + 'vcn_id': 'vcnId', + 'public_ip_id': 'publicIpId' } self._compartment_id = None @@ -67,6 +73,7 @@ def __init__(self, **kwargs): self._freeform_tags = None self._block_traffic = None self._vcn_id = None + self._public_ip_id = None @property def compartment_id(self): @@ -248,6 +255,34 @@ def vcn_id(self, vcn_id): """ self._vcn_id = vcn_id + @property + def public_ip_id(self): + """ + Gets the public_ip_id of this CreateNatGatewayDetails. + The `OCID`__ of the Public IP associated with the NAT gateway. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The public_ip_id of this CreateNatGatewayDetails. + :rtype: str + """ + return self._public_ip_id + + @public_ip_id.setter + def public_ip_id(self, public_ip_id): + """ + Sets the public_ip_id of this CreateNatGatewayDetails. + The `OCID`__ of the Public IP associated with the NAT gateway. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param public_ip_id: The public_ip_id of this CreateNatGatewayDetails. + :type: str + """ + self._public_ip_id = public_ip_id + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/core/models/create_public_ip_details.py b/src/oci/core/models/create_public_ip_details.py index 94377703f6..cc121f29f5 100644 --- a/src/oci/core/models/create_public_ip_details.py +++ b/src/oci/core/models/create_public_ip_details.py @@ -51,6 +51,10 @@ def __init__(self, **kwargs): The value to assign to the private_ip_id property of this CreatePublicIpDetails. :type private_ip_id: str + :param public_ip_pool_id: + The value to assign to the public_ip_pool_id property of this CreatePublicIpDetails. + :type public_ip_pool_id: str + """ self.swagger_types = { 'compartment_id': 'str', @@ -58,7 +62,8 @@ def __init__(self, **kwargs): 'display_name': 'str', 'freeform_tags': 'dict(str, str)', 'lifetime': 'str', - 'private_ip_id': 'str' + 'private_ip_id': 'str', + 'public_ip_pool_id': 'str' } self.attribute_map = { @@ -67,7 +72,8 @@ def __init__(self, **kwargs): 'display_name': 'displayName', 'freeform_tags': 'freeformTags', 'lifetime': 'lifetime', - 'private_ip_id': 'privateIpId' + 'private_ip_id': 'privateIpId', + 'public_ip_pool_id': 'publicIpPoolId' } self._compartment_id = None @@ -76,6 +82,7 @@ def __init__(self, **kwargs): self._freeform_tags = None self._lifetime = None self._private_ip_id = None + self._public_ip_pool_id = None @property def compartment_id(self): @@ -275,6 +282,30 @@ def private_ip_id(self, private_ip_id): """ self._private_ip_id = private_ip_id + @property + def public_ip_pool_id(self): + """ + Gets the public_ip_pool_id of this CreatePublicIpDetails. + OCID of the pool object created by the current tenancy + + + :return: The public_ip_pool_id of this CreatePublicIpDetails. + :rtype: str + """ + return self._public_ip_pool_id + + @public_ip_pool_id.setter + def public_ip_pool_id(self, public_ip_pool_id): + """ + Sets the public_ip_pool_id of this CreatePublicIpDetails. + OCID of the pool object created by the current tenancy + + + :param public_ip_pool_id: The public_ip_pool_id of this CreatePublicIpDetails. + :type: str + """ + self._public_ip_pool_id = public_ip_pool_id + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/core/models/create_public_ip_pool_details.py b/src/oci/core/models/create_public_ip_pool_details.py new file mode 100644 index 0000000000..fdc99e0bb7 --- /dev/null +++ b/src/oci/core/models/create_public_ip_pool_details.py @@ -0,0 +1,185 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 CreatePublicIpPoolDetails(object): + """ + The data to create a public ip pool + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreatePublicIpPoolDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this CreatePublicIpPoolDetails. + :type compartment_id: str + + :param defined_tags: + The value to assign to the defined_tags property of this CreatePublicIpPoolDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this CreatePublicIpPoolDetails. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreatePublicIpPoolDetails. + :type freeform_tags: dict(str, str) + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags' + } + + self._compartment_id = None + self._defined_tags = None + self._display_name = None + self._freeform_tags = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreatePublicIpPoolDetails. + The OCID of the compartment to contain the Public Ip Pool + + + :return: The compartment_id of this CreatePublicIpPoolDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreatePublicIpPoolDetails. + The OCID of the compartment to contain the Public Ip Pool + + + :param compartment_id: The compartment_id of this CreatePublicIpPoolDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreatePublicIpPoolDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreatePublicIpPoolDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreatePublicIpPoolDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreatePublicIpPoolDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this CreatePublicIpPoolDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :return: The display_name of this CreatePublicIpPoolDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreatePublicIpPoolDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :param display_name: The display_name of this CreatePublicIpPoolDetails. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreatePublicIpPoolDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreatePublicIpPoolDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreatePublicIpPoolDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreatePublicIpPoolDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + 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/image_memory_constraints.py b/src/oci/core/models/image_memory_constraints.py index e86cc8fad4..8bf6679b27 100644 --- a/src/oci/core/models/image_memory_constraints.py +++ b/src/oci/core/models/image_memory_constraints.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class ImageMemoryConstraints(object): """ - OCPU options for an image and shape. + For a flexible image and shape, the amount of memory supported for instances that use this image. """ def __init__(self, **kwargs): @@ -44,7 +44,7 @@ def __init__(self, **kwargs): def min_in_gbs(self): """ Gets the min_in_gbs of this ImageMemoryConstraints. - The minimum amount of memory supported for this image and shape, in gigabytes. + The minimum amount of memory, in gigabytes. :return: The min_in_gbs of this ImageMemoryConstraints. @@ -56,7 +56,7 @@ def min_in_gbs(self): def min_in_gbs(self, min_in_gbs): """ Sets the min_in_gbs of this ImageMemoryConstraints. - The minimum amount of memory supported for this image and shape, in gigabytes. + The minimum amount of memory, in gigabytes. :param min_in_gbs: The min_in_gbs of this ImageMemoryConstraints. @@ -68,7 +68,7 @@ def min_in_gbs(self, min_in_gbs): def max_in_gbs(self): """ Gets the max_in_gbs of this ImageMemoryConstraints. - The maximum amount of memory supported for this image and shape, in gigabytes. + The maximum amount of memory, in gigabytes. :return: The max_in_gbs of this ImageMemoryConstraints. @@ -80,7 +80,7 @@ def max_in_gbs(self): def max_in_gbs(self, max_in_gbs): """ Sets the max_in_gbs of this ImageMemoryConstraints. - The maximum amount of memory supported for this image and shape, in gigabytes. + The maximum amount of memory, in gigabytes. :param max_in_gbs: The max_in_gbs of this ImageMemoryConstraints. diff --git a/src/oci/core/models/instance.py b/src/oci/core/models/instance.py index eee3a84b04..3b48497b45 100644 --- a/src/oci/core/models/instance.py +++ b/src/oci/core/models/instance.py @@ -697,6 +697,8 @@ def launch_options(self, launch_options): def availability_config(self): """ Gets the availability_config of this Instance. + Options for defining the availability of a VM instance after a maintenance event that impacts the underlying hardware. + :return: The availability_config of this Instance. :rtype: InstanceAvailabilityConfig @@ -707,6 +709,8 @@ def availability_config(self): def availability_config(self, availability_config): """ Sets the availability_config of this Instance. + Options for defining the availability of a VM instance after a maintenance event that impacts the underlying hardware. + :param availability_config: The availability_config of this Instance. :type: InstanceAvailabilityConfig diff --git a/src/oci/core/models/instance_availability_config.py b/src/oci/core/models/instance_availability_config.py index 654f13408d..32a781e54b 100644 --- a/src/oci/core/models/instance_availability_config.py +++ b/src/oci/core/models/instance_availability_config.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class InstanceAvailabilityConfig(object): """ - Options for customers to define the general policy of how compute service perform maintenance on VM instances. + Options for defining the availabiity of a VM instance after a maintenance event that impacts the underlying hardware. """ #: A constant which can be used with the recovery_action property of a InstanceAvailabilityConfig. @@ -47,10 +47,10 @@ def __init__(self, **kwargs): def recovery_action(self): """ Gets the recovery_action of this InstanceAvailabilityConfig. - Actions customers can specify that would be applied to their instances after scheduled or unexpected host maintenance. - * `RESTORE_INSTANCE` - This would be the default action if recoveryAction is not set. VM instances - will be restored to the power state it was in before maintenance. - * `STOP_INSTANCE` - This action allow customers to have their VM instances be stopped after maintenance. + The lifecycle state for an instance when it is recovered after infrastructure maintenance. + * `RESTORE_INSTANCE` - The instance is restored to the lifecycle state it was in before the maintenance event. + If the instance was running, it is automatically rebooted. This is the default action when a value is not set. + * `STOP_INSTANCE` - The instance is recovered in the stopped state. Allowed values for this property are: "RESTORE_INSTANCE", "STOP_INSTANCE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -65,10 +65,10 @@ def recovery_action(self): def recovery_action(self, recovery_action): """ Sets the recovery_action of this InstanceAvailabilityConfig. - Actions customers can specify that would be applied to their instances after scheduled or unexpected host maintenance. - * `RESTORE_INSTANCE` - This would be the default action if recoveryAction is not set. VM instances - will be restored to the power state it was in before maintenance. - * `STOP_INSTANCE` - This action allow customers to have their VM instances be stopped after maintenance. + The lifecycle state for an instance when it is recovered after infrastructure maintenance. + * `RESTORE_INSTANCE` - The instance is restored to the lifecycle state it was in before the maintenance event. + If the instance was running, it is automatically rebooted. This is the default action when a value is not set. + * `STOP_INSTANCE` - The instance is recovered in the stopped state. :param recovery_action: The recovery_action of this InstanceAvailabilityConfig. diff --git a/src/oci/core/models/instance_configuration_availability_config.py b/src/oci/core/models/instance_configuration_availability_config.py index 536c1e7376..188cf4d71c 100644 --- a/src/oci/core/models/instance_configuration_availability_config.py +++ b/src/oci/core/models/instance_configuration_availability_config.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class InstanceConfigurationAvailabilityConfig(object): """ - Options for customers to define the general policy of how compute service perform maintenance on VM instances. + Options for defining the availabiity of a VM instance after a maintenance event that impacts the underlying hardware. """ #: A constant which can be used with the recovery_action property of a InstanceConfigurationAvailabilityConfig. @@ -47,10 +47,10 @@ def __init__(self, **kwargs): def recovery_action(self): """ Gets the recovery_action of this InstanceConfigurationAvailabilityConfig. - Actions customers can specify that would be applied to their instances after scheduled or unexpected host maintenance. - * `RESTORE_INSTANCE` - This would be the default action if recoveryAction is not set. VM instances - will be restored to the power state it was in before maintenance. - * `STOP_INSTANCE` - This action allow customers to have their VM instances be stopped after maintenance. + The lifecycle state for an instance when it is recovered after infrastructure maintenance. + * `RESTORE_INSTANCE` - The instance is restored to the lifecycle state it was in before the maintenance event. + If the instance was running, it is automatically rebooted. This is the default action when a value is not set. + * `STOP_INSTANCE` - The instance is recovered in the stopped state. Allowed values for this property are: "RESTORE_INSTANCE", "STOP_INSTANCE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -65,10 +65,10 @@ def recovery_action(self): def recovery_action(self, recovery_action): """ Sets the recovery_action of this InstanceConfigurationAvailabilityConfig. - Actions customers can specify that would be applied to their instances after scheduled or unexpected host maintenance. - * `RESTORE_INSTANCE` - This would be the default action if recoveryAction is not set. VM instances - will be restored to the power state it was in before maintenance. - * `STOP_INSTANCE` - This action allow customers to have their VM instances be stopped after maintenance. + The lifecycle state for an instance when it is recovered after infrastructure maintenance. + * `RESTORE_INSTANCE` - The instance is restored to the lifecycle state it was in before the maintenance event. + If the instance was running, it is automatically rebooted. This is the default action when a value is not set. + * `STOP_INSTANCE` - The instance is recovered in the stopped state. :param recovery_action: The recovery_action of this InstanceConfigurationAvailabilityConfig. diff --git a/src/oci/core/models/instance_configuration_launch_instance_details.py b/src/oci/core/models/instance_configuration_launch_instance_details.py index ff738225aa..656ae725dc 100644 --- a/src/oci/core/models/instance_configuration_launch_instance_details.py +++ b/src/oci/core/models/instance_configuration_launch_instance_details.py @@ -909,6 +909,8 @@ def preferred_maintenance_action(self, preferred_maintenance_action): def availability_config(self): """ Gets the availability_config of this InstanceConfigurationLaunchInstanceDetails. + Options for defining the availabiity of a VM instance after a maintenance event that impacts the underlying hardware. + :return: The availability_config of this InstanceConfigurationLaunchInstanceDetails. :rtype: InstanceConfigurationAvailabilityConfig @@ -919,6 +921,8 @@ def availability_config(self): def availability_config(self, availability_config): """ Sets the availability_config of this InstanceConfigurationLaunchInstanceDetails. + Options for defining the availabiity of a VM instance after a maintenance event that impacts the underlying hardware. + :param availability_config: The availability_config of this InstanceConfigurationLaunchInstanceDetails. :type: InstanceConfigurationAvailabilityConfig diff --git a/src/oci/core/models/launch_instance_availability_config_details.py b/src/oci/core/models/launch_instance_availability_config_details.py index 8c1ba483cc..5de472c6b5 100644 --- a/src/oci/core/models/launch_instance_availability_config_details.py +++ b/src/oci/core/models/launch_instance_availability_config_details.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class LaunchInstanceAvailabilityConfigDetails(object): """ - Options for customers to define the general policy of how compute service perform maintenance on VM instances. + Options for defining the availability of a VM instance after a maintenance event that impacts the underlying hardware. """ #: A constant which can be used with the recovery_action property of a LaunchInstanceAvailabilityConfigDetails. @@ -46,10 +46,10 @@ def __init__(self, **kwargs): def recovery_action(self): """ Gets the recovery_action of this LaunchInstanceAvailabilityConfigDetails. - Actions customers can specify that would be applied to their instances after scheduled or unexpected host maintenance. - * `RESTORE_INSTANCE` - This would be the default action if recoveryAction is not set. VM instances - will be restored to the power state it was in before maintenance. - * `STOP_INSTANCE` - This action allow customers to have their VM instances be stopped after maintenance. + The lifecycle state for an instance when it is recovered after infrastructure maintenance. + * `RESTORE_INSTANCE` - The instance is restored to the lifecycle state it was in before the maintenance event. + If the instance was running, it is automatically rebooted. This is the default action when a value is not set. + * `STOP_INSTANCE` - The instance is recovered in the stopped state. Allowed values for this property are: "RESTORE_INSTANCE", "STOP_INSTANCE" @@ -63,10 +63,10 @@ def recovery_action(self): def recovery_action(self, recovery_action): """ Sets the recovery_action of this LaunchInstanceAvailabilityConfigDetails. - Actions customers can specify that would be applied to their instances after scheduled or unexpected host maintenance. - * `RESTORE_INSTANCE` - This would be the default action if recoveryAction is not set. VM instances - will be restored to the power state it was in before maintenance. - * `STOP_INSTANCE` - This action allow customers to have their VM instances be stopped after maintenance. + The lifecycle state for an instance when it is recovered after infrastructure maintenance. + * `RESTORE_INSTANCE` - The instance is restored to the lifecycle state it was in before the maintenance event. + If the instance was running, it is automatically rebooted. This is the default action when a value is not set. + * `STOP_INSTANCE` - The instance is recovered in the stopped state. :param recovery_action: The recovery_action of this LaunchInstanceAvailabilityConfigDetails. diff --git a/src/oci/core/models/launch_instance_details.py b/src/oci/core/models/launch_instance_details.py index 11a3807585..6e74db3590 100644 --- a/src/oci/core/models/launch_instance_details.py +++ b/src/oci/core/models/launch_instance_details.py @@ -620,6 +620,8 @@ def launch_options(self, launch_options): def availability_config(self): """ Gets the availability_config of this LaunchInstanceDetails. + Options for defining the availability of a VM instance after a maintenance event that impacts the underlying hardware. + :return: The availability_config of this LaunchInstanceDetails. :rtype: LaunchInstanceAvailabilityConfigDetails @@ -630,6 +632,8 @@ def availability_config(self): def availability_config(self, availability_config): """ Sets the availability_config of this LaunchInstanceDetails. + Options for defining the availability of a VM instance after a maintenance event that impacts the underlying hardware. + :param availability_config: The availability_config of this LaunchInstanceDetails. :type: LaunchInstanceAvailabilityConfigDetails diff --git a/src/oci/core/models/nat_gateway.py b/src/oci/core/models/nat_gateway.py index 7becfd763b..502302afcc 100644 --- a/src/oci/core/models/nat_gateway.py +++ b/src/oci/core/models/nat_gateway.py @@ -91,6 +91,10 @@ def __init__(self, **kwargs): The value to assign to the vcn_id property of this NatGateway. :type vcn_id: str + :param public_ip_id: + The value to assign to the public_ip_id property of this NatGateway. + :type public_ip_id: str + """ self.swagger_types = { 'compartment_id': 'str', @@ -102,7 +106,8 @@ def __init__(self, **kwargs): 'lifecycle_state': 'str', 'nat_ip': 'str', 'time_created': 'datetime', - 'vcn_id': 'str' + 'vcn_id': 'str', + 'public_ip_id': 'str' } self.attribute_map = { @@ -115,7 +120,8 @@ def __init__(self, **kwargs): 'lifecycle_state': 'lifecycleState', 'nat_ip': 'natIp', 'time_created': 'timeCreated', - 'vcn_id': 'vcnId' + 'vcn_id': 'vcnId', + 'public_ip_id': 'publicIpId' } self._compartment_id = None @@ -128,6 +134,7 @@ def __init__(self, **kwargs): self._nat_ip = None self._time_created = None self._vcn_id = None + self._public_ip_id = None @property def compartment_id(self): @@ -425,6 +432,34 @@ def vcn_id(self, vcn_id): """ self._vcn_id = vcn_id + @property + def public_ip_id(self): + """ + Gets the public_ip_id of this NatGateway. + The `OCID`__ of the Public IP associated with the NAT gateway. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The public_ip_id of this NatGateway. + :rtype: str + """ + return self._public_ip_id + + @public_ip_id.setter + def public_ip_id(self, public_ip_id): + """ + Sets the public_ip_id of this NatGateway. + The `OCID`__ of the Public IP associated with the NAT gateway. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param public_ip_id: The public_ip_id of this NatGateway. + :type: str + """ + self._public_ip_id = public_ip_id + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/core/models/public_ip.py b/src/oci/core/models/public_ip.py index 28f84676b8..6036c1053d 100644 --- a/src/oci/core/models/public_ip.py +++ b/src/oci/core/models/public_ip.py @@ -151,6 +151,10 @@ def __init__(self, **kwargs): The value to assign to the time_created property of this PublicIp. :type time_created: datetime + :param public_ip_pool_id: + The value to assign to the public_ip_pool_id property of this PublicIp. + :type public_ip_pool_id: str + """ self.swagger_types = { 'assigned_entity_id': 'str', @@ -166,7 +170,8 @@ def __init__(self, **kwargs): 'lifetime': 'str', 'private_ip_id': 'str', 'scope': 'str', - 'time_created': 'datetime' + 'time_created': 'datetime', + 'public_ip_pool_id': 'str' } self.attribute_map = { @@ -183,7 +188,8 @@ def __init__(self, **kwargs): 'lifetime': 'lifetime', 'private_ip_id': 'privateIpId', 'scope': 'scope', - 'time_created': 'timeCreated' + 'time_created': 'timeCreated', + 'public_ip_pool_id': 'publicIpPoolId' } self._assigned_entity_id = None @@ -200,6 +206,7 @@ def __init__(self, **kwargs): self._private_ip_id = None self._scope = None self._time_created = None + self._public_ip_pool_id = None @property def assigned_entity_id(self): @@ -673,6 +680,30 @@ def time_created(self, time_created): """ self._time_created = time_created + @property + def public_ip_pool_id(self): + """ + Gets the public_ip_pool_id of this PublicIp. + OCID of the pool object created by the current tenancy + + + :return: The public_ip_pool_id of this PublicIp. + :rtype: str + """ + return self._public_ip_pool_id + + @public_ip_pool_id.setter + def public_ip_pool_id(self, public_ip_pool_id): + """ + Sets the public_ip_pool_id of this PublicIp. + OCID of the pool object created by the current tenancy + + + :param public_ip_pool_id: The public_ip_pool_id of this PublicIp. + :type: str + """ + self._public_ip_pool_id = public_ip_pool_id + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/core/models/public_ip_pool.py b/src/oci/core/models/public_ip_pool.py new file mode 100644 index 0000000000..dc08de1ab3 --- /dev/null +++ b/src/oci/core/models/public_ip_pool.py @@ -0,0 +1,345 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 PublicIpPool(object): + """ + A Public IP pool, conceptually, is a set of public IP addresses (represented as one or more CIDRs) Users can be allocated addresses from this for internet access. + """ + + #: A constant which can be used with the lifecycle_state property of a PublicIpPool. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a PublicIpPool. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a PublicIpPool. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a PublicIpPool. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a PublicIpPool. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new PublicIpPool object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param cidr_blocks: + The value to assign to the cidr_blocks property of this PublicIpPool. + :type cidr_blocks: list[str] + + :param compartment_id: + The value to assign to the compartment_id property of this PublicIpPool. + :type compartment_id: str + + :param defined_tags: + The value to assign to the defined_tags property of this PublicIpPool. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this PublicIpPool. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this PublicIpPool. + :type freeform_tags: dict(str, str) + + :param id: + The value to assign to the id property of this PublicIpPool. + :type id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this PublicIpPool. + Allowed values for this property are: "INACTIVE", "UPDATING", "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this PublicIpPool. + :type time_created: datetime + + """ + self.swagger_types = { + 'cidr_blocks': 'list[str]', + 'compartment_id': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)', + 'id': 'str', + 'lifecycle_state': 'str', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'cidr_blocks': 'cidrBlocks', + 'compartment_id': 'compartmentId', + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags', + 'id': 'id', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated' + } + + self._cidr_blocks = None + self._compartment_id = None + self._defined_tags = None + self._display_name = None + self._freeform_tags = None + self._id = None + self._lifecycle_state = None + self._time_created = None + + @property + def cidr_blocks(self): + """ + Gets the cidr_blocks of this PublicIpPool. + The CIDRs that make up this pool + + + :return: The cidr_blocks of this PublicIpPool. + :rtype: list[str] + """ + return self._cidr_blocks + + @cidr_blocks.setter + def cidr_blocks(self, cidr_blocks): + """ + Sets the cidr_blocks of this PublicIpPool. + The CIDRs that make up this pool + + + :param cidr_blocks: The cidr_blocks of this PublicIpPool. + :type: list[str] + """ + self._cidr_blocks = cidr_blocks + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this PublicIpPool. + The OCID of the compartment containing the Public IP Pool + + + :return: The compartment_id of this PublicIpPool. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this PublicIpPool. + The OCID of the compartment containing the Public IP Pool + + + :param compartment_id: The compartment_id of this PublicIpPool. + :type: str + """ + self._compartment_id = compartment_id + + @property + def defined_tags(self): + """ + Gets the defined_tags of this PublicIpPool. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this PublicIpPool. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this PublicIpPool. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this PublicIpPool. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this PublicIpPool. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :return: The display_name of this PublicIpPool. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this PublicIpPool. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :param display_name: The display_name of this PublicIpPool. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this PublicIpPool. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this PublicIpPool. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this PublicIpPool. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this PublicIpPool. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def id(self): + """ + **[Required]** Gets the id of this PublicIpPool. + The Oracle ID (OCID) of the Public Ip Pool. + + + :return: The id of this PublicIpPool. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this PublicIpPool. + The Oracle ID (OCID) of the Public Ip Pool. + + + :param id: The id of this PublicIpPool. + :type: str + """ + self._id = id + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this PublicIpPool. + The Public IP Pool's current state. + + Allowed values for this property are: "INACTIVE", "UPDATING", "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this PublicIpPool. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this PublicIpPool. + The Public IP Pool's current state. + + + :param lifecycle_state: The lifecycle_state of this PublicIpPool. + :type: str + """ + allowed_values = ["INACTIVE", "UPDATING", "ACTIVE", "DELETING", "DELETED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this PublicIpPool. + The date and time the public IP Pool was created, in the format defined by `RFC3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this PublicIpPool. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this PublicIpPool. + The date and time the public IP Pool was created, in the format defined by `RFC3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this PublicIpPool. + :type: datetime + """ + self._time_created = time_created + + 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/public_ip_pool_collection.py b/src/oci/core/models/public_ip_pool_collection.py new file mode 100644 index 0000000000..19ced52ecf --- /dev/null +++ b/src/oci/core/models/public_ip_pool_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 PublicIpPoolCollection(object): + """ + Results of a ListPublicIpPool operation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PublicIpPoolCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this PublicIpPoolCollection. + :type items: list[PublicIpPoolSummary] + + """ + self.swagger_types = { + 'items': 'list[PublicIpPoolSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this PublicIpPoolCollection. + list of Public Ip pool object summaries + + + :return: The items of this PublicIpPoolCollection. + :rtype: list[PublicIpPoolSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this PublicIpPoolCollection. + list of Public Ip pool object summaries + + + :param items: The items of this PublicIpPoolCollection. + :type: list[PublicIpPoolSummary] + """ + self._items = items + + 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/public_ip_pool_summary.py b/src/oci/core/models/public_ip_pool_summary.py new file mode 100644 index 0000000000..a853286ac6 --- /dev/null +++ b/src/oci/core/models/public_ip_pool_summary.py @@ -0,0 +1,286 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 PublicIpPoolSummary(object): + """ + Summary information about a Public IP pool + """ + + def __init__(self, **kwargs): + """ + Initializes a new PublicIpPoolSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this PublicIpPoolSummary. + :type compartment_id: str + + :param defined_tags: + The value to assign to the defined_tags property of this PublicIpPoolSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this PublicIpPoolSummary. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this PublicIpPoolSummary. + :type freeform_tags: dict(str, str) + + :param id: + The value to assign to the id property of this PublicIpPoolSummary. + :type id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this PublicIpPoolSummary. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this PublicIpPoolSummary. + :type time_created: datetime + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)', + 'id': 'str', + 'lifecycle_state': 'str', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags', + 'id': 'id', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated' + } + + self._compartment_id = None + self._defined_tags = None + self._display_name = None + self._freeform_tags = None + self._id = None + self._lifecycle_state = None + self._time_created = None + + @property + def compartment_id(self): + """ + Gets the compartment_id of this PublicIpPoolSummary. + The OCID of the compartment containing the Public IP Pool + + + :return: The compartment_id of this PublicIpPoolSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this PublicIpPoolSummary. + The OCID of the compartment containing the Public IP Pool + + + :param compartment_id: The compartment_id of this PublicIpPoolSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def defined_tags(self): + """ + Gets the defined_tags of this PublicIpPoolSummary. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this PublicIpPoolSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this PublicIpPoolSummary. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this PublicIpPoolSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this PublicIpPoolSummary. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :return: The display_name of this PublicIpPoolSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this PublicIpPoolSummary. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :param display_name: The display_name of this PublicIpPoolSummary. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this PublicIpPoolSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this PublicIpPoolSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this PublicIpPoolSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this PublicIpPoolSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def id(self): + """ + Gets the id of this PublicIpPoolSummary. + The Oracle ID (OCID) of the Public Ip Pool. + + + :return: The id of this PublicIpPoolSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this PublicIpPoolSummary. + The Oracle ID (OCID) of the Public Ip Pool. + + + :param id: The id of this PublicIpPoolSummary. + :type: str + """ + self._id = id + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this PublicIpPoolSummary. + The Public IP Pool's current state. + + + :return: The lifecycle_state of this PublicIpPoolSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this PublicIpPoolSummary. + The Public IP Pool's current state. + + + :param lifecycle_state: The lifecycle_state of this PublicIpPoolSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + Gets the time_created of this PublicIpPoolSummary. + The date and time the public IP Pool was created, in the format defined by `RFC3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this PublicIpPoolSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this PublicIpPoolSummary. + The date and time the public IP Pool was created, in the format defined by `RFC3339`__. + + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this PublicIpPoolSummary. + :type: datetime + """ + self._time_created = time_created + + 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/remove_public_ip_pool_capacity_details.py b/src/oci/core/models/remove_public_ip_pool_capacity_details.py new file mode 100644 index 0000000000..990b1e721e --- /dev/null +++ b/src/oci/core/models/remove_public_ip_pool_capacity_details.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 RemovePublicIpPoolCapacityDetails(object): + """ + The data to remove capacity from a public ip pool + """ + + def __init__(self, **kwargs): + """ + Initializes a new RemovePublicIpPoolCapacityDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param cidr_block: + The value to assign to the cidr_block property of this RemovePublicIpPoolCapacityDetails. + :type cidr_block: str + + """ + self.swagger_types = { + 'cidr_block': 'str' + } + + self.attribute_map = { + 'cidr_block': 'cidrBlock' + } + + self._cidr_block = None + + @property + def cidr_block(self): + """ + **[Required]** Gets the cidr_block of this RemovePublicIpPoolCapacityDetails. + The CIDR IP address range to be removed from the Public Ip Pool + Example: `10.0.1.0/24` + + + :return: The cidr_block of this RemovePublicIpPoolCapacityDetails. + :rtype: str + """ + return self._cidr_block + + @cidr_block.setter + def cidr_block(self, cidr_block): + """ + Sets the cidr_block of this RemovePublicIpPoolCapacityDetails. + The CIDR IP address range to be removed from the Public Ip Pool + Example: `10.0.1.0/24` + + + :param cidr_block: The cidr_block of this RemovePublicIpPoolCapacityDetails. + :type: str + """ + self._cidr_block = cidr_block + + 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/update_byoip_range_details.py b/src/oci/core/models/update_byoip_range_details.py new file mode 100644 index 0000000000..2b59b22769 --- /dev/null +++ b/src/oci/core/models/update_byoip_range_details.py @@ -0,0 +1,154 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 UpdateByoipRangeDetails(object): + """ + The data to update a Byoip Range + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateByoipRangeDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateByoipRangeDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this UpdateByoipRangeDetails. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateByoipRangeDetails. + :type freeform_tags: dict(str, str) + + """ + self.swagger_types = { + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)' + } + + self.attribute_map = { + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags' + } + + self._defined_tags = None + self._display_name = None + self._freeform_tags = None + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateByoipRangeDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateByoipRangeDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateByoipRangeDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateByoipRangeDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this UpdateByoipRangeDetails. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid + entering confidential information. + + + :return: The display_name of this UpdateByoipRangeDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateByoipRangeDetails. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid + entering confidential information. + + + :param display_name: The display_name of this UpdateByoipRangeDetails. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateByoipRangeDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateByoipRangeDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateByoipRangeDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateByoipRangeDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + 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/update_instance_availability_config_details.py b/src/oci/core/models/update_instance_availability_config_details.py index 790f3fb772..f67a6a39a6 100644 --- a/src/oci/core/models/update_instance_availability_config_details.py +++ b/src/oci/core/models/update_instance_availability_config_details.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class UpdateInstanceAvailabilityConfigDetails(object): """ - Options for customers to define the general policy of how compute service perform maintenance on VM instances. + Options for defining the availability of a VM instance after a maintenance event that impacts the underlying hardware. """ #: A constant which can be used with the recovery_action property of a UpdateInstanceAvailabilityConfigDetails. @@ -46,10 +46,10 @@ def __init__(self, **kwargs): def recovery_action(self): """ Gets the recovery_action of this UpdateInstanceAvailabilityConfigDetails. - Actions customers can specify that would be applied to their instances after scheduled or unexpected host maintenance. - * `RESTORE_INSTANCE` - This would be the default action if recoveryAction is not set. VM instances - will be restored to the power state it was in before maintenance. - * `STOP_INSTANCE` - This action allow customers to have their VM instances be stopped after maintenance. + The lifecycle state for an instance when it is recovered after infrastructure maintenance. + * `RESTORE_INSTANCE` - The instance is restored to the lifecycle state it was in before the maintenance event. + If the instance was running, it is automatically rebooted. This is the default action when a value is not set. + * `STOP_INSTANCE` - The instance is recovered in the stopped state. Allowed values for this property are: "RESTORE_INSTANCE", "STOP_INSTANCE" @@ -63,10 +63,10 @@ def recovery_action(self): def recovery_action(self, recovery_action): """ Sets the recovery_action of this UpdateInstanceAvailabilityConfigDetails. - Actions customers can specify that would be applied to their instances after scheduled or unexpected host maintenance. - * `RESTORE_INSTANCE` - This would be the default action if recoveryAction is not set. VM instances - will be restored to the power state it was in before maintenance. - * `STOP_INSTANCE` - This action allow customers to have their VM instances be stopped after maintenance. + The lifecycle state for an instance when it is recovered after infrastructure maintenance. + * `RESTORE_INSTANCE` - The instance is restored to the lifecycle state it was in before the maintenance event. + If the instance was running, it is automatically rebooted. This is the default action when a value is not set. + * `STOP_INSTANCE` - The instance is recovered in the stopped state. :param recovery_action: The recovery_action of this UpdateInstanceAvailabilityConfigDetails. diff --git a/src/oci/core/models/update_instance_console_connection_details.py b/src/oci/core/models/update_instance_console_connection_details.py new file mode 100644 index 0000000000..dfcc912fde --- /dev/null +++ b/src/oci/core/models/update_instance_console_connection_details.py @@ -0,0 +1,121 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 UpdateInstanceConsoleConnectionDetails(object): + """ + Specifies the properties for updating tags for an instance console connection. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateInstanceConsoleConnectionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateInstanceConsoleConnectionDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateInstanceConsoleConnectionDetails. + :type freeform_tags: dict(str, str) + + """ + self.swagger_types = { + 'defined_tags': 'dict(str, dict(str, object))', + 'freeform_tags': 'dict(str, str)' + } + + self.attribute_map = { + 'defined_tags': 'definedTags', + 'freeform_tags': 'freeformTags' + } + + self._defined_tags = None + self._freeform_tags = None + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateInstanceConsoleConnectionDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateInstanceConsoleConnectionDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateInstanceConsoleConnectionDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateInstanceConsoleConnectionDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateInstanceConsoleConnectionDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateInstanceConsoleConnectionDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateInstanceConsoleConnectionDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateInstanceConsoleConnectionDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + 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/update_instance_details.py b/src/oci/core/models/update_instance_details.py index 9452a26fee..88de0268ea 100644 --- a/src/oci/core/models/update_instance_details.py +++ b/src/oci/core/models/update_instance_details.py @@ -467,6 +467,8 @@ def launch_options(self, launch_options): def availability_config(self): """ Gets the availability_config of this UpdateInstanceDetails. + Options for defining the availability of a VM instance after a maintenance event that impacts the underlying hardware. + :return: The availability_config of this UpdateInstanceDetails. :rtype: UpdateInstanceAvailabilityConfigDetails @@ -477,6 +479,8 @@ def availability_config(self): def availability_config(self, availability_config): """ Sets the availability_config of this UpdateInstanceDetails. + Options for defining the availability of a VM instance after a maintenance event that impacts the underlying hardware. + :param availability_config: The availability_config of this UpdateInstanceDetails. :type: UpdateInstanceAvailabilityConfigDetails diff --git a/src/oci/core/models/update_public_ip_pool_details.py b/src/oci/core/models/update_public_ip_pool_details.py new file mode 100644 index 0000000000..d1595991c3 --- /dev/null +++ b/src/oci/core/models/update_public_ip_pool_details.py @@ -0,0 +1,154 @@ +# coding: utf-8 +# Copyright (c) 2016, 2020, 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. + + +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 UpdatePublicIpPoolDetails(object): + """ + The data to update a public ip pool + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdatePublicIpPoolDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param defined_tags: + The value to assign to the defined_tags property of this UpdatePublicIpPoolDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this UpdatePublicIpPoolDetails. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdatePublicIpPoolDetails. + :type freeform_tags: dict(str, str) + + """ + self.swagger_types = { + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)' + } + + self.attribute_map = { + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags' + } + + self._defined_tags = None + self._display_name = None + self._freeform_tags = None + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdatePublicIpPoolDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdatePublicIpPoolDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdatePublicIpPoolDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdatePublicIpPoolDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this UpdatePublicIpPoolDetails. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid + entering confidential information. + + + :return: The display_name of this UpdatePublicIpPoolDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdatePublicIpPoolDetails. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid + entering confidential information. + + + :param display_name: The display_name of this UpdatePublicIpPoolDetails. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdatePublicIpPoolDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdatePublicIpPoolDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdatePublicIpPoolDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdatePublicIpPoolDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + 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/update_volume_backup_policy_details.py b/src/oci/core/models/update_volume_backup_policy_details.py index 403db15600..2afbd8b684 100644 --- a/src/oci/core/models/update_volume_backup_policy_details.py +++ b/src/oci/core/models/update_volume_backup_policy_details.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class UpdateVolumeBackupPolicyDetails(object): """ - Specifies the properties for a updating a user defined backup policy. + Specifies the properties for updating a user defined backup policy. For more information about user defined backup policies, see `User Defined Policies`__ in `Policy-Based Backups`__. diff --git a/src/oci/core/virtual_network_client.py b/src/oci/core/virtual_network_client.py index dc992e1361..ea059cc1f9 100644 --- a/src/oci/core/virtual_network_client.py +++ b/src/oci/core/virtual_network_client.py @@ -161,6 +161,170 @@ def add_network_security_group_security_rules(self, network_security_group_id, a body=add_network_security_group_security_rules_details, response_type="AddedNetworkSecurityGroupSecurityRules") + def add_public_ip_pool_capacity(self, public_ip_pool_id, add_public_ip_pool_capacity_details, **kwargs): + """ + Adds a Cidr from the named Byoip Range prefix to the referenced Public IP Pool. + The cidr must be a subset of the Byoip Range in question. + The cidr must not overlap with any other cidr already added to this + or any other Public Ip Pool. + + + :param str public_ip_pool_id: (required) + The OCID of the Public Ip Pool object. + + :param AddPublicIpPoolCapacityDetails add_public_ip_pool_capacity_details: (required) + Byoip Range prefix and a cidr from it + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIpPool` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/publicIpPools/{publicIpPoolId}/actions/addCapacity" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "add_public_ip_pool_capacity got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "publicIpPoolId": public_ip_pool_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + 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=add_public_ip_pool_capacity_details, + response_type="PublicIpPool") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=add_public_ip_pool_capacity_details, + response_type="PublicIpPool") + + def advertise_byoip_range(self, byoip_range_id, **kwargs): + """ + initiate route advertisements for the Byoip Range prefix. + the prefix must be in PROVISIONED state + + + :param str byoip_range_id: (required) + The OCID of the Byoip Range object. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/byoipRanges/{byoipRangeId}/actions/advertise" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "advertise_byoip_range got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "byoipRangeId": byoip_range_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + def attach_service_id(self, service_gateway_id, attach_service_details, **kwargs): """ Adds the specified :class:`Service` to the list of enabled @@ -389,6 +553,97 @@ def bulk_delete_virtual_circuit_public_prefixes(self, virtual_circuit_id, bulk_d header_params=header_params, body=bulk_delete_virtual_circuit_public_prefixes_details) + def change_byoip_range_compartment(self, byoip_range_id, change_byoip_range_compartment_details, **kwargs): + """ + Moves a byoip range into a different compartment within the same tenancy. For information + about moving resources between compartments, see + `Moving Resources to a Different Compartment`__. + + __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes + + + :param str byoip_range_id: (required) + The OCID of the Byoip Range object. + + :param ChangeByoipRangeCompartmentDetails change_byoip_range_compartment_details: (required) + Request to change the compartment of a Byoip Range. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/byoipRanges/{byoipRangeId}/actions/changeCompartment" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "change_byoip_range_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "byoipRangeId": byoip_range_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + 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=change_byoip_range_compartment_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_byoip_range_compartment_details) + def change_cpe_compartment(self, cpe_id, change_cpe_compartment_details, **kwargs): """ Moves a CPE object into a different compartment within the same tenancy. For information @@ -1396,20 +1651,20 @@ def change_public_ip_compartment(self, public_ip_id, change_public_ip_compartmen header_params=header_params, body=change_public_ip_compartment_details) - def change_remote_peering_connection_compartment(self, remote_peering_connection_id, change_remote_peering_connection_compartment_details, **kwargs): + def change_public_ip_pool_compartment(self, public_ip_pool_id, change_public_ip_pool_compartment_details, **kwargs): """ - Moves a remote peering connection (RPC) into a different compartment within the same tenancy. For information + Moves a public IP pool into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes - :param str remote_peering_connection_id: (required) - The OCID of the remote peering connection (RPC). + :param str public_ip_pool_id: (required) + The OCID of the Public Ip Pool object. - :param ChangeRemotePeeringConnectionCompartmentDetails change_remote_peering_connection_compartment_details: (required) - Request to change the compartment of a Remote Peering Connection. + :param ChangePublicIpPoolCompartmentDetails change_public_ip_pool_compartment_details: (required) + Request to change the compartment of a Public IP pool. :param str opc_request_id: (optional) Unique identifier for the request. @@ -1433,7 +1688,7 @@ def change_remote_peering_connection_compartment(self, remote_peering_connection :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` """ - resource_path = "/remotePeeringConnections/{remotePeeringConnectionId}/actions/changeCompartment" + resource_path = "/publicIpPools/{publicIpPoolId}/actions/changeCompartment" method = "POST" # Don't accept unknown kwargs @@ -1445,10 +1700,10 @@ def change_remote_peering_connection_compartment(self, remote_peering_connection extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "change_remote_peering_connection_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + "change_public_ip_pool_compartment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "remotePeeringConnectionId": remote_peering_connection_id + "publicIpPoolId": public_ip_pool_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1478,29 +1733,29 @@ def change_remote_peering_connection_compartment(self, remote_peering_connection method=method, path_params=path_params, header_params=header_params, - body=change_remote_peering_connection_compartment_details) + body=change_public_ip_pool_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=change_remote_peering_connection_compartment_details) + body=change_public_ip_pool_compartment_details) - def change_route_table_compartment(self, rt_id, change_route_table_compartment_details, **kwargs): + def change_remote_peering_connection_compartment(self, remote_peering_connection_id, change_remote_peering_connection_compartment_details, **kwargs): """ - Moves a route table into a different compartment within the same tenancy. For information + Moves a remote peering connection (RPC) into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes - :param str rt_id: (required) - The OCID of the route table. + :param str remote_peering_connection_id: (required) + The OCID of the remote peering connection (RPC). - :param ChangeRouteTableCompartmentDetails change_route_table_compartment_details: (required) - Request to change the compartment of a given route table. + :param ChangeRemotePeeringConnectionCompartmentDetails change_remote_peering_connection_compartment_details: (required) + Request to change the compartment of a Remote Peering Connection. :param str opc_request_id: (optional) Unique identifier for the request. @@ -1524,7 +1779,7 @@ def change_route_table_compartment(self, rt_id, change_route_table_compartment_d :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` """ - resource_path = "/routeTables/{rtId}/actions/changeCompartment" + resource_path = "/remotePeeringConnections/{remotePeeringConnectionId}/actions/changeCompartment" method = "POST" # Don't accept unknown kwargs @@ -1536,10 +1791,10 @@ def change_route_table_compartment(self, rt_id, change_route_table_compartment_d extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "change_route_table_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + "change_remote_peering_connection_compartment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "rtId": rt_id + "remotePeeringConnectionId": remote_peering_connection_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1569,18 +1824,109 @@ def change_route_table_compartment(self, rt_id, change_route_table_compartment_d method=method, path_params=path_params, header_params=header_params, - body=change_route_table_compartment_details) + body=change_remote_peering_connection_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=change_route_table_compartment_details) + body=change_remote_peering_connection_compartment_details) - def change_security_list_compartment(self, security_list_id, change_security_list_compartment_details, **kwargs): + def change_route_table_compartment(self, rt_id, change_route_table_compartment_details, **kwargs): """ - Moves a security list into a different compartment within the same tenancy. For information + Moves a route table into a different compartment within the same tenancy. For information + about moving resources between compartments, see + `Moving Resources to a Different Compartment`__. + + __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes + + + :param str rt_id: (required) + The OCID of the route table. + + :param ChangeRouteTableCompartmentDetails change_route_table_compartment_details: (required) + Request to change the compartment of a given route table. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/routeTables/{rtId}/actions/changeCompartment" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "change_route_table_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "rtId": rt_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + 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=change_route_table_compartment_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_route_table_compartment_details) + + def change_security_list_compartment(self, security_list_id, change_security_list_compartment_details, **kwargs): + """ + Moves a security list into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. @@ -2287,6 +2633,80 @@ def connect_remote_peering_connections(self, remote_peering_connection_id, conne header_params=header_params, body=connect_remote_peering_connections_details) + def create_byoip_range(self, create_byoip_range_details, **kwargs): + """ + Creates a Byoip Range prefix. + + + :param CreateByoipRangeDetails create_byoip_range_details: (required) + Create Byoip Range details. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ByoipRange` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/byoipRanges" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "create_byoip_range got unknown kwargs: {!r}".format(extra_kwargs)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_byoip_range_details, + response_type="ByoipRange") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_byoip_range_details, + response_type="ByoipRange") + def create_cpe(self, create_cpe_details, **kwargs): """ Creates a new virtual customer-premises equipment (CPE) object in the specified compartment. For @@ -3430,6 +3850,80 @@ def create_public_ip(self, create_public_ip_details, **kwargs): body=create_public_ip_details, response_type="PublicIp") + def create_public_ip_pool(self, create_public_ip_pool_details, **kwargs): + """ + Creates a Public Ip Pool + + + :param CreatePublicIpPoolDetails create_public_ip_pool_details: (required) + Create Public Ip Pool details + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIpPool` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/publicIpPools" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "create_public_ip_pool got unknown kwargs: {!r}".format(extra_kwargs)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_public_ip_pool_details, + response_type="PublicIpPool") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_public_ip_pool_details, + response_type="PublicIpPool") + def create_remote_peering_connection(self, create_remote_peering_connection_details, **kwargs): """ Creates a new remote peering connection (RPC) for the specified DRG. @@ -4127,15 +4621,22 @@ def create_vlan(self, create_vlan_details, **kwargs): body=create_vlan_details, response_type="Vlan") - def delete_cpe(self, cpe_id, **kwargs): + def delete_byoip_range(self, byoip_range_id, **kwargs): """ - Deletes the specified CPE object. The CPE must not be connected to a DRG. This is an asynchronous - operation. The CPE's `lifecycleState` will change to TERMINATING temporarily until the CPE is completely - removed. + Deletes the specified Byoip Range prefix. + The prefix must be in CREATING, PROVISIONED or FAILED state. + It must not have any subranges allocated to a Public Ip Pool object. + You must specify the object's OCID. + In case the range is currently PROVISIONED, the operation will be asynchronous as it needs to be de-ptovisioned first. - :param str cpe_id: (required) - The OCID of the CPE. + + :param str byoip_range_id: (required) + The OCID of the Byoip Range object. + + :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 if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` @@ -4153,21 +4654,22 @@ def delete_cpe(self, cpe_id, **kwargs): :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` """ - resource_path = "/cpes/{cpeId}" + resource_path = "/byoipRanges/{byoipRangeId}" method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", + "opc_request_id", "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_cpe got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_byoip_range got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "cpeId": cpe_id + "byoipRangeId": byoip_range_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -4179,6 +4681,7 @@ def delete_cpe(self, cpe_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -4201,14 +4704,15 @@ def delete_cpe(self, cpe_id, **kwargs): path_params=path_params, header_params=header_params) - def delete_cross_connect(self, cross_connect_id, **kwargs): + def delete_cpe(self, cpe_id, **kwargs): """ - Deletes the specified cross-connect. It must not be mapped to a - :class:`VirtualCircuit`. + Deletes the specified CPE object. The CPE must not be connected to a DRG. This is an asynchronous + operation. The CPE's `lifecycleState` will change to TERMINATING temporarily until the CPE is completely + removed. - :param str cross_connect_id: (required) - The OCID of the cross-connect. + :param str cpe_id: (required) + The OCID of the CPE. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` @@ -4226,7 +4730,7 @@ def delete_cross_connect(self, cross_connect_id, **kwargs): :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` """ - resource_path = "/crossConnects/{crossConnectId}" + resource_path = "/cpes/{cpeId}" method = "DELETE" # Don't accept unknown kwargs @@ -4237,10 +4741,10 @@ def delete_cross_connect(self, cross_connect_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_cross_connect got unknown kwargs: {!r}".format(extra_kwargs)) + "delete_cpe got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "crossConnectId": cross_connect_id + "cpeId": cpe_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -4274,14 +4778,87 @@ def delete_cross_connect(self, cross_connect_id, **kwargs): path_params=path_params, header_params=header_params) - def delete_cross_connect_group(self, cross_connect_group_id, **kwargs): + def delete_cross_connect(self, cross_connect_id, **kwargs): """ - Deletes the specified cross-connect group. It must not contain any - cross-connects, and it cannot be mapped to a + Deletes the specified cross-connect. It must not be mapped to a :class:`VirtualCircuit`. - :param str cross_connect_group_id: (required) + :param str cross_connect_id: (required) + The OCID of the cross-connect. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/crossConnects/{crossConnectId}" + method = "DELETE" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "delete_cross_connect got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "crossConnectId": cross_connect_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_cross_connect_group(self, cross_connect_group_id, **kwargs): + """ + Deletes the specified cross-connect group. It must not contain any + cross-connects, and it cannot be mapped to a + :class:`VirtualCircuit`. + + + :param str cross_connect_group_id: (required) The OCID of the cross-connect group. :param str if_match: (optional) @@ -5212,6 +5789,86 @@ def delete_public_ip(self, public_ip_id, **kwargs): path_params=path_params, header_params=header_params) + def delete_public_ip_pool(self, public_ip_pool_id, **kwargs): + """ + Deletes the specified Public Ip Pool + It must not have any active address allocations + You must specify the object's OCID. + + + :param str public_ip_pool_id: (required) + The OCID of the Public Ip Pool object. + + :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 if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/publicIpPools/{publicIpPoolId}" + method = "DELETE" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "delete_public_ip_pool got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "publicIpPoolId": public_ip_pool_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + def delete_remote_peering_connection(self, remote_peering_connection_id, **kwargs): """ Deletes the remote peering connection (RPC). @@ -5912,6 +6569,79 @@ def detach_service_id(self, service_gateway_id, detach_service_details, **kwargs body=detach_service_details, response_type="ServiceGateway") + def get_byoip_range(self, byoip_range_id, **kwargs): + """ + Gets the specified Byoip Range object. You must specify the object's OCID. + + + :param str byoip_range_id: (required) + The OCID of the Byoip Range object. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ByoipRange` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/byoipRanges/{byoipRangeId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "get_byoip_range got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "byoipRangeId": byoip_range_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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="ByoipRange") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="ByoipRange") + def get_cpe(self, cpe_id, **kwargs): """ Gets the specified CPE's information. @@ -7828,6 +8558,79 @@ def get_public_ip_by_private_ip_id(self, get_public_ip_by_private_ip_id_details, body=get_public_ip_by_private_ip_id_details, response_type="PublicIp") + def get_public_ip_pool(self, public_ip_pool_id, **kwargs): + """ + Gets the specified Public Ip Pool object. You must specify the object's OCID. + + + :param str public_ip_pool_id: (required) + The OCID of the Public Ip Pool object. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIpPool` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/publicIpPools/{publicIpPoolId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "get_public_ip_pool got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "publicIpPoolId": public_ip_pool_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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="PublicIpPool") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="PublicIpPool") + def get_remote_peering_connection(self, remote_peering_connection_id, **kwargs): """ Get the specified remote peering connection's information. @@ -8539,24 +9342,233 @@ def get_vlan(self, vlan_id, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Vlan` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Vlan` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/vlans/{vlanId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "get_vlan got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "vlanId": vlan_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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="Vlan") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Vlan") + + def get_vnic(self, vnic_id, **kwargs): + """ + Gets the information for the specified virtual network interface card (VNIC). + You can get the VNIC OCID from the + :func:`list_vnic_attachments` + operation. + + + :param str vnic_id: (required) + The OCID of the VNIC. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Vnic` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/vnics/{vnicId}" + method = "GET" + + expected_kwargs = ["retry_strategy"] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_vnic got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "vnicId": vnic_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json" + } + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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="Vnic") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Vnic") + + def list_allowed_peer_regions_for_remote_peering(self, **kwargs): + """ + Lists the regions that support remote VCN peering (which is peering across regions). + For more information, see `VCN Peering`__. + + __ https://docs.cloud.oracle.com/Content/Network/Tasks/VCNpeering.htm + + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.PeerRegionForRemotePeering` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/allowedPeerRegionsForRemotePeering" + method = "GET" + + expected_kwargs = ["retry_strategy"] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_allowed_peer_regions_for_remote_peering got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json" + } + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + response_type="list[PeerRegionForRemotePeering]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + response_type="list[PeerRegionForRemotePeering]") + + def list_byoip_allocated_ranges(self, byoip_range_id, **kwargs): + """ + Lists the ByoipAllocatedRange objects for the ByoipRange. + Each ByoipAllocatedRange object has a CIDR block part of the ByoipRange and the PublicIpPool it is assigned to. + + + :param str byoip_range_id: (required) + The OCID of the Byoip Range object. + + :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 int limit: (optional) + For list pagination. The maximum number of results per page, or items to return in a paginated + \"List\" call. For important details about how pagination works, see + `List Pagination`__. + + Example: `50` + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + call. For important details about how pagination works, see + `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ByoipAllocatedRangeCollection` :rtype: :class:`~oci.response.Response` """ - resource_path = "/vlans/{vlanId}" + resource_path = "/byoipRanges/{byoipRangeId}/byoipAllocatedRanges" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_request_id" + "opc_request_id", + "limit", + "page" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_vlan got unknown kwargs: {!r}".format(extra_kwargs)) + "list_byoip_allocated_ranges got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "vlanId": vlan_id + "byoipRangeId": byoip_range_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -8565,6 +9577,12 @@ def get_vlan(self, vlan_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + query_params = { + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + header_params = { "accept": "application/json", "content-type": "application/json", @@ -8582,89 +9600,72 @@ def get_vlan(self, vlan_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - response_type="Vlan") + response_type="ByoipAllocatedRangeCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, - response_type="Vlan") + response_type="ByoipAllocatedRangeCollection") - def get_vnic(self, vnic_id, **kwargs): + def list_byoip_ranges(self, compartment_id, **kwargs): """ - Gets the information for the specified virtual network interface card (VNIC). - You can get the VNIC OCID from the - :func:`list_vnic_attachments` - operation. + Lists the ByoipRange objects in the specified compartment. + You can filter the list by using query parameters. - :param str vnic_id: (required) - The OCID of the VNIC. + :param str compartment_id: (required) + The `OCID`__ of the compartment. - :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. + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm - This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` - is also available. The specifics of the default retry strategy are described `here `__. + :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. - To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to return in a paginated + \"List\" call. For important details about how pagination works, see + `List Pagination`__. - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.Vnic` - :rtype: :class:`~oci.response.Response` - """ - resource_path = "/vnics/{vnicId}" - method = "GET" + Example: `50` - expected_kwargs = ["retry_strategy"] - extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] - if extra_kwargs: - raise ValueError( - "get_vnic got unknown kwargs: {!r}".format(extra_kwargs)) + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine - path_params = { - "vnicId": vnic_id - } + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + call. For important details about how pagination works, see + `List Pagination`__. - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine - 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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + :param str display_name: (optional) + A filter to return only resources that match the given display name exactly. - header_params = { - "accept": "application/json", - "content-type": "application/json" - } + :param str lifecycle_state: (optional) + A filter to return only resources that match the given lifecycle state name exactly. - retry_strategy = self.retry_strategy - if kwargs.get('retry_strategy'): - retry_strategy = kwargs.get('retry_strategy') + :param str sort_by: (optional) + The field to sort by. You can provide one sort order (`sortOrder`). Default order for + TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + sort order is case sensitive. - if retry_strategy: - 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="Vnic") - else: - return self.base_client.call_api( - resource_path=resource_path, - method=method, - path_params=path_params, - header_params=header_params, - response_type="Vnic") + **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + optionally filter by availability domain if the scope of the resource type is within a + single availability domain. If you call one of these \"List\" operations without specifying + an availability domain, the resources are grouped by availability domain, then sorted. - def list_allowed_peer_regions_for_remote_peering(self, **kwargs): - """ - Lists the regions that support remote VCN peering (which is peering across regions). - For more information, see `VCN Peering`__. + Allowed values are: "TIMECREATED", "DISPLAYNAME" - __ https://docs.cloud.oracle.com/Content/Network/Tasks/VCNpeering.htm + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + is case sensitive. + Allowed values are: "ASC", "DESC" :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. @@ -8674,22 +9675,59 @@ def list_allowed_peer_regions_for_remote_peering(self, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.PeerRegionForRemotePeering` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ByoipRangeCollection` :rtype: :class:`~oci.response.Response` """ - resource_path = "/allowedPeerRegionsForRemotePeering" + resource_path = "/byoipRanges" method = "GET" - expected_kwargs = ["retry_strategy"] + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "limit", + "page", + "display_name", + "lifecycle_state", + "sort_by", + "sort_order" + ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_allowed_peer_regions_for_remote_peering got unknown kwargs: {!r}".format(extra_kwargs)) + "list_byoip_ranges got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + query_params = { + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "displayName": kwargs.get("display_name", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "compartmentId": compartment_id + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", - "content-type": "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.retry_strategy if kwargs.get('retry_strategy'): @@ -8700,14 +9738,16 @@ def list_allowed_peer_regions_for_remote_peering(self, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, + query_params=query_params, header_params=header_params, - response_type="list[PeerRegionForRemotePeering]") + response_type="ByoipRangeCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, + query_params=query_params, header_params=header_params, - response_type="list[PeerRegionForRemotePeering]") + response_type="ByoipRangeCollection") def list_cpe_device_shapes(self, **kwargs): """ @@ -10900,14 +11940,129 @@ def list_network_security_groups(self, compartment_id, **kwargs): ) query_params = { - "compartmentId": compartment_id, - "vcnId": kwargs.get("vcn_id", missing), + "compartmentId": compartment_id, + "vcnId": kwargs.get("vcn_id", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "displayName": kwargs.get("display_name", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json" + } + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[NetworkSecurityGroup]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[NetworkSecurityGroup]") + + def list_private_ips(self, **kwargs): + """ + Lists the :class:`PrivateIp` objects based + on one of these filters: + + - Subnet OCID. + - VNIC OCID. + - Both private IP address and subnet OCID: This lets + you get a `privateIP` object based on its private IP + address (for example, 10.0.3.3) and not its OCID. For comparison, + :func:`get_private_ip` + requires the OCID. + + If you're listing all the private IPs associated with a given subnet + or VNIC, the response includes both primary and secondary private IPs. + + If you are an Oracle Cloud VMware Solution customer and have VLANs + in your VCN, you can filter the list by VLAN OCID. See :class:`Vlan`. + + + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to return in a paginated + \"List\" call. For important details about how pagination works, see + `List Pagination`__. + + Example: `50` + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + call. For important details about how pagination works, see + `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str ip_address: (optional) + An IP address. This could be either IPv4 or IPv6, depending on the resource. + Example: `10.0.3.3` + + :param str subnet_id: (optional) + The OCID of the subnet. + + :param str vnic_id: (optional) + The OCID of the VNIC. + + :param str vlan_id: (optional) + The `OCID`__ of the VLAN. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.PrivateIp` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/privateIps" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "limit", + "page", + "ip_address", + "subnet_id", + "vnic_id", + "vlan_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_private_ips got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), - "displayName": kwargs.get("display_name", missing), - "sortBy": kwargs.get("sort_by", missing), - "sortOrder": kwargs.get("sort_order", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing) + "ipAddress": kwargs.get("ip_address", missing), + "subnetId": kwargs.get("subnet_id", missing), + "vnicId": kwargs.get("vnic_id", missing), + "vlanId": kwargs.get("vlan_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -10927,34 +12082,29 @@ def list_network_security_groups(self, compartment_id, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[NetworkSecurityGroup]") + response_type="list[PrivateIp]") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="list[NetworkSecurityGroup]") + response_type="list[PrivateIp]") - def list_private_ips(self, **kwargs): + def list_public_ip_pools(self, compartment_id, **kwargs): """ - Lists the :class:`PrivateIp` objects based - on one of these filters: + Lists the PublicIpPool objects in the specified compartment. + You can filter the list by using query parameters. - - Subnet OCID. - - VNIC OCID. - - Both private IP address and subnet OCID: This lets - you get a `privateIP` object based on its private IP - address (for example, 10.0.3.3) and not its OCID. For comparison, - :func:`get_private_ip` - requires the OCID. - If you're listing all the private IPs associated with a given subnet - or VNIC, the response includes both primary and secondary private IPs. + :param str compartment_id: (required) + The `OCID`__ of the compartment. - If you are an Oracle Cloud VMware Solution customer and have VLANs - in your VCN, you can filter the list by VLAN OCID. See :class:`Vlan`. + __ https://docs.cloud.oracle.com/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 int limit: (optional) For list pagination. The maximum number of results per page, or items to return in a paginated @@ -10972,20 +12122,29 @@ def list_private_ips(self, **kwargs): __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine - :param str ip_address: (optional) - An IP address. This could be either IPv4 or IPv6, depending on the resource. - Example: `10.0.3.3` + :param str display_name: (optional) + A filter to return only resources that match the given display name exactly. - :param str subnet_id: (optional) - The OCID of the subnet. + :param str byoip_range_id: (optional) + A filter to return only resources that match the given Byoip Range - :param str vnic_id: (optional) - The OCID of the VNIC. + :param str sort_by: (optional) + The field to sort by. You can provide one sort order (`sortOrder`). Default order for + TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + sort order is case sensitive. - :param str vlan_id: (optional) - The `OCID`__ of the VLAN. + **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + optionally filter by availability domain if the scope of the resource type is within a + single availability domain. If you call one of these \"List\" operations without specifying + an availability domain, the resources are grouped by availability domain, then sorted. - __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + Allowed values are: "TIMECREATED", "DISPLAYNAME" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + is case sensitive. + + Allowed values are: "ASC", "DESC" :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. @@ -10995,41 +12154,59 @@ def list_private_ips(self, **kwargs): To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.PrivateIp` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIpPoolCollection` :rtype: :class:`~oci.response.Response` """ - resource_path = "/privateIps" + resource_path = "/publicIpPools" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", + "opc_request_id", "limit", "page", - "ip_address", - "subnet_id", - "vnic_id", - "vlan_id" + "display_name", + "byoip_range_id", + "sort_by", + "sort_order" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_private_ips got unknown kwargs: {!r}".format(extra_kwargs)) + "list_public_ip_pools got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) query_params = { "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), - "ipAddress": kwargs.get("ip_address", missing), - "subnetId": kwargs.get("subnet_id", missing), - "vnicId": kwargs.get("vnic_id", missing), - "vlanId": kwargs.get("vlan_id", missing) + "displayName": kwargs.get("display_name", missing), + "byoipRangeId": kwargs.get("byoip_range_id", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "compartmentId": compartment_id } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} header_params = { "accept": "application/json", - "content-type": "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.retry_strategy if kwargs.get('retry_strategy'): @@ -11042,14 +12219,14 @@ def list_private_ips(self, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="list[PrivateIp]") + response_type="PublicIpPoolCollection") else: return self.base_client.call_api( resource_path=resource_path, method=method, query_params=query_params, header_params=header_params, - response_type="list[PrivateIp]") + response_type="PublicIpPoolCollection") def list_public_ips(self, scope, compartment_id, **kwargs): """ @@ -11120,6 +12297,9 @@ def list_public_ips(self, scope, compartment_id, **kwargs): Allowed values are: "EPHEMERAL", "RESERVED" + :param str public_ip_pool_id: (optional) + A filter to return only resources that belong to the given public IP pool. + :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. @@ -11140,7 +12320,8 @@ def list_public_ips(self, scope, compartment_id, **kwargs): "limit", "page", "availability_domain", - "lifetime" + "lifetime", + "public_ip_pool_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -11166,7 +12347,8 @@ def list_public_ips(self, scope, compartment_id, **kwargs): "scope": scope, "availabilityDomain": kwargs.get("availability_domain", missing), "lifetime": kwargs.get("lifetime", missing), - "compartmentId": compartment_id + "compartmentId": compartment_id, + "publicIpPoolId": kwargs.get("public_ip_pool_id", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -11851,7 +13033,7 @@ def list_subnets(self, compartment_id, **kwargs): Allowed values are: "ASC", "DESC" :param str lifecycle_state: (optional) - A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. Allowed values are: "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED" @@ -12512,12 +13694,166 @@ def list_vlans(self, compartment_id, vcn_id, **kwargs): "sortOrder": kwargs.get("sort_order", missing), "lifecycleState": kwargs.get("lifecycle_state", missing) } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[Vlan]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[Vlan]") + + def remove_network_security_group_security_rules(self, network_security_group_id, remove_network_security_group_security_rules_details, **kwargs): + """ + Removes one or more security rules from the specified network security group. + + + :param str network_security_group_id: (required) + The `OCID`__ of the network security group. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + :param RemoveNetworkSecurityGroupSecurityRulesDetails remove_network_security_group_security_rules_details: (required) + Request with one or more security rules associated with the network security group that + will be removed. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/networkSecurityGroups/{networkSecurityGroupId}/actions/removeSecurityRules" + method = "POST" + + expected_kwargs = ["retry_strategy"] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "remove_network_security_group_security_rules got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "networkSecurityGroupId": network_security_group_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json" + } + + retry_strategy = self.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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=remove_network_security_group_security_rules_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=remove_network_security_group_security_rules_details) + + def remove_public_ip_pool_capacity(self, public_ip_pool_id, remove_public_ip_pool_capacity_details, **kwargs): + """ + Removes a Cidr from the referenced Public IP Pool. + + + :param str public_ip_pool_id: (required) + The OCID of the Public Ip Pool object. + + :param RemovePublicIpPoolCapacityDetails remove_public_ip_pool_capacity_details: (required) + The Cidr to be removed from the Public Ip Pool + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIpPool` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/publicIpPools/{publicIpPoolId}/actions/removeCapacity" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "remove_public_ip_pool_capacity got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "publicIpPoolId": public_ip_pool_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing) + "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} @@ -12526,34 +13862,44 @@ def list_vlans(self, compartment_id, vcn_id, **kwargs): retry_strategy = kwargs.get('retry_strategy') if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="list[Vlan]") + body=remove_public_ip_pool_capacity_details, + response_type="PublicIpPool") else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="list[Vlan]") + body=remove_public_ip_pool_capacity_details, + response_type="PublicIpPool") - def remove_network_security_group_security_rules(self, network_security_group_id, remove_network_security_group_security_rules_details, **kwargs): + def update_byoip_range(self, byoip_range_id, update_byoip_range_details, **kwargs): """ - Removes one or more security rules from the specified network security group. + Updates the specified Byoip Range. - :param str network_security_group_id: (required) - The `OCID`__ of the network security group. + :param str byoip_range_id: (required) + The OCID of the Byoip Range object. - __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + :param UpdateByoipRangeDetails update_byoip_range_details: (required) + Byoip Range details. - :param RemoveNetworkSecurityGroupSecurityRulesDetails remove_network_security_group_security_rules_details: (required) - Request with one or more security rules associated with the network security group that - will be removed. + :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 if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. :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. @@ -12563,20 +13909,25 @@ def remove_network_security_group_security_rules(self, network_security_group_id To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ByoipRange` :rtype: :class:`~oci.response.Response` """ - resource_path = "/networkSecurityGroups/{networkSecurityGroupId}/actions/removeSecurityRules" - method = "POST" + resource_path = "/byoipRanges/{byoipRangeId}" + method = "PUT" - expected_kwargs = ["retry_strategy"] + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "if_match" + ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "remove_network_security_group_security_rules got unknown kwargs: {!r}".format(extra_kwargs)) + "update_byoip_range got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "networkSecurityGroupId": network_security_group_id + "byoipRangeId": byoip_range_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -12587,8 +13938,11 @@ def remove_network_security_group_security_rules(self, network_security_group_id header_params = { "accept": "application/json", - "content-type": "application/json" + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", 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.retry_strategy if kwargs.get('retry_strategy'): @@ -12601,14 +13955,16 @@ def remove_network_security_group_security_rules(self, network_security_group_id method=method, path_params=path_params, header_params=header_params, - body=remove_network_security_group_security_rules_details) + body=update_byoip_range_details, + response_type="ByoipRange") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=remove_network_security_group_security_rules_details) + body=update_byoip_range_details, + response_type="ByoipRange") def update_cpe(self, cpe_id, update_cpe_details, **kwargs): """ @@ -14070,6 +15426,91 @@ def update_public_ip(self, public_ip_id, update_public_ip_details, **kwargs): body=update_public_ip_details, response_type="PublicIp") + def update_public_ip_pool(self, public_ip_pool_id, update_public_ip_pool_details, **kwargs): + """ + Updates the specified Public Ip Pool. + + + :param str public_ip_pool_id: (required) + The OCID of the Public Ip Pool object. + + :param UpdatePublicIpPoolDetails update_public_ip_pool_details: (required) + Public Ip Pool details. + + :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 if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.PublicIpPool` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/publicIpPools/{publicIpPoolId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_public_ip_pool got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "publicIpPoolId": public_ip_pool_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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=update_public_ip_pool_details, + response_type="PublicIpPool") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_public_ip_pool_details, + response_type="PublicIpPool") + def update_remote_peering_connection(self, remote_peering_connection_id, update_remote_peering_connection_details, **kwargs): """ Updates the specified remote peering connection (RPC). @@ -14931,3 +16372,146 @@ def update_vnic(self, vnic_id, update_vnic_details, **kwargs): header_params=header_params, body=update_vnic_details, response_type="Vnic") + + def validate_byoip_range(self, byoip_range_id, **kwargs): + """ + submit the Byoip Range for validation. This presumes the user has + updated their IP registry record in accordance to validation requirements + + + :param str byoip_range_id: (required) + The OCID of the Byoip Range object. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/byoipRanges/{byoipRangeId}/actions/validate" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "validate_byoip_range got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "byoipRangeId": byoip_range_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def withdraw_byoip_range(self, byoip_range_id, **kwargs): + """ + stop route advertisements for the Byoip Range prefix. + + + :param str byoip_range_id: (required) + The OCID of the Byoip Range object. + + :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. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. 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`. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/byoipRanges/{byoipRangeId}/actions/withdraw" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "withdraw_byoip_range got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "byoipRangeId": byoip_range_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + 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.retry_strategy + if kwargs.get('retry_strategy'): + retry_strategy = kwargs.get('retry_strategy') + + if retry_strategy: + 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) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) diff --git a/src/oci/core/virtual_network_client_composite_operations.py b/src/oci/core/virtual_network_client_composite_operations.py index 11483754ba..2c8e5b6880 100644 --- a/src/oci/core/virtual_network_client_composite_operations.py +++ b/src/oci/core/virtual_network_client_composite_operations.py @@ -27,6 +27,47 @@ def __init__(self, client, work_request_client=None, **kwargs): self.client = client self._work_request_client = work_request_client if work_request_client else oci.work_requests.WorkRequestClient(self.client._config, **self.client._kwargs) + def add_public_ip_pool_capacity_and_wait_for_state(self, public_ip_pool_id, add_public_ip_pool_capacity_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.VirtualNetworkClient.add_public_ip_pool_capacity` and waits for the :py:class:`~oci.core.models.PublicIpPool` acted upon + to enter the given state(s). + + :param str public_ip_pool_id: (required) + The OCID of the Public Ip Pool object. + + :param AddPublicIpPoolCapacityDetails add_public_ip_pool_capacity_details: (required) + Byoip Range prefix and a cidr from it + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.PublicIpPool.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.VirtualNetworkClient.add_public_ip_pool_capacity` + + :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.add_public_ip_pool_capacity(public_ip_pool_id, add_public_ip_pool_capacity_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_public_ip_pool(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def attach_service_id_and_wait_for_state(self, service_gateway_id, attach_service_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.core.VirtualNetworkClient.attach_service_id` and waits for the :py:class:`~oci.core.models.ServiceGateway` acted upon @@ -226,6 +267,44 @@ def change_vlan_compartment_and_wait_for_work_request(self, vlan_id, change_vlan except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_byoip_range_and_wait_for_state(self, create_byoip_range_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.VirtualNetworkClient.create_byoip_range` and waits for the :py:class:`~oci.core.models.ByoipRange` acted upon + to enter the given state(s). + + :param CreateByoipRangeDetails create_byoip_range_details: (required) + Create Byoip Range details. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.ByoipRange.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.VirtualNetworkClient.create_byoip_range` + + :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.create_byoip_range(create_byoip_range_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_byoip_range(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_cross_connect_and_wait_for_state(self, create_cross_connect_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.core.VirtualNetworkClient.create_cross_connect` and waits for the :py:class:`~oci.core.models.CrossConnect` acted upon @@ -682,6 +761,44 @@ def create_public_ip_and_wait_for_state(self, create_public_ip_details, wait_for except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_public_ip_pool_and_wait_for_state(self, create_public_ip_pool_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.VirtualNetworkClient.create_public_ip_pool` and waits for the :py:class:`~oci.core.models.PublicIpPool` acted upon + to enter the given state(s). + + :param CreatePublicIpPoolDetails create_public_ip_pool_details: (required) + Create Public Ip Pool details + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.PublicIpPool.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.VirtualNetworkClient.create_public_ip_pool` + + :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.create_public_ip_pool(create_public_ip_pool_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_public_ip_pool(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_remote_peering_connection_and_wait_for_state(self, create_remote_peering_connection_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.core.VirtualNetworkClient.create_remote_peering_connection` and waits for the :py:class:`~oci.core.models.RemotePeeringConnection` acted upon @@ -986,6 +1103,41 @@ def create_vlan_and_wait_for_state(self, create_vlan_details, wait_for_states=[] except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_byoip_range_and_wait_for_work_request(self, byoip_range_id, work_request_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.VirtualNetworkClient.delete_byoip_range` and waits for the oci.work_requests.models.WorkRequest + to enter the given state(s). + + :param str byoip_range_id: (required) + The OCID of the Byoip Range object. + + :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.delete_byoip_range` + + :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.delete_byoip_range(byoip_range_id, **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] + 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 delete_cross_connect_and_wait_for_state(self, cross_connect_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.core.VirtualNetworkClient.delete_cross_connect` and waits for the :py:class:`~oci.core.models.CrossConnect` acted upon @@ -1556,6 +1708,53 @@ def delete_public_ip_and_wait_for_state(self, public_ip_id, wait_for_states=[], except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_public_ip_pool_and_wait_for_state(self, public_ip_pool_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.VirtualNetworkClient.delete_public_ip_pool` and waits for the :py:class:`~oci.core.models.PublicIpPool` acted upon + to enter the given state(s). + + :param str public_ip_pool_id: (required) + The OCID of the Public Ip Pool object. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.PublicIpPool.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.VirtualNetworkClient.delete_public_ip_pool` + + :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 + """ + initial_get_result = self.client.get_public_ip_pool(public_ip_pool_id) + operation_result = None + try: + operation_result = self.client.delete_public_ip_pool(public_ip_pool_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + + try: + waiter_result = oci.wait_until( + self.client, + initial_get_result, + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + succeed_on_not_found=True, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_remote_peering_connection_and_wait_for_state(self, remote_peering_connection_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.core.VirtualNetworkClient.delete_remote_peering_connection` and waits for the :py:class:`~oci.core.models.RemotePeeringConnection` acted upon @@ -1981,6 +2180,88 @@ 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 remove_public_ip_pool_capacity_and_wait_for_state(self, public_ip_pool_id, remove_public_ip_pool_capacity_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.VirtualNetworkClient.remove_public_ip_pool_capacity` and waits for the :py:class:`~oci.core.models.PublicIpPool` acted upon + to enter the given state(s). + + :param str public_ip_pool_id: (required) + The OCID of the Public Ip Pool object. + + :param RemovePublicIpPoolCapacityDetails remove_public_ip_pool_capacity_details: (required) + The Cidr to be removed from the Public Ip Pool + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.PublicIpPool.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.VirtualNetworkClient.remove_public_ip_pool_capacity` + + :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.remove_public_ip_pool_capacity(public_ip_pool_id, remove_public_ip_pool_capacity_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_public_ip_pool(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_byoip_range_and_wait_for_state(self, byoip_range_id, update_byoip_range_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.VirtualNetworkClient.update_byoip_range` and waits for the :py:class:`~oci.core.models.ByoipRange` acted upon + to enter the given state(s). + + :param str byoip_range_id: (required) + The OCID of the Byoip Range object. + + :param UpdateByoipRangeDetails update_byoip_range_details: (required) + Byoip Range details. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.ByoipRange.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.VirtualNetworkClient.update_byoip_range` + + :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.update_byoip_range(byoip_range_id, update_byoip_range_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_byoip_range(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_cross_connect_and_wait_for_state(self, cross_connect_id, update_cross_connect_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.core.VirtualNetworkClient.update_cross_connect` and waits for the :py:class:`~oci.core.models.CrossConnect` acted upon @@ -2525,6 +2806,47 @@ def update_public_ip_and_wait_for_state(self, public_ip_id, update_public_ip_det except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_public_ip_pool_and_wait_for_state(self, public_ip_pool_id, update_public_ip_pool_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.VirtualNetworkClient.update_public_ip_pool` and waits for the :py:class:`~oci.core.models.PublicIpPool` acted upon + to enter the given state(s). + + :param str public_ip_pool_id: (required) + The OCID of the Public Ip Pool object. + + :param UpdatePublicIpPoolDetails update_public_ip_pool_details: (required) + Public Ip Pool details. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.PublicIpPool.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.VirtualNetworkClient.update_public_ip_pool` + + :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.update_public_ip_pool(public_ip_pool_id, update_public_ip_pool_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_public_ip_pool(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_remote_peering_connection_and_wait_for_state(self, remote_peering_connection_id, update_remote_peering_connection_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.core.VirtualNetworkClient.update_remote_peering_connection` and waits for the :py:class:`~oci.core.models.RemotePeeringConnection` acted upon @@ -2899,3 +3221,38 @@ def update_vnic_and_wait_for_state(self, vnic_id, update_vnic_details, wait_for_ return result_to_return except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def validate_byoip_range_and_wait_for_work_request(self, byoip_range_id, work_request_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.VirtualNetworkClient.validate_byoip_range` and waits for the oci.work_requests.models.WorkRequest + to enter the given state(s). + + :param str byoip_range_id: (required) + The OCID of the Byoip Range object. + + :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.validate_byoip_range` + + :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.validate_byoip_range(byoip_range_id, **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] + 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) diff --git a/src/oci/object_storage/object_storage_client.py b/src/oci/object_storage/object_storage_client.py index 0e400a7f26..fa033d03ee 100644 --- a/src/oci/object_storage/object_storage_client.py +++ b/src/oci/object_storage/object_storage_client.py @@ -1769,6 +1769,24 @@ def get_object(self, namespace_name, bucket_name, object_name, **kwargs): __ https://docs.cloud.oracle.com/Content/Object/Tasks/usingyourencryptionkeys.htm + :param str http_response_content_disposition: (optional) + This value will be used in Content-Disposition header of the response. + + :param str http_response_cache_control: (optional) + This value will be used in Cache-Control header of the response. + + :param str http_response_content_type: (optional) + This value will be used in Content-Type header of the response. + + :param str http_response_content_language: (optional) + This value will be used in Content-Language header of the response. + + :param str http_response_content_encoding: (optional) + This value will be used in Content-Encoding header of the response + + :param str http_response_expires: (optional) + This value will be used in Expires header of the response + :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. @@ -1793,7 +1811,13 @@ def get_object(self, namespace_name, bucket_name, object_name, **kwargs): "range", "opc_sse_customer_algorithm", "opc_sse_customer_key", - "opc_sse_customer_key_sha256" + "opc_sse_customer_key_sha256", + "http_response_content_disposition", + "http_response_cache_control", + "http_response_content_type", + "http_response_content_language", + "http_response_content_encoding", + "http_response_expires" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: @@ -1813,7 +1837,13 @@ def get_object(self, namespace_name, bucket_name, object_name, **kwargs): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) query_params = { - "versionId": kwargs.get("version_id", missing) + "versionId": kwargs.get("version_id", missing), + "httpResponseContentDisposition": kwargs.get("http_response_content_disposition", missing), + "httpResponseCacheControl": kwargs.get("http_response_cache_control", missing), + "httpResponseContentType": kwargs.get("http_response_content_type", missing), + "httpResponseContentLanguage": kwargs.get("http_response_content_language", missing), + "httpResponseContentEncoding": kwargs.get("http_response_content_encoding", missing), + "httpResponseExpires": kwargs.get("http_response_expires", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} diff --git a/src/oci/version.py b/src/oci/version.py index 7183701b4c..8083710502 100644 --- a/src/oci/version.py +++ b/src/oci/version.py @@ -2,4 +2,4 @@ # Copyright (c) 2016, 2020, 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.21.5" +__version__ = "2.21.6"