From c0d527321d0d4e068ff1924408b45f303292642b Mon Sep 17 00:00:00 2001 From: dshelbyo Date: Thu, 18 Oct 2018 16:33:29 +0000 Subject: [PATCH] Releasing version 2.0.6 --- CHANGELOG.rst | 15 + docs/api/core.rst | 30 + ...oci.core.models.ComputeInstanceDetails.rst | 11 + ...ci.core.models.CopyVolumeBackupDetails.rst | 11 + ...els.CreateInstanceConfigurationDetails.rst | 11 + ....core.models.CreateInstancePoolDetails.rst | 11 + ...tancePoolPlacementConfigurationDetails.rst | 11 + .../oci.core.models.InstanceConfiguration.rst | 11 + ...InstanceConfigurationAttachVnicDetails.rst | 11 + ...stanceConfigurationAttachVolumeDetails.rst | 11 + ...nstanceConfigurationBlockVolumeDetails.rst | 11 + ...InstanceConfigurationCreateVnicDetails.rst | 11 + ...stanceConfigurationCreateVolumeDetails.rst | 11 + ...s.InstanceConfigurationInstanceDetails.rst | 11 + ...anceConfigurationInstanceSourceDetails.rst | 11 + ...tionInstanceSourceViaBootVolumeDetails.rst | 11 + ...igurationInstanceSourceViaImageDetails.rst | 11 + ...eConfigurationIscsiAttachVolumeDetails.rst | 11 + ...anceConfigurationLaunchInstanceDetails.rst | 11 + ...tionParavirtualizedAttachVolumeDetails.rst | 11 + ...re.models.InstanceConfigurationSummary.rst | 11 + ...stanceConfigurationVolumeSourceDetails.rst | 11 + ...ionVolumeSourceFromVolumeBackupDetails.rst | 11 + ...igurationVolumeSourceFromVolumeDetails.rst | 11 + .../models/oci.core.models.InstancePool.rst | 11 + ...els.InstancePoolPlacementConfiguration.rst | 11 + ...stancePoolPlacementSecondaryVnicSubnet.rst | 11 + .../oci.core.models.InstancePoolSummary.rst | 11 + .../oci.core.models.InstanceSummary.rst | 11 + ...els.UpdateInstanceConfigurationDetails.rst | 11 + ....core.models.UpdateInstancePoolDetails.rst | 11 + ...tancePoolPlacementConfigurationDetails.rst | 11 + docs/api/database.rst | 5 + ...odels.CompleteExternalBackupJobDetails.rst | 11 + ....models.CreateExternalBackupJobDetails.rst | 11 + .../oci.database.models.ExternalBackupJob.rst | 11 + ...teAutonomousDataWarehouseWalletDetails.rst | 11 + ...enerateAutonomousDatabaseWalletDetails.rst | 11 + docs/api/identity.rst | 5 + .../oci.identity.models.WorkRequest.rst | 11 + .../oci.identity.models.WorkRequestError.rst | 11 + ...ci.identity.models.WorkRequestLogEntry.rst | 11 + ...ci.identity.models.WorkRequestResource.rst | 11 + ...oci.identity.models.WorkRequestSummary.rst | 11 + ...key_management.models.CreateKeyDetails.rst | 11 + ...y_management.models.CreateVaultDetails.rst | 11 + ...y_management.models.DecryptDataDetails.rst | 11 + ...ci.key_management.models.DecryptedData.rst | 11 + ...y_management.models.EncryptDataDetails.rst | 11 + ...ci.key_management.models.EncryptedData.rst | 11 + ...y_management.models.GenerateKeyDetails.rst | 11 + ...oci.key_management.models.GeneratedKey.rst | 11 + .../models/oci.key_management.models.Key.rst | 11 + .../oci.key_management.models.KeyShape.rst | 11 + .../oci.key_management.models.KeySummary.rst | 11 + .../oci.key_management.models.KeyVersion.rst | 11 + ...ey_management.models.KeyVersionSummary.rst | 11 + ...nt.models.ScheduleVaultDeletionDetails.rst | 11 + ...key_management.models.UpdateKeyDetails.rst | 11 + ...y_management.models.UpdateVaultDetails.rst | 11 + .../oci.key_management.models.Vault.rst | 11 + ...oci.key_management.models.VaultSummary.rst | 11 + .../connection_read_timeout.rst | 4 +- .../setting_custom_headers.rst | 2 +- docs/exceptions.rst | 2 +- docs/installation.rst | 2 +- docs/logging.rst | 2 +- docs/raw-requests.rst | 6 +- docs/sdk-with-proxy.rst | 2 +- ..._all_instance_ip_addresses_and_dns_info.py | 10 +- examples/retries.py | 2 +- examples/retrieve_audit_events.py | 2 +- src/oci/audit/audit_client.py | 3 +- src/oci/base_client.py | 36 +- .../container_engine_client.py | 3 +- src/oci/core/__init__.py | 4 +- src/oci/core/blockstorage_client.py | 103 +- ...lockstorage_client_composite_operations.py | 41 + src/oci/core/compute_client.py | 3 +- src/oci/core/compute_management_client.py | 1500 +++++++++++++++++ ..._management_client_composite_operations.py | 292 ++++ src/oci/core/models/__init__.py | 60 + .../core/models/compute_instance_details.py | 128 ++ .../core/models/copy_volume_backup_details.py | 106 ++ .../create_instance_configuration_details.py | 211 +++ .../models/create_instance_pool_details.py | 279 +++ ...ce_pool_placement_configuration_details.py | 133 ++ src/oci/core/models/create_subnet_details.py | 24 +- src/oci/core/models/instance.py | 41 +- src/oci/core/models/instance_configuration.py | 302 ++++ ...tance_configuration_attach_vnic_details.py | 143 ++ ...nce_configuration_attach_volume_details.py | 152 ++ ...ance_configuration_block_volume_details.py | 123 ++ ...tance_configuration_create_vnic_details.py | 206 +++ ...nce_configuration_create_volume_details.py | 320 ++++ ...instance_configuration_instance_details.py | 86 + ...e_configuration_instance_source_details.py | 94 ++ ...instance_source_via_boot_volume_details.py | 78 + ...ation_instance_source_via_image_details.py | 78 + ...nfiguration_iscsi_attach_volume_details.py | 92 + ...e_configuration_launch_instance_details.py | 595 +++++++ ...n_paravirtualized_attach_volume_details.py | 61 + .../models/instance_configuration_summary.py | 164 ++ ...nce_configuration_volume_source_details.py | 86 + ...olume_source_from_volume_backup_details.py | 78 + ...ation_volume_source_from_volume_details.py | 78 + src/oci/core/models/instance_pool.py | 412 +++++ .../instance_pool_placement_configuration.py | 133 ++ ...ce_pool_placement_secondary_vnic_subnet.py | 102 ++ src/oci/core/models/instance_pool_summary.py | 328 ++++ src/oci/core/models/instance_summary.py | 356 ++++ src/oci/core/models/subnet.py | 16 +- .../update_instance_configuration_details.py | 159 ++ .../models/update_instance_pool_details.py | 248 +++ ...ce_pool_placement_configuration_details.py | 133 ++ src/oci/core/models/volume_backup.py | 31 + src/oci/core/virtual_network_client.py | 8 +- src/oci/database/database_client.py | 790 ++++++++- src/oci/database/models/__init__.py | 10 + .../models/autonomous_data_warehouse.py | 35 +- ...omous_data_warehouse_connection_strings.py | 31 + .../autonomous_data_warehouse_summary.py | 35 +- .../database/models/autonomous_database.py | 45 +- .../autonomous_database_connection_strings.py | 31 + .../models/autonomous_database_summary.py | 45 +- src/oci/database/models/backup.py | 62 +- src/oci/database/models/backup_summary.py | 62 +- .../complete_external_backup_job_details.py | 224 +++ .../create_external_backup_job_details.py | 458 +++++ .../database/models/external_backup_job.py | 265 +++ ...utonomous_data_warehouse_wallet_details.py | 69 + ...rate_autonomous_database_wallet_details.py | 69 + src/oci/dns/dns_client.py | 3 +- src/oci/email/email_client.py | 3 +- src/oci/file_storage/file_storage_client.py | 3 +- src/oci/identity/identity_client.py | 369 +++- .../identity_client_composite_operations.py | 38 + src/oci/identity/models/__init__.py | 12 +- src/oci/identity/models/compartment.py | 43 +- .../models/create_compartment_details.py | 8 +- src/oci/identity/models/create_tag_details.py | 35 +- src/oci/identity/models/tag.py | 35 +- src/oci/identity/models/tag_summary.py | 35 +- .../models/update_compartment_details.py | 4 +- src/oci/identity/models/update_tag_details.py | 35 +- src/oci/identity/models/work_request.py | 430 +++++ src/oci/identity/models/work_request_error.py | 133 ++ .../identity/models/work_request_log_entry.py | 102 ++ .../identity/models/work_request_resource.py | 190 +++ .../identity/models/work_request_summary.py | 398 +++++ src/oci/key_management/kms_crypto_client.py | 3 +- .../key_management/kms_management_client.py | 3 +- src/oci/key_management/kms_vault_client.py | 3 +- src/oci/load_balancer/load_balancer_client.py | 3 +- .../object_storage/object_storage_client.py | 3 +- .../resource_search/resource_search_client.py | 3 +- src/oci/service_endpoints.py | 9 +- src/oci/version.py | 2 +- tests/test_config_container.py | 10 + 159 files changed, 12283 insertions(+), 219 deletions(-) create mode 100644 docs/api/core/models/oci.core.models.ComputeInstanceDetails.rst create mode 100644 docs/api/core/models/oci.core.models.CopyVolumeBackupDetails.rst create mode 100644 docs/api/core/models/oci.core.models.CreateInstanceConfigurationDetails.rst create mode 100644 docs/api/core/models/oci.core.models.CreateInstancePoolDetails.rst create mode 100644 docs/api/core/models/oci.core.models.CreateInstancePoolPlacementConfigurationDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfiguration.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationAttachVnicDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationAttachVolumeDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationBlockVolumeDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationCreateVnicDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationCreateVolumeDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationInstanceDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationInstanceSourceDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationInstanceSourceViaBootVolumeDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationInstanceSourceViaImageDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationIscsiAttachVolumeDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationLaunchInstanceDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationParavirtualizedAttachVolumeDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationSummary.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationVolumeSourceDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationVolumeSourceFromVolumeBackupDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceConfigurationVolumeSourceFromVolumeDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstancePool.rst create mode 100644 docs/api/core/models/oci.core.models.InstancePoolPlacementConfiguration.rst create mode 100644 docs/api/core/models/oci.core.models.InstancePoolPlacementSecondaryVnicSubnet.rst create mode 100644 docs/api/core/models/oci.core.models.InstancePoolSummary.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceSummary.rst create mode 100644 docs/api/core/models/oci.core.models.UpdateInstanceConfigurationDetails.rst create mode 100644 docs/api/core/models/oci.core.models.UpdateInstancePoolDetails.rst create mode 100644 docs/api/core/models/oci.core.models.UpdateInstancePoolPlacementConfigurationDetails.rst create mode 100644 docs/api/database/models/oci.database.models.CompleteExternalBackupJobDetails.rst create mode 100644 docs/api/database/models/oci.database.models.CreateExternalBackupJobDetails.rst create mode 100644 docs/api/database/models/oci.database.models.ExternalBackupJob.rst create mode 100644 docs/api/database/models/oci.database.models.GenerateAutonomousDataWarehouseWalletDetails.rst create mode 100644 docs/api/database/models/oci.database.models.GenerateAutonomousDatabaseWalletDetails.rst create mode 100644 docs/api/identity/models/oci.identity.models.WorkRequest.rst create mode 100644 docs/api/identity/models/oci.identity.models.WorkRequestError.rst create mode 100644 docs/api/identity/models/oci.identity.models.WorkRequestLogEntry.rst create mode 100644 docs/api/identity/models/oci.identity.models.WorkRequestResource.rst create mode 100644 docs/api/identity/models/oci.identity.models.WorkRequestSummary.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.CreateKeyDetails.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.CreateVaultDetails.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.DecryptDataDetails.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.DecryptedData.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.EncryptDataDetails.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.EncryptedData.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.GenerateKeyDetails.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.GeneratedKey.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.Key.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.KeyShape.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.KeySummary.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.KeyVersion.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.KeyVersionSummary.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.ScheduleVaultDeletionDetails.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.UpdateKeyDetails.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.UpdateVaultDetails.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.Vault.rst create mode 100644 docs/api/key_management/models/oci.key_management.models.VaultSummary.rst create mode 100644 src/oci/core/compute_management_client.py create mode 100644 src/oci/core/compute_management_client_composite_operations.py create mode 100644 src/oci/core/models/compute_instance_details.py create mode 100644 src/oci/core/models/copy_volume_backup_details.py create mode 100644 src/oci/core/models/create_instance_configuration_details.py create mode 100644 src/oci/core/models/create_instance_pool_details.py create mode 100644 src/oci/core/models/create_instance_pool_placement_configuration_details.py create mode 100644 src/oci/core/models/instance_configuration.py create mode 100644 src/oci/core/models/instance_configuration_attach_vnic_details.py create mode 100644 src/oci/core/models/instance_configuration_attach_volume_details.py create mode 100644 src/oci/core/models/instance_configuration_block_volume_details.py create mode 100644 src/oci/core/models/instance_configuration_create_vnic_details.py create mode 100644 src/oci/core/models/instance_configuration_create_volume_details.py create mode 100644 src/oci/core/models/instance_configuration_instance_details.py create mode 100644 src/oci/core/models/instance_configuration_instance_source_details.py create mode 100644 src/oci/core/models/instance_configuration_instance_source_via_boot_volume_details.py create mode 100644 src/oci/core/models/instance_configuration_instance_source_via_image_details.py create mode 100644 src/oci/core/models/instance_configuration_iscsi_attach_volume_details.py create mode 100644 src/oci/core/models/instance_configuration_launch_instance_details.py create mode 100644 src/oci/core/models/instance_configuration_paravirtualized_attach_volume_details.py create mode 100644 src/oci/core/models/instance_configuration_summary.py create mode 100644 src/oci/core/models/instance_configuration_volume_source_details.py create mode 100644 src/oci/core/models/instance_configuration_volume_source_from_volume_backup_details.py create mode 100644 src/oci/core/models/instance_configuration_volume_source_from_volume_details.py create mode 100644 src/oci/core/models/instance_pool.py create mode 100644 src/oci/core/models/instance_pool_placement_configuration.py create mode 100644 src/oci/core/models/instance_pool_placement_secondary_vnic_subnet.py create mode 100644 src/oci/core/models/instance_pool_summary.py create mode 100644 src/oci/core/models/instance_summary.py create mode 100644 src/oci/core/models/update_instance_configuration_details.py create mode 100644 src/oci/core/models/update_instance_pool_details.py create mode 100644 src/oci/core/models/update_instance_pool_placement_configuration_details.py create mode 100644 src/oci/database/models/complete_external_backup_job_details.py create mode 100644 src/oci/database/models/create_external_backup_job_details.py create mode 100644 src/oci/database/models/external_backup_job.py create mode 100644 src/oci/database/models/generate_autonomous_data_warehouse_wallet_details.py create mode 100644 src/oci/database/models/generate_autonomous_database_wallet_details.py create mode 100644 src/oci/identity/models/work_request.py create mode 100644 src/oci/identity/models/work_request_error.py create mode 100644 src/oci/identity/models/work_request_log_entry.py create mode 100644 src/oci/identity/models/work_request_resource.py create mode 100644 src/oci/identity/models/work_request_summary.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f0362808af..081fe80bf0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.0.6 - 2018-10-18 +==================== + +Added +----- +* Support for cost tracking tags in the Identity service +* Support for generating and downloading wallets in the Database service +* Support for creating a standalone backup from an on-premises database in the Database service +* Support for db version and additional connection strings in the Autonomous Transaction Processing and Autonomous Data Warehouse resources of the Database service +* Support for copying volume backups across regions in the Block Storage service +* Support for deleting compartments in the Identity service +* Support for reboot migration for virtual machines in the Compute service +* Support for Instance Pools and Instance Configurations in the Compute service + ==================== 2.0.5 - 2018-10-04 ==================== diff --git a/docs/api/core.rst b/docs/api/core.rst index 430592204a..7058a9e739 100644 --- a/docs/api/core.rst +++ b/docs/api/core.rst @@ -44,9 +44,11 @@ Core Services oci.core.models.BulkAddVirtualCircuitPublicPrefixesDetails oci.core.models.BulkDeleteVirtualCircuitPublicPrefixesDetails oci.core.models.CaptureConsoleHistoryDetails + oci.core.models.ComputeInstanceDetails oci.core.models.ConnectLocalPeeringGatewaysDetails oci.core.models.ConnectRemotePeeringConnectionsDetails oci.core.models.ConsoleHistory + oci.core.models.CopyVolumeBackupDetails oci.core.models.Cpe oci.core.models.CreateAppCatalogSubscriptionDetails oci.core.models.CreateBootVolumeBackupDetails @@ -59,7 +61,10 @@ Core Services oci.core.models.CreateDrgDetails oci.core.models.CreateIPSecConnectionDetails oci.core.models.CreateImageDetails + oci.core.models.CreateInstanceConfigurationDetails oci.core.models.CreateInstanceConsoleConnectionDetails + oci.core.models.CreateInstancePoolDetails + oci.core.models.CreateInstancePoolPlacementConfigurationDetails oci.core.models.CreateInternetGatewayDetails oci.core.models.CreateLocalPeeringGatewayDetails oci.core.models.CreateNatGatewayDetails @@ -110,11 +115,33 @@ Core Services oci.core.models.ImageSourceViaObjectStorageUriDetails oci.core.models.IngressSecurityRule oci.core.models.Instance + oci.core.models.InstanceConfiguration + oci.core.models.InstanceConfigurationAttachVnicDetails + oci.core.models.InstanceConfigurationAttachVolumeDetails + oci.core.models.InstanceConfigurationBlockVolumeDetails + oci.core.models.InstanceConfigurationCreateVnicDetails + oci.core.models.InstanceConfigurationCreateVolumeDetails + oci.core.models.InstanceConfigurationInstanceDetails + oci.core.models.InstanceConfigurationInstanceSourceDetails + oci.core.models.InstanceConfigurationInstanceSourceViaBootVolumeDetails + oci.core.models.InstanceConfigurationInstanceSourceViaImageDetails + oci.core.models.InstanceConfigurationIscsiAttachVolumeDetails + oci.core.models.InstanceConfigurationLaunchInstanceDetails + oci.core.models.InstanceConfigurationParavirtualizedAttachVolumeDetails + oci.core.models.InstanceConfigurationSummary + oci.core.models.InstanceConfigurationVolumeSourceDetails + oci.core.models.InstanceConfigurationVolumeSourceFromVolumeBackupDetails + oci.core.models.InstanceConfigurationVolumeSourceFromVolumeDetails oci.core.models.InstanceConsoleConnection oci.core.models.InstanceCredentials + oci.core.models.InstancePool + oci.core.models.InstancePoolPlacementConfiguration + oci.core.models.InstancePoolPlacementSecondaryVnicSubnet + oci.core.models.InstancePoolSummary oci.core.models.InstanceSourceDetails oci.core.models.InstanceSourceViaBootVolumeDetails oci.core.models.InstanceSourceViaImageDetails + oci.core.models.InstanceSummary oci.core.models.InternetGateway oci.core.models.LaunchInstanceDetails oci.core.models.LaunchOptions @@ -152,7 +179,10 @@ Core Services oci.core.models.UpdateDrgDetails oci.core.models.UpdateIPSecConnectionDetails oci.core.models.UpdateImageDetails + oci.core.models.UpdateInstanceConfigurationDetails oci.core.models.UpdateInstanceDetails + oci.core.models.UpdateInstancePoolDetails + oci.core.models.UpdateInstancePoolPlacementConfigurationDetails oci.core.models.UpdateInternetGatewayDetails oci.core.models.UpdateLocalPeeringGatewayDetails oci.core.models.UpdateNatGatewayDetails diff --git a/docs/api/core/models/oci.core.models.ComputeInstanceDetails.rst b/docs/api/core/models/oci.core.models.ComputeInstanceDetails.rst new file mode 100644 index 0000000000..5f93cf49ab --- /dev/null +++ b/docs/api/core/models/oci.core.models.ComputeInstanceDetails.rst @@ -0,0 +1,11 @@ +ComputeInstanceDetails +====================== + +.. currentmodule:: oci.core.models + +.. autoclass:: ComputeInstanceDetails + :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.CopyVolumeBackupDetails.rst b/docs/api/core/models/oci.core.models.CopyVolumeBackupDetails.rst new file mode 100644 index 0000000000..64eaaa5c0c --- /dev/null +++ b/docs/api/core/models/oci.core.models.CopyVolumeBackupDetails.rst @@ -0,0 +1,11 @@ +CopyVolumeBackupDetails +======================= + +.. currentmodule:: oci.core.models + +.. autoclass:: CopyVolumeBackupDetails + :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.CreateInstanceConfigurationDetails.rst b/docs/api/core/models/oci.core.models.CreateInstanceConfigurationDetails.rst new file mode 100644 index 0000000000..b0cd2f16bc --- /dev/null +++ b/docs/api/core/models/oci.core.models.CreateInstanceConfigurationDetails.rst @@ -0,0 +1,11 @@ +CreateInstanceConfigurationDetails +================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: CreateInstanceConfigurationDetails + :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.CreateInstancePoolDetails.rst b/docs/api/core/models/oci.core.models.CreateInstancePoolDetails.rst new file mode 100644 index 0000000000..334bb87803 --- /dev/null +++ b/docs/api/core/models/oci.core.models.CreateInstancePoolDetails.rst @@ -0,0 +1,11 @@ +CreateInstancePoolDetails +========================= + +.. currentmodule:: oci.core.models + +.. autoclass:: CreateInstancePoolDetails + :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.CreateInstancePoolPlacementConfigurationDetails.rst b/docs/api/core/models/oci.core.models.CreateInstancePoolPlacementConfigurationDetails.rst new file mode 100644 index 0000000000..f8c6d8d0ad --- /dev/null +++ b/docs/api/core/models/oci.core.models.CreateInstancePoolPlacementConfigurationDetails.rst @@ -0,0 +1,11 @@ +CreateInstancePoolPlacementConfigurationDetails +=============================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: CreateInstancePoolPlacementConfigurationDetails + :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.InstanceConfiguration.rst b/docs/api/core/models/oci.core.models.InstanceConfiguration.rst new file mode 100644 index 0000000000..25aefe274f --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfiguration.rst @@ -0,0 +1,11 @@ +InstanceConfiguration +===================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfiguration + :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.InstanceConfigurationAttachVnicDetails.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationAttachVnicDetails.rst new file mode 100644 index 0000000000..c46ad28186 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationAttachVnicDetails.rst @@ -0,0 +1,11 @@ +InstanceConfigurationAttachVnicDetails +====================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationAttachVnicDetails + :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.InstanceConfigurationAttachVolumeDetails.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationAttachVolumeDetails.rst new file mode 100644 index 0000000000..68daa15ee0 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationAttachVolumeDetails.rst @@ -0,0 +1,11 @@ +InstanceConfigurationAttachVolumeDetails +======================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationAttachVolumeDetails + :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.InstanceConfigurationBlockVolumeDetails.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationBlockVolumeDetails.rst new file mode 100644 index 0000000000..ab546fad24 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationBlockVolumeDetails.rst @@ -0,0 +1,11 @@ +InstanceConfigurationBlockVolumeDetails +======================================= + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationBlockVolumeDetails + :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.InstanceConfigurationCreateVnicDetails.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationCreateVnicDetails.rst new file mode 100644 index 0000000000..be67ee572c --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationCreateVnicDetails.rst @@ -0,0 +1,11 @@ +InstanceConfigurationCreateVnicDetails +====================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationCreateVnicDetails + :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.InstanceConfigurationCreateVolumeDetails.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationCreateVolumeDetails.rst new file mode 100644 index 0000000000..b6842eb395 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationCreateVolumeDetails.rst @@ -0,0 +1,11 @@ +InstanceConfigurationCreateVolumeDetails +======================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationCreateVolumeDetails + :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.InstanceConfigurationInstanceDetails.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationInstanceDetails.rst new file mode 100644 index 0000000000..b86862da51 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationInstanceDetails.rst @@ -0,0 +1,11 @@ +InstanceConfigurationInstanceDetails +==================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationInstanceDetails + :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.InstanceConfigurationInstanceSourceDetails.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationInstanceSourceDetails.rst new file mode 100644 index 0000000000..71206f6e3e --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationInstanceSourceDetails.rst @@ -0,0 +1,11 @@ +InstanceConfigurationInstanceSourceDetails +========================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationInstanceSourceDetails + :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.InstanceConfigurationInstanceSourceViaBootVolumeDetails.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationInstanceSourceViaBootVolumeDetails.rst new file mode 100644 index 0000000000..aa803d778d --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationInstanceSourceViaBootVolumeDetails.rst @@ -0,0 +1,11 @@ +InstanceConfigurationInstanceSourceViaBootVolumeDetails +======================================================= + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationInstanceSourceViaBootVolumeDetails + :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.InstanceConfigurationInstanceSourceViaImageDetails.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationInstanceSourceViaImageDetails.rst new file mode 100644 index 0000000000..ac5742ae93 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationInstanceSourceViaImageDetails.rst @@ -0,0 +1,11 @@ +InstanceConfigurationInstanceSourceViaImageDetails +================================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationInstanceSourceViaImageDetails + :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.InstanceConfigurationIscsiAttachVolumeDetails.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationIscsiAttachVolumeDetails.rst new file mode 100644 index 0000000000..1882ebd73e --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationIscsiAttachVolumeDetails.rst @@ -0,0 +1,11 @@ +InstanceConfigurationIscsiAttachVolumeDetails +============================================= + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationIscsiAttachVolumeDetails + :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.InstanceConfigurationLaunchInstanceDetails.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationLaunchInstanceDetails.rst new file mode 100644 index 0000000000..375e62ac7a --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationLaunchInstanceDetails.rst @@ -0,0 +1,11 @@ +InstanceConfigurationLaunchInstanceDetails +========================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationLaunchInstanceDetails + :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.InstanceConfigurationParavirtualizedAttachVolumeDetails.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationParavirtualizedAttachVolumeDetails.rst new file mode 100644 index 0000000000..24b43540be --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationParavirtualizedAttachVolumeDetails.rst @@ -0,0 +1,11 @@ +InstanceConfigurationParavirtualizedAttachVolumeDetails +======================================================= + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationParavirtualizedAttachVolumeDetails + :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.InstanceConfigurationSummary.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationSummary.rst new file mode 100644 index 0000000000..f9ab3b4308 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationSummary.rst @@ -0,0 +1,11 @@ +InstanceConfigurationSummary +============================ + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationSummary + :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.InstanceConfigurationVolumeSourceDetails.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationVolumeSourceDetails.rst new file mode 100644 index 0000000000..5d2ec294a4 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationVolumeSourceDetails.rst @@ -0,0 +1,11 @@ +InstanceConfigurationVolumeSourceDetails +======================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationVolumeSourceDetails + :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.InstanceConfigurationVolumeSourceFromVolumeBackupDetails.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationVolumeSourceFromVolumeBackupDetails.rst new file mode 100644 index 0000000000..a4bb92106a --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationVolumeSourceFromVolumeBackupDetails.rst @@ -0,0 +1,11 @@ +InstanceConfigurationVolumeSourceFromVolumeBackupDetails +======================================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationVolumeSourceFromVolumeBackupDetails + :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.InstanceConfigurationVolumeSourceFromVolumeDetails.rst b/docs/api/core/models/oci.core.models.InstanceConfigurationVolumeSourceFromVolumeDetails.rst new file mode 100644 index 0000000000..4ed46cba02 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceConfigurationVolumeSourceFromVolumeDetails.rst @@ -0,0 +1,11 @@ +InstanceConfigurationVolumeSourceFromVolumeDetails +================================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceConfigurationVolumeSourceFromVolumeDetails + :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.InstancePool.rst b/docs/api/core/models/oci.core.models.InstancePool.rst new file mode 100644 index 0000000000..309467d036 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstancePool.rst @@ -0,0 +1,11 @@ +InstancePool +============ + +.. currentmodule:: oci.core.models + +.. autoclass:: InstancePool + :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.InstancePoolPlacementConfiguration.rst b/docs/api/core/models/oci.core.models.InstancePoolPlacementConfiguration.rst new file mode 100644 index 0000000000..2c596cdd4a --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstancePoolPlacementConfiguration.rst @@ -0,0 +1,11 @@ +InstancePoolPlacementConfiguration +================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstancePoolPlacementConfiguration + :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.InstancePoolPlacementSecondaryVnicSubnet.rst b/docs/api/core/models/oci.core.models.InstancePoolPlacementSecondaryVnicSubnet.rst new file mode 100644 index 0000000000..f88b63b106 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstancePoolPlacementSecondaryVnicSubnet.rst @@ -0,0 +1,11 @@ +InstancePoolPlacementSecondaryVnicSubnet +======================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstancePoolPlacementSecondaryVnicSubnet + :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.InstancePoolSummary.rst b/docs/api/core/models/oci.core.models.InstancePoolSummary.rst new file mode 100644 index 0000000000..3b126fffb7 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstancePoolSummary.rst @@ -0,0 +1,11 @@ +InstancePoolSummary +=================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstancePoolSummary + :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.InstanceSummary.rst b/docs/api/core/models/oci.core.models.InstanceSummary.rst new file mode 100644 index 0000000000..4d1a355d7b --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceSummary.rst @@ -0,0 +1,11 @@ +InstanceSummary +=============== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceSummary + :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.UpdateInstanceConfigurationDetails.rst b/docs/api/core/models/oci.core.models.UpdateInstanceConfigurationDetails.rst new file mode 100644 index 0000000000..0fc1639914 --- /dev/null +++ b/docs/api/core/models/oci.core.models.UpdateInstanceConfigurationDetails.rst @@ -0,0 +1,11 @@ +UpdateInstanceConfigurationDetails +================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: UpdateInstanceConfigurationDetails + :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.UpdateInstancePoolDetails.rst b/docs/api/core/models/oci.core.models.UpdateInstancePoolDetails.rst new file mode 100644 index 0000000000..013aa4de9d --- /dev/null +++ b/docs/api/core/models/oci.core.models.UpdateInstancePoolDetails.rst @@ -0,0 +1,11 @@ +UpdateInstancePoolDetails +========================= + +.. currentmodule:: oci.core.models + +.. autoclass:: UpdateInstancePoolDetails + :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.UpdateInstancePoolPlacementConfigurationDetails.rst b/docs/api/core/models/oci.core.models.UpdateInstancePoolPlacementConfigurationDetails.rst new file mode 100644 index 0000000000..99eb4eeb61 --- /dev/null +++ b/docs/api/core/models/oci.core.models.UpdateInstancePoolPlacementConfigurationDetails.rst @@ -0,0 +1,11 @@ +UpdateInstancePoolPlacementConfigurationDetails +=============================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: UpdateInstancePoolPlacementConfigurationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/database.rst b/docs/api/database.rst index dbf2f34f6f..3972cc2507 100644 --- a/docs/api/database.rst +++ b/docs/api/database.rst @@ -30,6 +30,7 @@ Database oci.database.models.AutonomousDatabaseSummary oci.database.models.Backup oci.database.models.BackupSummary + oci.database.models.CompleteExternalBackupJobDetails oci.database.models.CreateAutonomousDataWarehouseBackupDetails oci.database.models.CreateAutonomousDataWarehouseDetails oci.database.models.CreateAutonomousDatabaseBackupDetails @@ -44,6 +45,7 @@ Database oci.database.models.CreateDbHomeWithDbSystemIdBase oci.database.models.CreateDbHomeWithDbSystemIdDetails oci.database.models.CreateDbHomeWithDbSystemIdFromBackupDetails + oci.database.models.CreateExternalBackupJobDetails oci.database.models.DataGuardAssociation oci.database.models.DataGuardAssociationSummary oci.database.models.Database @@ -57,7 +59,10 @@ Database oci.database.models.DbSystemShapeSummary oci.database.models.DbSystemSummary oci.database.models.DbVersionSummary + oci.database.models.ExternalBackupJob oci.database.models.FailoverDataGuardAssociationDetails + oci.database.models.GenerateAutonomousDataWarehouseWalletDetails + oci.database.models.GenerateAutonomousDatabaseWalletDetails oci.database.models.LaunchDbSystemBase oci.database.models.LaunchDbSystemDetails oci.database.models.LaunchDbSystemFromBackupDetails diff --git a/docs/api/database/models/oci.database.models.CompleteExternalBackupJobDetails.rst b/docs/api/database/models/oci.database.models.CompleteExternalBackupJobDetails.rst new file mode 100644 index 0000000000..742159f838 --- /dev/null +++ b/docs/api/database/models/oci.database.models.CompleteExternalBackupJobDetails.rst @@ -0,0 +1,11 @@ +CompleteExternalBackupJobDetails +================================ + +.. currentmodule:: oci.database.models + +.. autoclass:: CompleteExternalBackupJobDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/database/models/oci.database.models.CreateExternalBackupJobDetails.rst b/docs/api/database/models/oci.database.models.CreateExternalBackupJobDetails.rst new file mode 100644 index 0000000000..e92e7fa1b0 --- /dev/null +++ b/docs/api/database/models/oci.database.models.CreateExternalBackupJobDetails.rst @@ -0,0 +1,11 @@ +CreateExternalBackupJobDetails +============================== + +.. currentmodule:: oci.database.models + +.. autoclass:: CreateExternalBackupJobDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/database/models/oci.database.models.ExternalBackupJob.rst b/docs/api/database/models/oci.database.models.ExternalBackupJob.rst new file mode 100644 index 0000000000..ba6366b360 --- /dev/null +++ b/docs/api/database/models/oci.database.models.ExternalBackupJob.rst @@ -0,0 +1,11 @@ +ExternalBackupJob +================= + +.. currentmodule:: oci.database.models + +.. autoclass:: ExternalBackupJob + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/database/models/oci.database.models.GenerateAutonomousDataWarehouseWalletDetails.rst b/docs/api/database/models/oci.database.models.GenerateAutonomousDataWarehouseWalletDetails.rst new file mode 100644 index 0000000000..039f5375a4 --- /dev/null +++ b/docs/api/database/models/oci.database.models.GenerateAutonomousDataWarehouseWalletDetails.rst @@ -0,0 +1,11 @@ +GenerateAutonomousDataWarehouseWalletDetails +============================================ + +.. currentmodule:: oci.database.models + +.. autoclass:: GenerateAutonomousDataWarehouseWalletDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/database/models/oci.database.models.GenerateAutonomousDatabaseWalletDetails.rst b/docs/api/database/models/oci.database.models.GenerateAutonomousDatabaseWalletDetails.rst new file mode 100644 index 0000000000..801dedeb25 --- /dev/null +++ b/docs/api/database/models/oci.database.models.GenerateAutonomousDatabaseWalletDetails.rst @@ -0,0 +1,11 @@ +GenerateAutonomousDatabaseWalletDetails +======================================= + +.. currentmodule:: oci.database.models + +.. autoclass:: GenerateAutonomousDatabaseWalletDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity.rst b/docs/api/identity.rst index a6d917da98..d98e8f35a2 100644 --- a/docs/api/identity.rst +++ b/docs/api/identity.rst @@ -76,3 +76,8 @@ Identity oci.identity.models.UpdateUserDetails oci.identity.models.User oci.identity.models.UserGroupMembership + oci.identity.models.WorkRequest + oci.identity.models.WorkRequestError + oci.identity.models.WorkRequestLogEntry + oci.identity.models.WorkRequestResource + oci.identity.models.WorkRequestSummary diff --git a/docs/api/identity/models/oci.identity.models.WorkRequest.rst b/docs/api/identity/models/oci.identity.models.WorkRequest.rst new file mode 100644 index 0000000000..d742c82725 --- /dev/null +++ b/docs/api/identity/models/oci.identity.models.WorkRequest.rst @@ -0,0 +1,11 @@ +WorkRequest +=========== + +.. currentmodule:: oci.identity.models + +.. autoclass:: WorkRequest + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity/models/oci.identity.models.WorkRequestError.rst b/docs/api/identity/models/oci.identity.models.WorkRequestError.rst new file mode 100644 index 0000000000..ce34ec9d0d --- /dev/null +++ b/docs/api/identity/models/oci.identity.models.WorkRequestError.rst @@ -0,0 +1,11 @@ +WorkRequestError +================ + +.. currentmodule:: oci.identity.models + +.. autoclass:: WorkRequestError + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity/models/oci.identity.models.WorkRequestLogEntry.rst b/docs/api/identity/models/oci.identity.models.WorkRequestLogEntry.rst new file mode 100644 index 0000000000..6495c5028e --- /dev/null +++ b/docs/api/identity/models/oci.identity.models.WorkRequestLogEntry.rst @@ -0,0 +1,11 @@ +WorkRequestLogEntry +=================== + +.. currentmodule:: oci.identity.models + +.. autoclass:: WorkRequestLogEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity/models/oci.identity.models.WorkRequestResource.rst b/docs/api/identity/models/oci.identity.models.WorkRequestResource.rst new file mode 100644 index 0000000000..4ef3dab3a8 --- /dev/null +++ b/docs/api/identity/models/oci.identity.models.WorkRequestResource.rst @@ -0,0 +1,11 @@ +WorkRequestResource +=================== + +.. currentmodule:: oci.identity.models + +.. autoclass:: WorkRequestResource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity/models/oci.identity.models.WorkRequestSummary.rst b/docs/api/identity/models/oci.identity.models.WorkRequestSummary.rst new file mode 100644 index 0000000000..a198ba248f --- /dev/null +++ b/docs/api/identity/models/oci.identity.models.WorkRequestSummary.rst @@ -0,0 +1,11 @@ +WorkRequestSummary +================== + +.. currentmodule:: oci.identity.models + +.. autoclass:: WorkRequestSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.CreateKeyDetails.rst b/docs/api/key_management/models/oci.key_management.models.CreateKeyDetails.rst new file mode 100644 index 0000000000..076c9dd16e --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.CreateKeyDetails.rst @@ -0,0 +1,11 @@ +CreateKeyDetails +================ + +.. currentmodule:: oci.key_management.models + +.. autoclass:: CreateKeyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.CreateVaultDetails.rst b/docs/api/key_management/models/oci.key_management.models.CreateVaultDetails.rst new file mode 100644 index 0000000000..6b6f34eb9e --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.CreateVaultDetails.rst @@ -0,0 +1,11 @@ +CreateVaultDetails +================== + +.. currentmodule:: oci.key_management.models + +.. autoclass:: CreateVaultDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.DecryptDataDetails.rst b/docs/api/key_management/models/oci.key_management.models.DecryptDataDetails.rst new file mode 100644 index 0000000000..e3ded2387e --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.DecryptDataDetails.rst @@ -0,0 +1,11 @@ +DecryptDataDetails +================== + +.. currentmodule:: oci.key_management.models + +.. autoclass:: DecryptDataDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.DecryptedData.rst b/docs/api/key_management/models/oci.key_management.models.DecryptedData.rst new file mode 100644 index 0000000000..f49244e061 --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.DecryptedData.rst @@ -0,0 +1,11 @@ +DecryptedData +============= + +.. currentmodule:: oci.key_management.models + +.. autoclass:: DecryptedData + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.EncryptDataDetails.rst b/docs/api/key_management/models/oci.key_management.models.EncryptDataDetails.rst new file mode 100644 index 0000000000..ca73e4ba32 --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.EncryptDataDetails.rst @@ -0,0 +1,11 @@ +EncryptDataDetails +================== + +.. currentmodule:: oci.key_management.models + +.. autoclass:: EncryptDataDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.EncryptedData.rst b/docs/api/key_management/models/oci.key_management.models.EncryptedData.rst new file mode 100644 index 0000000000..33d6aaeb7e --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.EncryptedData.rst @@ -0,0 +1,11 @@ +EncryptedData +============= + +.. currentmodule:: oci.key_management.models + +.. autoclass:: EncryptedData + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.GenerateKeyDetails.rst b/docs/api/key_management/models/oci.key_management.models.GenerateKeyDetails.rst new file mode 100644 index 0000000000..1ac0410c79 --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.GenerateKeyDetails.rst @@ -0,0 +1,11 @@ +GenerateKeyDetails +================== + +.. currentmodule:: oci.key_management.models + +.. autoclass:: GenerateKeyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.GeneratedKey.rst b/docs/api/key_management/models/oci.key_management.models.GeneratedKey.rst new file mode 100644 index 0000000000..ff3a9a9611 --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.GeneratedKey.rst @@ -0,0 +1,11 @@ +GeneratedKey +============ + +.. currentmodule:: oci.key_management.models + +.. autoclass:: GeneratedKey + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.Key.rst b/docs/api/key_management/models/oci.key_management.models.Key.rst new file mode 100644 index 0000000000..963014fc85 --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.Key.rst @@ -0,0 +1,11 @@ +Key +=== + +.. currentmodule:: oci.key_management.models + +.. autoclass:: Key + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.KeyShape.rst b/docs/api/key_management/models/oci.key_management.models.KeyShape.rst new file mode 100644 index 0000000000..7ed7cd5d10 --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.KeyShape.rst @@ -0,0 +1,11 @@ +KeyShape +======== + +.. currentmodule:: oci.key_management.models + +.. autoclass:: KeyShape + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.KeySummary.rst b/docs/api/key_management/models/oci.key_management.models.KeySummary.rst new file mode 100644 index 0000000000..496d430e32 --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.KeySummary.rst @@ -0,0 +1,11 @@ +KeySummary +========== + +.. currentmodule:: oci.key_management.models + +.. autoclass:: KeySummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.KeyVersion.rst b/docs/api/key_management/models/oci.key_management.models.KeyVersion.rst new file mode 100644 index 0000000000..a5a51b535f --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.KeyVersion.rst @@ -0,0 +1,11 @@ +KeyVersion +========== + +.. currentmodule:: oci.key_management.models + +.. autoclass:: KeyVersion + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.KeyVersionSummary.rst b/docs/api/key_management/models/oci.key_management.models.KeyVersionSummary.rst new file mode 100644 index 0000000000..8463d2a9ec --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.KeyVersionSummary.rst @@ -0,0 +1,11 @@ +KeyVersionSummary +================= + +.. currentmodule:: oci.key_management.models + +.. autoclass:: KeyVersionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.ScheduleVaultDeletionDetails.rst b/docs/api/key_management/models/oci.key_management.models.ScheduleVaultDeletionDetails.rst new file mode 100644 index 0000000000..07f0294d9c --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.ScheduleVaultDeletionDetails.rst @@ -0,0 +1,11 @@ +ScheduleVaultDeletionDetails +============================ + +.. currentmodule:: oci.key_management.models + +.. autoclass:: ScheduleVaultDeletionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.UpdateKeyDetails.rst b/docs/api/key_management/models/oci.key_management.models.UpdateKeyDetails.rst new file mode 100644 index 0000000000..b0a74e35bf --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.UpdateKeyDetails.rst @@ -0,0 +1,11 @@ +UpdateKeyDetails +================ + +.. currentmodule:: oci.key_management.models + +.. autoclass:: UpdateKeyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.UpdateVaultDetails.rst b/docs/api/key_management/models/oci.key_management.models.UpdateVaultDetails.rst new file mode 100644 index 0000000000..c17d66a3fc --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.UpdateVaultDetails.rst @@ -0,0 +1,11 @@ +UpdateVaultDetails +================== + +.. currentmodule:: oci.key_management.models + +.. autoclass:: UpdateVaultDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.Vault.rst b/docs/api/key_management/models/oci.key_management.models.Vault.rst new file mode 100644 index 0000000000..75f8dd0452 --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.Vault.rst @@ -0,0 +1,11 @@ +Vault +===== + +.. currentmodule:: oci.key_management.models + +.. autoclass:: Vault + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/key_management/models/oci.key_management.models.VaultSummary.rst b/docs/api/key_management/models/oci.key_management.models.VaultSummary.rst new file mode 100644 index 0000000000..dcd8accadb --- /dev/null +++ b/docs/api/key_management/models/oci.key_management.models.VaultSummary.rst @@ -0,0 +1,11 @@ +VaultSummary +============ + +.. currentmodule:: oci.key_management.models + +.. autoclass:: VaultSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/customize_service_client/connection_read_timeout.rst b/docs/customize_service_client/connection_read_timeout.rst index d51945ce5d..17d673a902 100644 --- a/docs/customize_service_client/connection_read_timeout.rst +++ b/docs/customize_service_client/connection_read_timeout.rst @@ -11,9 +11,9 @@ Setting connection and read timeouts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The Python SDK uses the `Requests `_ library to make calls to OCI services. The SDK uses the Requests `definition `_ for connection and read timeouts. +The Python SDK uses the `Requests `_ library to make calls to Oracle Cloud Infrastructure services. The SDK uses the Requests `definition `_ for connection and read timeouts. -By default, calls made to OCI services have no connection or read timeout associated with them (i.e. it is possible to wait forever for a response). If you wish to override this default behaviour and set a timeout, you can do something similar to: +By default, calls made to services have no connection or read timeout associated with them (i.e. it is possible to wait forever for a response). If you wish to override this default behaviour and set a timeout, you can do something similar to: .. code-block:: python diff --git a/docs/customize_service_client/setting_custom_headers.rst b/docs/customize_service_client/setting_custom_headers.rst index a361512213..6f754816c1 100644 --- a/docs/customize_service_client/setting_custom_headers.rst +++ b/docs/customize_service_client/setting_custom_headers.rst @@ -11,7 +11,7 @@ Setting custom headers ~~~~~~~~~~~~~~~~~~~~~~~ -The Python SDK uses the `Requests `_ library to make calls to OCI services. If you need to add custom headers to your calls, you can do so via modifying the underlying Requests `Session `_ object +The Python SDK uses the `Requests `_ library to make calls to Oracle Cloud Infrastructure services. If you need to add custom headers to your calls, you can do so via modifying the underlying Requests `Session `_ object .. code-block:: python diff --git a/docs/exceptions.rst b/docs/exceptions.rst index 115d968740..12213a4aea 100644 --- a/docs/exceptions.rst +++ b/docs/exceptions.rst @@ -24,7 +24,7 @@ When using the Python SDK, you should be prepared to handle the following except * If you use any of the ``CompositeOperation`` classes in the SDK (e.g. :py:class:`~oci.core.ComputeClientCompositeOperations`) then you should also catch :py:class:`~oci.exceptions.CompositeOperationError` -* The Python SDK uses the `Requests `_ library to make calls to OCI services but it does not mask or wrap any of the errors originating from this library, so you should also account for these in your code. The exception reference for Requests can be found `here `__ and `here `__ +* The Python SDK uses the `Requests `_ library to make calls to Oracle Cloud Infrastructure services but it does not mask or wrap any of the errors originating from this library, so you should also account for these in your code. The exception reference for Requests can be found `here `__ and `here `__ Handling HTTP 3xx responses ============================ diff --git a/docs/installation.rst b/docs/installation.rst index befc25a9cd..c6ec35b85d 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -134,7 +134,7 @@ You might encounter issues when installing Python or the SDK, or using the SDK i Service Errors -------------- -Any operation resulting in a service error will cause an exception of type oci.exceptions.ServiceError to be thrown by the SDK. For information about common service errors returned by OCI, see `API Errors `_. +Any operation resulting in a service error will cause an exception of type oci.exceptions.ServiceError to be thrown by the SDK. For information about common service errors, see `API Errors `_. pip 10 Installation Errors diff --git a/docs/logging.rst b/docs/logging.rst index 7184f0588e..fa7e6f25c4 100644 --- a/docs/logging.rst +++ b/docs/logging.rst @@ -18,7 +18,7 @@ Logger names are of the form ``.`` where the ```` is s Request Logging ================ -Logging of the requests which the Python SDK sends to OCI services can be enabled by setting the ``log_requests`` attribute to ``True`` in your configuration. This could be done in your configuration file, for example: +Logging of the requests which the Python SDK sends to Oracle Cloud Infrastructure services can be enabled by setting the ``log_requests`` attribute to ``True`` in your configuration. This could be done in your configuration file, for example: .. code-block:: text diff --git a/docs/raw-requests.rst b/docs/raw-requests.rst index b7668bab00..d54c0f874b 100644 --- a/docs/raw-requests.rst +++ b/docs/raw-requests.rst @@ -11,8 +11,8 @@ Raw Requests ~~~~~~~~~~~~ The Python SDK exposes a custom :class:`requests.auth.AuthBase` which you can use to sign non-standard calls. -This can be helpful if you need to make a OCI- authenticated request to an alternate endpoint or to a -OCI API not yet supported in the SDK. +This can be helpful if you need to make an authenticated request to an alternate endpoint or to an +Oracle Cloud Infrastructure API not yet supported in the SDK. =================== Creating a Signer @@ -95,7 +95,7 @@ The following creates a new user by talking to the identity endpoint: Using an Instance Principals-based Signer ------------------------------------------ -The Instance Principals-based Signer uses a security token to authenticate calls against OCI services. This token has an expiration time and the Signer will automatically handle refreshing the token when it is near expiry. However, it is possible that the security token held by the signer is valid (from an expiration time perspective) but the request fails with a 401 (NotAuthenticated) error because of, for example, changes in the dynamic group that an instance is a part of or the policies applied to that dynamic group. +The Instance Principals-based Signer uses a security token to authenticate calls against Oracle Cloud Infrastructure services. This token has an expiration time and the Signer will automatically handle refreshing the token when it is near expiry. However, it is possible that the security token held by the signer is valid (from an expiration time perspective) but the request fails with a 401 (NotAuthenticated) error because of, for example, changes in the dynamic group that an instance is a part of or the policies applied to that dynamic group. You can account for this by retrying on a 401. If the request fails with a 401 on a subsequent retry, this may point to other issues and you should not keep retrying in this circumstance. For example: diff --git a/docs/sdk-with-proxy.rst b/docs/sdk-with-proxy.rst index 7263720ad0..51e43e5351 100644 --- a/docs/sdk-with-proxy.rst +++ b/docs/sdk-with-proxy.rst @@ -11,7 +11,7 @@ Using the SDK with a proxy server ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The Python SDK uses the `Requests `_ library to make calls to OCI services. If your environment requires you to use a proxy server for outgoing HTTP requests +The Python SDK uses the `Requests `_ library to make calls to Oracle Cloud Infrastructure services. If your environment requires you to use a proxy server for outgoing HTTP requests then you can set this up in the following ways: * Configuring environment variable as described `here `_ diff --git a/examples/get_all_instance_ip_addresses_and_dns_info.py b/examples/get_all_instance_ip_addresses_and_dns_info.py index 48da35943e..e93e4a68d7 100644 --- a/examples/get_all_instance_ip_addresses_and_dns_info.py +++ b/examples/get_all_instance_ip_addresses_and_dns_info.py @@ -126,11 +126,11 @@ def get_instance_ip_addresses_and_dns_info(compute_client, virtual_network_clien # get_public_ip_by_private_ip_id # # Each has drawbacks and benefits, but the one you choose will vary by use case and how you have set up your - # OCI resources. For example, if you have many secondary private IPs then (F2) may result in substantially more - # service calls than (F1); however for (F1) your user needs permissions to list these resources across multiple - # compartments and you may also be retrieving redundant data. Depending on how many "things" you are looking for, - # there is also the potential under (F1) for the data to have become stale, whereas there is no such issue for - # (F2) because you're always getting that data at the current point in time (however, even in that case under + # Oracle Cloud Infrastructure resources. For example, if you have many secondary private IPs then (F2) may result + # in substantially more service calls than (F1); however for (F1) your user needs permissions to list these resources + # across multiple compartments and you may also be retrieving redundant data. Depending on how many "things" you + # are looking for, there is also the potential under (F1) for the data to have become stale, whereas there is no such + # issue for (F2) because you're always getting that data at the current point in time (however, even in that case under # (F1) the more up-to-date data would likely be captured in a subsequent run of this script/example). # # For illustration purposes, we will demonstrate both (F1) and (F2) diff --git a/examples/retries.py b/examples/retries.py index c0594dc37e..e855bc4fd1 100644 --- a/examples/retries.py +++ b/examples/retries.py @@ -2,7 +2,7 @@ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. # This script provides a basic example of how to use the retry functionality in the Python SDK when -# making calls to OCI services. In order to demonstrate this functionality, this script shows +# making calls to Oracle Cloud Infrastructure services. In order to demonstrate this functionality, this script shows # performing create, update and delete operations against VCNs. # # This script takes a single argument: diff --git a/examples/retrieve_audit_events.py b/examples/retrieve_audit_events.py index 7058cf28bc..ac5314fa38 100644 --- a/examples/retrieve_audit_events.py +++ b/examples/retrieve_audit_events.py @@ -1,7 +1,7 @@ # coding: utf-8 # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -# This script retrieves all audit logs across an OCI Tenancy. +# This script retrieves all audit logs across an Oracle Cloud Infrastructure Tenancy. # for a timespan defined by start_time and end_time. # This sample script retrieves Audit events for last 5 days. # This script will work at a tenancy level only. diff --git a/src/oci/audit/audit_client.py b/src/oci/audit/audit_client.py index 63a093ca05..b327918245 100644 --- a/src/oci/audit/audit_client.py +++ b/src/oci/audit/audit_client.py @@ -73,7 +73,8 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/20160918' + 'base_path': '/20160918', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("audit", config, signer, audit_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') diff --git a/src/oci/base_client.py b/src/oci/base_client.py index ec80df7cf2..95a889e24f 100644 --- a/src/oci/base_client.py +++ b/src/oci/base_client.py @@ -11,6 +11,7 @@ import string import uuid from datetime import date, datetime +from timeit import default_timer as timer from oci._vendor import requests, six from dateutil.parser import parse @@ -125,6 +126,8 @@ def __init__(self, service, config, signer, type_mapping, **kwargs): else: six.moves.http_client.HTTPConnection.debuglevel = 0 + self.skip_deserialization = kwargs.get('skip_deserialization') + @property def endpoint(self): return self._endpoint @@ -214,7 +217,11 @@ def call_api(self, resource_path, method, ) if not isinstance(self.signer, signers.InstancePrincipalsSecurityTokenSigner): - return self.request(request) + start = timer() + response = self.request(request) + end = timer() + self.logger.debug('time elapsed for request: {}'.format(str(end - start))) + return response else: call_attempts = 0 while call_attempts < 2: @@ -379,13 +386,13 @@ def sanitize_for_serialization(self, obj, declared_type=None, field_name=None): :param obj: The data to serialize. :return: The serialized form of data. """ - types = (six.string_types, int, float, bool, type(None)) + types = (six.string_types, six.integer_types, float, bool, type(None)) declared_swagger_type_to_acceptable_python_types = { 'str': six.string_types, 'bool': bool, - 'int': (float, int), - 'float': (float, int) + 'int': (float, six.integer_types), + 'float': (float, six.integer_types) } # if there is a declared type for this obj, then validate that obj is of that type. None types (either None or the NONE_SENTINEL) are not validated but @@ -508,7 +515,6 @@ def deserialize_response_data(self, response_data, response_type): :return: deserialized object. """ - # response.content is always bytes response_data = response_data.decode('utf8') @@ -519,7 +525,14 @@ def deserialize_response_data(self, response_data, response_type): except ValueError: pass - return self.__deserialize(response_data, response_type) + if self.skip_deserialization: + return response_data + else: + start = timer() + res = self.__deserialize(response_data, response_type) + end = timer() + self.logger.debug('python SDK time elapsed for deserializing: {}'.format(str(end - start))) + return res def __deserialize(self, data, cls): """ @@ -602,11 +615,16 @@ def __deserialize_datetime(self, string): :return: datetime. """ try: - return parse(string) + return datetime.strptime(string, "%Y-%m-%dT%H:%M:%S.%fZ") + except ValueError: + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise Exception("Failed to parse `{0}` into a datetime object".format(string)) except ImportError: return string - except ValueError: - raise Exception("Failed to parse `{0}` into a datetime object".format(string)) def __deserialize_model(self, data, cls): """ diff --git a/src/oci/container_engine/container_engine_client.py b/src/oci/container_engine/container_engine_client.py index beca266203..6a15b61117 100644 --- a/src/oci/container_engine/container_engine_client.py +++ b/src/oci/container_engine/container_engine_client.py @@ -73,7 +73,8 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/20180222' + 'base_path': '/20180222', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("container_engine", config, signer, container_engine_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') diff --git a/src/oci/core/__init__.py b/src/oci/core/__init__.py index e09b15aa26..0af89c6406 100644 --- a/src/oci/core/__init__.py +++ b/src/oci/core/__init__.py @@ -8,8 +8,10 @@ from .blockstorage_client_composite_operations import BlockstorageClientCompositeOperations from .compute_client import ComputeClient from .compute_client_composite_operations import ComputeClientCompositeOperations +from .compute_management_client import ComputeManagementClient +from .compute_management_client_composite_operations import ComputeManagementClientCompositeOperations from .virtual_network_client import VirtualNetworkClient from .virtual_network_client_composite_operations import VirtualNetworkClientCompositeOperations from . import models -__all__ = ["BlockstorageClient", "BlockstorageClientCompositeOperations", "ComputeClient", "ComputeClientCompositeOperations", "VirtualNetworkClient", "VirtualNetworkClientCompositeOperations", "models"] +__all__ = ["BlockstorageClient", "BlockstorageClientCompositeOperations", "ComputeClient", "ComputeClientCompositeOperations", "ComputeManagementClient", "ComputeManagementClientCompositeOperations", "VirtualNetworkClient", "VirtualNetworkClientCompositeOperations", "models"] diff --git a/src/oci/core/blockstorage_client.py b/src/oci/core/blockstorage_client.py index 3771024812..8e5b4984d9 100644 --- a/src/oci/core/blockstorage_client.py +++ b/src/oci/core/blockstorage_client.py @@ -73,11 +73,105 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/20160918' + 'base_path': '/20160918', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("blockstorage", config, signer, core_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') + def copy_volume_backup(self, volume_backup_id, copy_volume_backup_details, **kwargs): + """ + CreateVolumeBackupCopy + Creates a volume backup copy in specified region. For general information about volume backups, + see `Overview of Block Volume Service Backups`__ + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/blockvolumebackups.htm + + + :param str volume_backup_id: (required) + The OCID of the volume backup. + + :param CopyVolumeBackupDetails copy_volume_backup_details: (required) + Request to create a cross-region copy of given backup. + + :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 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.VolumeBackup` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/volumeBackups/{volumeBackupId}/actions/copy" + 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( + "copy_volume_backup got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "volumeBackupId": volume_backup_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), + "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=copy_volume_backup_details, + response_type="VolumeBackup") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=copy_volume_backup_details, + response_type="VolumeBackup") + def create_boot_volume(self, create_boot_volume_details, **kwargs): """ CreateBootVolume @@ -2361,6 +2455,9 @@ def list_volume_backups(self, compartment_id, **kwargs): :param str display_name: (optional) A filter to return only resources that match the given display name exactly. + :param str source_volume_backup_id: (optional) + A filter to return only resources that originated from the given source volume backup. + :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 @@ -2405,6 +2502,7 @@ def list_volume_backups(self, compartment_id, **kwargs): "limit", "page", "display_name", + "source_volume_backup_id", "sort_by", "sort_order", "lifecycle_state" @@ -2441,6 +2539,7 @@ def list_volume_backups(self, compartment_id, **kwargs): "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), "displayName": kwargs.get("display_name", missing), + "sourceVolumeBackupId": kwargs.get("source_volume_backup_id", missing), "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), "lifecycleState": kwargs.get("lifecycle_state", missing) @@ -2902,7 +3001,7 @@ def list_volumes(self, compartment_id, **kwargs): def update_boot_volume(self, boot_volume_id, update_boot_volume_details, **kwargs): """ UpdateBootVolume - Updates the specified boot volume's display name. + Updates the specified boot volume's display name, defined tags, and free-form tags. :param str boot_volume_id: (required) diff --git a/src/oci/core/blockstorage_client_composite_operations.py b/src/oci/core/blockstorage_client_composite_operations.py index ff99160934..9ea09a0b0e 100644 --- a/src/oci/core/blockstorage_client_composite_operations.py +++ b/src/oci/core/blockstorage_client_composite_operations.py @@ -21,6 +21,47 @@ def __init__(self, client, **kwargs): """ self.client = client + def copy_volume_backup_and_wait_for_state(self, volume_backup_id, copy_volume_backup_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.BlockstorageClient.copy_volume_backup` and waits for the :py:class:`~oci.core.models.VolumeBackup` acted upon + to enter the given state(s). + + :param str volume_backup_id: (required) + The OCID of the volume backup. + + :param CopyVolumeBackupDetails copy_volume_backup_details: (required) + Request to create a cross-region copy of given backup. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.VolumeBackup.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.BlockstorageClient.copy_volume_backup` + + :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.copy_volume_backup(volume_backup_id, copy_volume_backup_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_volume_backup(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_boot_volume_and_wait_for_state(self, create_boot_volume_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.core.BlockstorageClient.create_boot_volume` and waits for the :py:class:`~oci.core.models.BootVolume` acted upon diff --git a/src/oci/core/compute_client.py b/src/oci/core/compute_client.py index 8796293359..76d5275224 100644 --- a/src/oci/core/compute_client.py +++ b/src/oci/core/compute_client.py @@ -73,7 +73,8 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/20160918' + 'base_path': '/20160918', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("compute", config, signer, core_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') diff --git a/src/oci/core/compute_management_client.py b/src/oci/core/compute_management_client.py new file mode 100644 index 0000000000..d9b8a6f9e7 --- /dev/null +++ b/src/oci/core/compute_management_client.py @@ -0,0 +1,1500 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +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 +from .models import core_type_mapping +missing = Sentinel("Missing") + + +class ComputeManagementClient(object): + """ + APIs for Networking Service, Compute Service, and Block Volume Service. + """ + + 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 is that the client never times out. 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'] + 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': '/20160918', + 'skip_deserialization': kwargs.get('skip_deserialization', False) + } + self.base_client = BaseClient("compute_management", config, signer, core_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + + def create_instance_configuration(self, create_instance_configuration, **kwargs): + """ + CreateInstanceConfiguration + Creates an instance configuration + + + :param CreateInstanceConfigurationDetails create_instance_configuration: (required) + Instance configuration creation details + + :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.InstanceConfiguration` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/instanceConfigurations" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_instance_configuration 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) + } + 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_instance_configuration, + response_type="InstanceConfiguration") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_instance_configuration, + response_type="InstanceConfiguration") + + def create_instance_pool(self, create_instance_pool_details, **kwargs): + """ + CreateInstancePool + Create an instance pool. + + + :param CreateInstancePoolDetails create_instance_pool_details: (required) + Instance Pool creation details + + :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.InstancePool` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/instancePools" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_instance_pool 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) + } + 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_instance_pool_details, + response_type="InstancePool") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_instance_pool_details, + response_type="InstancePool") + + def delete_instance_configuration(self, instance_configuration_id, **kwargs): + """ + DeleteInstanceConfiguration + Deletes an instance configuration. + + + :param str instance_configuration_id: (required) + The OCID of the instance configuration. + + :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 = "/instanceConfigurations/{instanceConfigurationId}" + 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_instance_configuration got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "instanceConfigurationId": instance_configuration_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 get_instance_configuration(self, instance_configuration_id, **kwargs): + """ + GetInstanceConfiguration + Gets the specified instance configuration + + + :param str instance_configuration_id: (required) + The OCID of the instance configuration. + + :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.InstanceConfiguration` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/instanceConfigurations/{instanceConfigurationId}" + 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_instance_configuration got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "instanceConfigurationId": instance_configuration_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="InstanceConfiguration") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="InstanceConfiguration") + + def get_instance_pool(self, instance_pool_id, **kwargs): + """ + GetInstancePool + Gets the specified instance pool + + + :param str instance_pool_id: (required) + The OCID of the instance 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. + + 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.InstancePool` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/instancePools/{instancePoolId}" + 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_instance_pool got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "instancePoolId": instance_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" + } + + 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="InstancePool") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="InstancePool") + + def launch_instance_configuration(self, instance_configuration_id, instance_configuration, **kwargs): + """ + LaunchInstanceConfiguration + Launch an instance from an instance configuration + + + :param str instance_configuration_id: (required) + The OCID of the instance configuration. + + :param InstanceConfigurationInstanceDetails instance_configuration: (required) + Instance configuration Instance Details + + :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.Instance` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/instanceConfigurations/{instanceConfigurationId}/actions/launch" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "launch_instance_configuration got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "instanceConfigurationId": instance_configuration_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) + } + 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=instance_configuration, + response_type="Instance") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=instance_configuration, + response_type="Instance") + + def list_instance_configurations(self, compartment_id, **kwargs): + """ + ListInstanceConfigurations + Lists the available instanceConfigurations in the specific compartment. + + + :param str compartment_id: (required) + The OCID of the compartment. + + :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.us-phoenix-1.oraclecloud.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.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :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. + + **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. + + 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. + + 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.InstanceConfigurationSummary` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/instanceConfigurations" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "limit", + "page", + "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_instance_configurations 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 = { + "compartmentId": compartment_id, + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", 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[InstanceConfigurationSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[InstanceConfigurationSummary]") + + def list_instance_pool_instances(self, compartment_id, instance_pool_id, **kwargs): + """ + ListInstancePoolInstances + List the instances in the specified instance pool. + + + :param str compartment_id: (required) + The OCID of the compartment. + + :param str instance_pool_id: (required) + The OCID of the instance pool. + + :param str display_name: (optional) + A filter to return only resources that match the given display name exactly. + + :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.us-phoenix-1.oraclecloud.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.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :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. + + **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. + + 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. + + 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.InstanceSummary` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/instancePools/{instancePoolId}/instances" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "display_name", + "limit", + "page", + "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_instance_pool_instances got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "instancePoolId": instance_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)) + + 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 = { + "compartmentId": compartment_id, + "displayName": kwargs.get("display_name", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", 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, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[InstanceSummary]") + 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="list[InstanceSummary]") + + def list_instance_pools(self, compartment_id, **kwargs): + """ + ListInstancePools + Lists the instance pools in the specified compartment. + + + :param str compartment_id: (required) + The OCID of the compartment. + + :param str display_name: (optional) + A filter to return only resources that match the given display name exactly. + + :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.us-phoenix-1.oraclecloud.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.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :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. + + **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. + + 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 str lifecycle_state: (optional) + A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + + Allowed values are: "PROVISIONING", "SCALING", "STARTING", "STOPPING", "TERMINATING", "STOPPED", "TERMINATED", "RUNNING" + + :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.InstancePoolSummary` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/instancePools" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "display_name", + "limit", + "page", + "sort_by", + "sort_order", + "lifecycle_state" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_instance_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) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["PROVISIONING", "SCALING", "STARTING", "STOPPING", "TERMINATING", "STOPPED", "TERMINATED", "RUNNING"] + 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) + ) + + query_params = { + "compartmentId": compartment_id, + "displayName": kwargs.get("display_name", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", 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[InstancePoolSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[InstancePoolSummary]") + + def reset_instance_pool(self, instance_pool_id, **kwargs): + """ + ResetInstancePool + Performs the reset (power off and power on) action on the specified instance pool, + which performs the action on all the instances in the pool. + + + :param str instance_pool_id: (required) + The OCID of the instance pool. + + :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 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.InstancePool` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/instancePools/{instancePoolId}/actions/reset" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token", + "if_match" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "reset_instance_pool got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "instancePoolId": instance_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-retry-token": kwargs.get("opc_retry_token", 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: + 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, + response_type="InstancePool") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="InstancePool") + + def softreset_instance_pool(self, instance_pool_id, **kwargs): + """ + SoftresetInstancePool + Performs the softreset (ACPI shutdown and power on) action on the specified instance pool, + which performs the action on all the instances in the pool. + + + :param str instance_pool_id: (required) + The OCID of the instance pool. + + :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 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.InstancePool` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/instancePools/{instancePoolId}/actions/softreset" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token", + "if_match" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "softreset_instance_pool got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "instancePoolId": instance_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-retry-token": kwargs.get("opc_retry_token", 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: + 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, + response_type="InstancePool") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="InstancePool") + + def start_instance_pool(self, instance_pool_id, **kwargs): + """ + StartInstancePool + Performs the start (power on) action on the specified instance pool, + which performs the action on all the instances in the pool. + + + :param str instance_pool_id: (required) + The OCID of the instance pool. + + :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 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.InstancePool` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/instancePools/{instancePoolId}/actions/start" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token", + "if_match" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "start_instance_pool got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "instancePoolId": instance_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-retry-token": kwargs.get("opc_retry_token", 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: + 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, + response_type="InstancePool") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="InstancePool") + + def stop_instance_pool(self, instance_pool_id, **kwargs): + """ + StopInstancePool + Performs the stop (power off) action on the specified instance pool, + which performs the action on all the instances in the pool. + + + :param str instance_pool_id: (required) + The OCID of the instance pool. + + :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 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.InstancePool` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/instancePools/{instancePoolId}/actions/stop" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token", + "if_match" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "stop_instance_pool got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "instancePoolId": instance_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-retry-token": kwargs.get("opc_retry_token", 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: + 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, + response_type="InstancePool") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="InstancePool") + + def terminate_instance_pool(self, instance_pool_id, **kwargs): + """ + TerminateInstancePool + Terminate the specified instance pool. + + + :param str instance_pool_id: (required) + The OCID of the instance pool. + + :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 = "/instancePools/{instancePoolId}" + 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( + "terminate_instance_pool got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "instancePoolId": instance_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", + "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 update_instance_configuration(self, instance_configuration_id, update_instance_configuration_details, **kwargs): + """ + UpdateInstanceConfiguration + Updates the freeFormTags, definedTags, and display name of an instance configuration. + + + :param str instance_configuration_id: (required) + The OCID of the instance configuration. + + :param UpdateInstanceConfigurationDetails update_instance_configuration_details: (required) + Updates the freeFormTags, definedTags, and display name of an instance configuration. + + :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 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.InstanceConfiguration` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/instanceConfigurations/{instanceConfigurationId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token", + "if_match" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_instance_configuration got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "instanceConfigurationId": instance_configuration_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) + } + 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=update_instance_configuration_details, + response_type="InstanceConfiguration") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_instance_configuration_details, + response_type="InstanceConfiguration") + + def update_instance_pool(self, instance_pool_id, update_instance_pool_details, **kwargs): + """ + UpdateInstancePool + Update the specified instance pool. + The OCID of the instance pool remains the same. + + + :param str instance_pool_id: (required) + The OCID of the instance pool. + + :param UpdateInstancePoolDetails update_instance_pool_details: (required) + Update instance pool configuration + + :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 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.InstancePool` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/instancePools/{instancePoolId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token", + "if_match" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_instance_pool got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "instancePoolId": instance_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-retry-token": kwargs.get("opc_retry_token", 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: + 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=update_instance_pool_details, + response_type="InstancePool") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_instance_pool_details, + response_type="InstancePool") diff --git a/src/oci/core/compute_management_client_composite_operations.py b/src/oci/core/compute_management_client_composite_operations.py new file mode 100644 index 0000000000..aa0a800ce1 --- /dev/null +++ b/src/oci/core/compute_management_client_composite_operations.py @@ -0,0 +1,292 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +import oci # noqa: F401 + + +class ComputeManagementClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.core.ComputeManagementClient` 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 ComputeManagementClientCompositeOperations object + + :param ComputeManagementClient client: + The service client which will be wrapped by this object + """ + self.client = client + + def create_instance_pool_and_wait_for_state(self, create_instance_pool_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.ComputeManagementClient.create_instance_pool` and waits for the :py:class:`~oci.core.models.InstancePool` acted upon + to enter the given state(s). + + :param CreateInstancePoolDetails create_instance_pool_details: (required) + Instance Pool creation 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.InstancePool.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.ComputeManagementClient.create_instance_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_instance_pool(create_instance_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_instance_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 reset_instance_pool_and_wait_for_state(self, instance_pool_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.ComputeManagementClient.reset_instance_pool` and waits for the :py:class:`~oci.core.models.InstancePool` acted upon + to enter the given state(s). + + :param str instance_pool_id: (required) + The OCID of the instance 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.InstancePool.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.ComputeManagementClient.reset_instance_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.reset_instance_pool(instance_pool_id, **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_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 softreset_instance_pool_and_wait_for_state(self, instance_pool_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.ComputeManagementClient.softreset_instance_pool` and waits for the :py:class:`~oci.core.models.InstancePool` acted upon + to enter the given state(s). + + :param str instance_pool_id: (required) + The OCID of the instance 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.InstancePool.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.ComputeManagementClient.softreset_instance_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.softreset_instance_pool(instance_pool_id, **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_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 start_instance_pool_and_wait_for_state(self, instance_pool_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.ComputeManagementClient.start_instance_pool` and waits for the :py:class:`~oci.core.models.InstancePool` acted upon + to enter the given state(s). + + :param str instance_pool_id: (required) + The OCID of the instance 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.InstancePool.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.ComputeManagementClient.start_instance_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.start_instance_pool(instance_pool_id, **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_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 stop_instance_pool_and_wait_for_state(self, instance_pool_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.ComputeManagementClient.stop_instance_pool` and waits for the :py:class:`~oci.core.models.InstancePool` acted upon + to enter the given state(s). + + :param str instance_pool_id: (required) + The OCID of the instance 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.InstancePool.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.ComputeManagementClient.stop_instance_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.stop_instance_pool(instance_pool_id, **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_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 terminate_instance_pool_and_wait_for_state(self, instance_pool_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.ComputeManagementClient.terminate_instance_pool` and waits for the :py:class:`~oci.core.models.InstancePool` acted upon + to enter the given state(s). + + :param str instance_pool_id: (required) + The OCID of the instance 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.InstancePool.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.ComputeManagementClient.terminate_instance_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_instance_pool(instance_pool_id) + operation_result = self.client.terminate_instance_pool(instance_pool_id, **operation_kwargs) + 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 update_instance_pool_and_wait_for_state(self, instance_pool_id, update_instance_pool_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.ComputeManagementClient.update_instance_pool` and waits for the :py:class:`~oci.core.models.InstancePool` acted upon + to enter the given state(s). + + :param str instance_pool_id: (required) + The OCID of the instance pool. + + :param UpdateInstancePoolDetails update_instance_pool_details: (required) + Update instance pool configuration + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.InstancePool.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.ComputeManagementClient.update_instance_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_instance_pool(instance_pool_id, update_instance_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_instance_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) diff --git a/src/oci/core/models/__init__.py b/src/oci/core/models/__init__.py index f830fd4fef..3b34c7dd1e 100644 --- a/src/oci/core/models/__init__.py +++ b/src/oci/core/models/__init__.py @@ -25,9 +25,11 @@ from .bulk_add_virtual_circuit_public_prefixes_details import BulkAddVirtualCircuitPublicPrefixesDetails from .bulk_delete_virtual_circuit_public_prefixes_details import BulkDeleteVirtualCircuitPublicPrefixesDetails from .capture_console_history_details import CaptureConsoleHistoryDetails +from .compute_instance_details import ComputeInstanceDetails from .connect_local_peering_gateways_details import ConnectLocalPeeringGatewaysDetails from .connect_remote_peering_connections_details import ConnectRemotePeeringConnectionsDetails from .console_history import ConsoleHistory +from .copy_volume_backup_details import CopyVolumeBackupDetails from .cpe import Cpe from .create_app_catalog_subscription_details import CreateAppCatalogSubscriptionDetails from .create_boot_volume_backup_details import CreateBootVolumeBackupDetails @@ -40,7 +42,10 @@ from .create_drg_details import CreateDrgDetails from .create_ip_sec_connection_details import CreateIPSecConnectionDetails from .create_image_details import CreateImageDetails +from .create_instance_configuration_details import CreateInstanceConfigurationDetails from .create_instance_console_connection_details import CreateInstanceConsoleConnectionDetails +from .create_instance_pool_details import CreateInstancePoolDetails +from .create_instance_pool_placement_configuration_details import CreateInstancePoolPlacementConfigurationDetails from .create_internet_gateway_details import CreateInternetGatewayDetails from .create_local_peering_gateway_details import CreateLocalPeeringGatewayDetails from .create_nat_gateway_details import CreateNatGatewayDetails @@ -91,11 +96,33 @@ from .image_source_via_object_storage_uri_details import ImageSourceViaObjectStorageUriDetails from .ingress_security_rule import IngressSecurityRule from .instance import Instance +from .instance_configuration import InstanceConfiguration +from .instance_configuration_attach_vnic_details import InstanceConfigurationAttachVnicDetails +from .instance_configuration_attach_volume_details import InstanceConfigurationAttachVolumeDetails +from .instance_configuration_block_volume_details import InstanceConfigurationBlockVolumeDetails +from .instance_configuration_create_vnic_details import InstanceConfigurationCreateVnicDetails +from .instance_configuration_create_volume_details import InstanceConfigurationCreateVolumeDetails +from .instance_configuration_instance_details import InstanceConfigurationInstanceDetails +from .instance_configuration_instance_source_details import InstanceConfigurationInstanceSourceDetails +from .instance_configuration_instance_source_via_boot_volume_details import InstanceConfigurationInstanceSourceViaBootVolumeDetails +from .instance_configuration_instance_source_via_image_details import InstanceConfigurationInstanceSourceViaImageDetails +from .instance_configuration_iscsi_attach_volume_details import InstanceConfigurationIscsiAttachVolumeDetails +from .instance_configuration_launch_instance_details import InstanceConfigurationLaunchInstanceDetails +from .instance_configuration_paravirtualized_attach_volume_details import InstanceConfigurationParavirtualizedAttachVolumeDetails +from .instance_configuration_summary import InstanceConfigurationSummary +from .instance_configuration_volume_source_details import InstanceConfigurationVolumeSourceDetails +from .instance_configuration_volume_source_from_volume_backup_details import InstanceConfigurationVolumeSourceFromVolumeBackupDetails +from .instance_configuration_volume_source_from_volume_details import InstanceConfigurationVolumeSourceFromVolumeDetails from .instance_console_connection import InstanceConsoleConnection from .instance_credentials import InstanceCredentials +from .instance_pool import InstancePool +from .instance_pool_placement_configuration import InstancePoolPlacementConfiguration +from .instance_pool_placement_secondary_vnic_subnet import InstancePoolPlacementSecondaryVnicSubnet +from .instance_pool_summary import InstancePoolSummary from .instance_source_details import InstanceSourceDetails from .instance_source_via_boot_volume_details import InstanceSourceViaBootVolumeDetails from .instance_source_via_image_details import InstanceSourceViaImageDetails +from .instance_summary import InstanceSummary from .internet_gateway import InternetGateway from .launch_instance_details import LaunchInstanceDetails from .launch_options import LaunchOptions @@ -133,7 +160,10 @@ from .update_drg_details import UpdateDrgDetails from .update_ip_sec_connection_details import UpdateIPSecConnectionDetails from .update_image_details import UpdateImageDetails +from .update_instance_configuration_details import UpdateInstanceConfigurationDetails from .update_instance_details import UpdateInstanceDetails +from .update_instance_pool_details import UpdateInstancePoolDetails +from .update_instance_pool_placement_configuration_details import UpdateInstancePoolPlacementConfigurationDetails from .update_internet_gateway_details import UpdateInternetGatewayDetails from .update_local_peering_gateway_details import UpdateLocalPeeringGatewayDetails from .update_nat_gateway_details import UpdateNatGatewayDetails @@ -199,9 +229,11 @@ "BulkAddVirtualCircuitPublicPrefixesDetails": BulkAddVirtualCircuitPublicPrefixesDetails, "BulkDeleteVirtualCircuitPublicPrefixesDetails": BulkDeleteVirtualCircuitPublicPrefixesDetails, "CaptureConsoleHistoryDetails": CaptureConsoleHistoryDetails, + "ComputeInstanceDetails": ComputeInstanceDetails, "ConnectLocalPeeringGatewaysDetails": ConnectLocalPeeringGatewaysDetails, "ConnectRemotePeeringConnectionsDetails": ConnectRemotePeeringConnectionsDetails, "ConsoleHistory": ConsoleHistory, + "CopyVolumeBackupDetails": CopyVolumeBackupDetails, "Cpe": Cpe, "CreateAppCatalogSubscriptionDetails": CreateAppCatalogSubscriptionDetails, "CreateBootVolumeBackupDetails": CreateBootVolumeBackupDetails, @@ -214,7 +246,10 @@ "CreateDrgDetails": CreateDrgDetails, "CreateIPSecConnectionDetails": CreateIPSecConnectionDetails, "CreateImageDetails": CreateImageDetails, + "CreateInstanceConfigurationDetails": CreateInstanceConfigurationDetails, "CreateInstanceConsoleConnectionDetails": CreateInstanceConsoleConnectionDetails, + "CreateInstancePoolDetails": CreateInstancePoolDetails, + "CreateInstancePoolPlacementConfigurationDetails": CreateInstancePoolPlacementConfigurationDetails, "CreateInternetGatewayDetails": CreateInternetGatewayDetails, "CreateLocalPeeringGatewayDetails": CreateLocalPeeringGatewayDetails, "CreateNatGatewayDetails": CreateNatGatewayDetails, @@ -265,11 +300,33 @@ "ImageSourceViaObjectStorageUriDetails": ImageSourceViaObjectStorageUriDetails, "IngressSecurityRule": IngressSecurityRule, "Instance": Instance, + "InstanceConfiguration": InstanceConfiguration, + "InstanceConfigurationAttachVnicDetails": InstanceConfigurationAttachVnicDetails, + "InstanceConfigurationAttachVolumeDetails": InstanceConfigurationAttachVolumeDetails, + "InstanceConfigurationBlockVolumeDetails": InstanceConfigurationBlockVolumeDetails, + "InstanceConfigurationCreateVnicDetails": InstanceConfigurationCreateVnicDetails, + "InstanceConfigurationCreateVolumeDetails": InstanceConfigurationCreateVolumeDetails, + "InstanceConfigurationInstanceDetails": InstanceConfigurationInstanceDetails, + "InstanceConfigurationInstanceSourceDetails": InstanceConfigurationInstanceSourceDetails, + "InstanceConfigurationInstanceSourceViaBootVolumeDetails": InstanceConfigurationInstanceSourceViaBootVolumeDetails, + "InstanceConfigurationInstanceSourceViaImageDetails": InstanceConfigurationInstanceSourceViaImageDetails, + "InstanceConfigurationIscsiAttachVolumeDetails": InstanceConfigurationIscsiAttachVolumeDetails, + "InstanceConfigurationLaunchInstanceDetails": InstanceConfigurationLaunchInstanceDetails, + "InstanceConfigurationParavirtualizedAttachVolumeDetails": InstanceConfigurationParavirtualizedAttachVolumeDetails, + "InstanceConfigurationSummary": InstanceConfigurationSummary, + "InstanceConfigurationVolumeSourceDetails": InstanceConfigurationVolumeSourceDetails, + "InstanceConfigurationVolumeSourceFromVolumeBackupDetails": InstanceConfigurationVolumeSourceFromVolumeBackupDetails, + "InstanceConfigurationVolumeSourceFromVolumeDetails": InstanceConfigurationVolumeSourceFromVolumeDetails, "InstanceConsoleConnection": InstanceConsoleConnection, "InstanceCredentials": InstanceCredentials, + "InstancePool": InstancePool, + "InstancePoolPlacementConfiguration": InstancePoolPlacementConfiguration, + "InstancePoolPlacementSecondaryVnicSubnet": InstancePoolPlacementSecondaryVnicSubnet, + "InstancePoolSummary": InstancePoolSummary, "InstanceSourceDetails": InstanceSourceDetails, "InstanceSourceViaBootVolumeDetails": InstanceSourceViaBootVolumeDetails, "InstanceSourceViaImageDetails": InstanceSourceViaImageDetails, + "InstanceSummary": InstanceSummary, "InternetGateway": InternetGateway, "LaunchInstanceDetails": LaunchInstanceDetails, "LaunchOptions": LaunchOptions, @@ -307,7 +364,10 @@ "UpdateDrgDetails": UpdateDrgDetails, "UpdateIPSecConnectionDetails": UpdateIPSecConnectionDetails, "UpdateImageDetails": UpdateImageDetails, + "UpdateInstanceConfigurationDetails": UpdateInstanceConfigurationDetails, "UpdateInstanceDetails": UpdateInstanceDetails, + "UpdateInstancePoolDetails": UpdateInstancePoolDetails, + "UpdateInstancePoolPlacementConfigurationDetails": UpdateInstancePoolPlacementConfigurationDetails, "UpdateInternetGatewayDetails": UpdateInternetGatewayDetails, "UpdateLocalPeeringGatewayDetails": UpdateLocalPeeringGatewayDetails, "UpdateNatGatewayDetails": UpdateNatGatewayDetails, diff --git a/src/oci/core/models/compute_instance_details.py b/src/oci/core/models/compute_instance_details.py new file mode 100644 index 0000000000..a320ad61bc --- /dev/null +++ b/src/oci/core/models/compute_instance_details.py @@ -0,0 +1,128 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +from .instance_configuration_instance_details import InstanceConfigurationInstanceDetails +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 ComputeInstanceDetails(InstanceConfigurationInstanceDetails): + """ + Compute Instance Configuration instance details. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ComputeInstanceDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.core.models.ComputeInstanceDetails.instance_type` attribute + of this class is ``compute`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param instance_type: + The value to assign to the instance_type property of this ComputeInstanceDetails. + :type instance_type: str + + :param block_volumes: + The value to assign to the block_volumes property of this ComputeInstanceDetails. + :type block_volumes: list[InstanceConfigurationBlockVolumeDetails] + + :param launch_details: + The value to assign to the launch_details property of this ComputeInstanceDetails. + :type launch_details: InstanceConfigurationLaunchInstanceDetails + + :param secondary_vnics: + The value to assign to the secondary_vnics property of this ComputeInstanceDetails. + :type secondary_vnics: list[InstanceConfigurationAttachVnicDetails] + + """ + self.swagger_types = { + 'instance_type': 'str', + 'block_volumes': 'list[InstanceConfigurationBlockVolumeDetails]', + 'launch_details': 'InstanceConfigurationLaunchInstanceDetails', + 'secondary_vnics': 'list[InstanceConfigurationAttachVnicDetails]' + } + + self.attribute_map = { + 'instance_type': 'instanceType', + 'block_volumes': 'blockVolumes', + 'launch_details': 'launchDetails', + 'secondary_vnics': 'secondaryVnics' + } + + self._instance_type = None + self._block_volumes = None + self._launch_details = None + self._secondary_vnics = None + self._instance_type = 'compute' + + @property + def block_volumes(self): + """ + Gets the block_volumes of this ComputeInstanceDetails. + + :return: The block_volumes of this ComputeInstanceDetails. + :rtype: list[InstanceConfigurationBlockVolumeDetails] + """ + return self._block_volumes + + @block_volumes.setter + def block_volumes(self, block_volumes): + """ + Sets the block_volumes of this ComputeInstanceDetails. + + :param block_volumes: The block_volumes of this ComputeInstanceDetails. + :type: list[InstanceConfigurationBlockVolumeDetails] + """ + self._block_volumes = block_volumes + + @property + def launch_details(self): + """ + Gets the launch_details of this ComputeInstanceDetails. + + :return: The launch_details of this ComputeInstanceDetails. + :rtype: InstanceConfigurationLaunchInstanceDetails + """ + return self._launch_details + + @launch_details.setter + def launch_details(self, launch_details): + """ + Sets the launch_details of this ComputeInstanceDetails. + + :param launch_details: The launch_details of this ComputeInstanceDetails. + :type: InstanceConfigurationLaunchInstanceDetails + """ + self._launch_details = launch_details + + @property + def secondary_vnics(self): + """ + Gets the secondary_vnics of this ComputeInstanceDetails. + + :return: The secondary_vnics of this ComputeInstanceDetails. + :rtype: list[InstanceConfigurationAttachVnicDetails] + """ + return self._secondary_vnics + + @secondary_vnics.setter + def secondary_vnics(self, secondary_vnics): + """ + Sets the secondary_vnics of this ComputeInstanceDetails. + + :param secondary_vnics: The secondary_vnics of this ComputeInstanceDetails. + :type: list[InstanceConfigurationAttachVnicDetails] + """ + self._secondary_vnics = secondary_vnics + + 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/copy_volume_backup_details.py b/src/oci/core/models/copy_volume_backup_details.py new file mode 100644 index 0000000000..acf4988deb --- /dev/null +++ b/src/oci/core/models/copy_volume_backup_details.py @@ -0,0 +1,106 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 CopyVolumeBackupDetails(object): + """ + CopyVolumeBackupDetails model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CopyVolumeBackupDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param destination_region: + The value to assign to the destination_region property of this CopyVolumeBackupDetails. + :type destination_region: str + + :param display_name: + The value to assign to the display_name property of this CopyVolumeBackupDetails. + :type display_name: str + + """ + self.swagger_types = { + 'destination_region': 'str', + 'display_name': 'str' + } + + self.attribute_map = { + 'destination_region': 'destinationRegion', + 'display_name': 'displayName' + } + + self._destination_region = None + self._display_name = None + + @property + def destination_region(self): + """ + **[Required]** Gets the destination_region of this CopyVolumeBackupDetails. + The name of the destination region. + + Example: `us-ashburn-1` + + + :return: The destination_region of this CopyVolumeBackupDetails. + :rtype: str + """ + return self._destination_region + + @destination_region.setter + def destination_region(self, destination_region): + """ + Sets the destination_region of this CopyVolumeBackupDetails. + The name of the destination region. + + Example: `us-ashburn-1` + + + :param destination_region: The destination_region of this CopyVolumeBackupDetails. + :type: str + """ + self._destination_region = destination_region + + @property + def display_name(self): + """ + Gets the display_name of this CopyVolumeBackupDetails. + A user-friendly name for the volume backup. Does not have to be unique and it's changeable. + Avoid entering confidential information. + + + :return: The display_name of this CopyVolumeBackupDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CopyVolumeBackupDetails. + A user-friendly name for the volume backup. Does not have to be unique and it's changeable. + Avoid entering confidential information. + + + :param display_name: The display_name of this CopyVolumeBackupDetails. + :type: str + """ + self._display_name = display_name + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/create_instance_configuration_details.py b/src/oci/core/models/create_instance_configuration_details.py new file mode 100644 index 0000000000..88cbbd1ee3 --- /dev/null +++ b/src/oci/core/models/create_instance_configuration_details.py @@ -0,0 +1,211 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 CreateInstanceConfigurationDetails(object): + """ + An instance configuration that can be used to launch + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateInstanceConfigurationDetails 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 CreateInstanceConfigurationDetails. + :type compartment_id: str + + :param defined_tags: + The value to assign to the defined_tags property of this CreateInstanceConfigurationDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this CreateInstanceConfigurationDetails. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateInstanceConfigurationDetails. + :type freeform_tags: dict(str, str) + + :param instance_details: + The value to assign to the instance_details property of this CreateInstanceConfigurationDetails. + :type instance_details: InstanceConfigurationInstanceDetails + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)', + 'instance_details': 'InstanceConfigurationInstanceDetails' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags', + 'instance_details': 'instanceDetails' + } + + self._compartment_id = None + self._defined_tags = None + self._display_name = None + self._freeform_tags = None + self._instance_details = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateInstanceConfigurationDetails. + The OCID of the compartment containing the instance configuration. + + + :return: The compartment_id of this CreateInstanceConfigurationDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateInstanceConfigurationDetails. + The OCID of the compartment containing the instance configuration. + + + :param compartment_id: The compartment_id of this CreateInstanceConfigurationDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateInstanceConfigurationDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateInstanceConfigurationDetails. + :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 CreateInstanceConfigurationDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateInstanceConfigurationDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this CreateInstanceConfigurationDetails. + A user-friendly name for the instance configuration + + + :return: The display_name of this CreateInstanceConfigurationDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateInstanceConfigurationDetails. + A user-friendly name for the instance configuration + + + :param display_name: The display_name of this CreateInstanceConfigurationDetails. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateInstanceConfigurationDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateInstanceConfigurationDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateInstanceConfigurationDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateInstanceConfigurationDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def instance_details(self): + """ + **[Required]** Gets the instance_details of this CreateInstanceConfigurationDetails. + + :return: The instance_details of this CreateInstanceConfigurationDetails. + :rtype: InstanceConfigurationInstanceDetails + """ + return self._instance_details + + @instance_details.setter + def instance_details(self, instance_details): + """ + Sets the instance_details of this CreateInstanceConfigurationDetails. + + :param instance_details: The instance_details of this CreateInstanceConfigurationDetails. + :type: InstanceConfigurationInstanceDetails + """ + self._instance_details = instance_details + + 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_instance_pool_details.py b/src/oci/core/models/create_instance_pool_details.py new file mode 100644 index 0000000000..bd6d654ae4 --- /dev/null +++ b/src/oci/core/models/create_instance_pool_details.py @@ -0,0 +1,279 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 CreateInstancePoolDetails(object): + """ + The data to create an instance pool. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateInstancePoolDetails 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 CreateInstancePoolDetails. + :type compartment_id: str + + :param defined_tags: + The value to assign to the defined_tags property of this CreateInstancePoolDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this CreateInstancePoolDetails. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateInstancePoolDetails. + :type freeform_tags: dict(str, str) + + :param instance_configuration_id: + The value to assign to the instance_configuration_id property of this CreateInstancePoolDetails. + :type instance_configuration_id: str + + :param placement_configurations: + The value to assign to the placement_configurations property of this CreateInstancePoolDetails. + :type placement_configurations: list[CreateInstancePoolPlacementConfigurationDetails] + + :param size: + The value to assign to the size property of this CreateInstancePoolDetails. + :type size: int + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)', + 'instance_configuration_id': 'str', + 'placement_configurations': 'list[CreateInstancePoolPlacementConfigurationDetails]', + 'size': 'int' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags', + 'instance_configuration_id': 'instanceConfigurationId', + 'placement_configurations': 'placementConfigurations', + 'size': 'size' + } + + self._compartment_id = None + self._defined_tags = None + self._display_name = None + self._freeform_tags = None + self._instance_configuration_id = None + self._placement_configurations = None + self._size = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateInstancePoolDetails. + The OCID of the compartment containing the instance pool + + + :return: The compartment_id of this CreateInstancePoolDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateInstancePoolDetails. + The OCID of the compartment containing the instance pool + + + :param compartment_id: The compartment_id of this CreateInstancePoolDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateInstancePoolDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateInstancePoolDetails. + :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 CreateInstancePoolDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateInstancePoolDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this CreateInstancePoolDetails. + The user-friendly name. Does not have to be unique. + + + :return: The display_name of this CreateInstancePoolDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateInstancePoolDetails. + The user-friendly name. Does not have to be unique. + + + :param display_name: The display_name of this CreateInstancePoolDetails. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateInstancePoolDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateInstancePoolDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateInstancePoolDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateInstancePoolDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def instance_configuration_id(self): + """ + **[Required]** Gets the instance_configuration_id of this CreateInstancePoolDetails. + The OCID of the instance configuration associated to the instance pool. + + + :return: The instance_configuration_id of this CreateInstancePoolDetails. + :rtype: str + """ + return self._instance_configuration_id + + @instance_configuration_id.setter + def instance_configuration_id(self, instance_configuration_id): + """ + Sets the instance_configuration_id of this CreateInstancePoolDetails. + The OCID of the instance configuration associated to the instance pool. + + + :param instance_configuration_id: The instance_configuration_id of this CreateInstancePoolDetails. + :type: str + """ + self._instance_configuration_id = instance_configuration_id + + @property + def placement_configurations(self): + """ + **[Required]** Gets the placement_configurations of this CreateInstancePoolDetails. + The placement configurations for the instance pool. + There should be 1 placement configuration for each desired AD. + + + :return: The placement_configurations of this CreateInstancePoolDetails. + :rtype: list[CreateInstancePoolPlacementConfigurationDetails] + """ + return self._placement_configurations + + @placement_configurations.setter + def placement_configurations(self, placement_configurations): + """ + Sets the placement_configurations of this CreateInstancePoolDetails. + The placement configurations for the instance pool. + There should be 1 placement configuration for each desired AD. + + + :param placement_configurations: The placement_configurations of this CreateInstancePoolDetails. + :type: list[CreateInstancePoolPlacementConfigurationDetails] + """ + self._placement_configurations = placement_configurations + + @property + def size(self): + """ + **[Required]** Gets the size of this CreateInstancePoolDetails. + The number of instances that should be in the instance pool. + + + :return: The size of this CreateInstancePoolDetails. + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """ + Sets the size of this CreateInstancePoolDetails. + The number of instances that should be in the instance pool. + + + :param size: The size of this CreateInstancePoolDetails. + :type: int + """ + self._size = size + + 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_instance_pool_placement_configuration_details.py b/src/oci/core/models/create_instance_pool_placement_configuration_details.py new file mode 100644 index 0000000000..657500348e --- /dev/null +++ b/src/oci/core/models/create_instance_pool_placement_configuration_details.py @@ -0,0 +1,133 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 CreateInstancePoolPlacementConfigurationDetails(object): + """ + The location for where an instance pool will place instances. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateInstancePoolPlacementConfigurationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param availability_domain: + The value to assign to the availability_domain property of this CreateInstancePoolPlacementConfigurationDetails. + :type availability_domain: str + + :param primary_subnet_id: + The value to assign to the primary_subnet_id property of this CreateInstancePoolPlacementConfigurationDetails. + :type primary_subnet_id: str + + :param secondary_vnic_subnets: + The value to assign to the secondary_vnic_subnets property of this CreateInstancePoolPlacementConfigurationDetails. + :type secondary_vnic_subnets: list[InstancePoolPlacementSecondaryVnicSubnet] + + """ + self.swagger_types = { + 'availability_domain': 'str', + 'primary_subnet_id': 'str', + 'secondary_vnic_subnets': 'list[InstancePoolPlacementSecondaryVnicSubnet]' + } + + self.attribute_map = { + 'availability_domain': 'availabilityDomain', + 'primary_subnet_id': 'primarySubnetId', + 'secondary_vnic_subnets': 'secondaryVnicSubnets' + } + + self._availability_domain = None + self._primary_subnet_id = None + self._secondary_vnic_subnets = None + + @property + def availability_domain(self): + """ + **[Required]** Gets the availability_domain of this CreateInstancePoolPlacementConfigurationDetails. + The availability domain to place instances. + Example: `Uocm:PHX-AD-1` + + + :return: The availability_domain of this CreateInstancePoolPlacementConfigurationDetails. + :rtype: str + """ + return self._availability_domain + + @availability_domain.setter + def availability_domain(self, availability_domain): + """ + Sets the availability_domain of this CreateInstancePoolPlacementConfigurationDetails. + The availability domain to place instances. + Example: `Uocm:PHX-AD-1` + + + :param availability_domain: The availability_domain of this CreateInstancePoolPlacementConfigurationDetails. + :type: str + """ + self._availability_domain = availability_domain + + @property + def primary_subnet_id(self): + """ + **[Required]** Gets the primary_subnet_id of this CreateInstancePoolPlacementConfigurationDetails. + The OCID of the primary subnet to place instances. + + + :return: The primary_subnet_id of this CreateInstancePoolPlacementConfigurationDetails. + :rtype: str + """ + return self._primary_subnet_id + + @primary_subnet_id.setter + def primary_subnet_id(self, primary_subnet_id): + """ + Sets the primary_subnet_id of this CreateInstancePoolPlacementConfigurationDetails. + The OCID of the primary subnet to place instances. + + + :param primary_subnet_id: The primary_subnet_id of this CreateInstancePoolPlacementConfigurationDetails. + :type: str + """ + self._primary_subnet_id = primary_subnet_id + + @property + def secondary_vnic_subnets(self): + """ + Gets the secondary_vnic_subnets of this CreateInstancePoolPlacementConfigurationDetails. + The set of secondary VNIC data for instances in the pool. + + + :return: The secondary_vnic_subnets of this CreateInstancePoolPlacementConfigurationDetails. + :rtype: list[InstancePoolPlacementSecondaryVnicSubnet] + """ + return self._secondary_vnic_subnets + + @secondary_vnic_subnets.setter + def secondary_vnic_subnets(self, secondary_vnic_subnets): + """ + Sets the secondary_vnic_subnets of this CreateInstancePoolPlacementConfigurationDetails. + The set of secondary VNIC data for instances in the pool. + + + :param secondary_vnic_subnets: The secondary_vnic_subnets of this CreateInstancePoolPlacementConfigurationDetails. + :type: list[InstancePoolPlacementSecondaryVnicSubnet] + """ + self._secondary_vnic_subnets = secondary_vnic_subnets + + 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_subnet_details.py b/src/oci/core/models/create_subnet_details.py index 6d9a7969c1..94d8ed0eb9 100644 --- a/src/oci/core/models/create_subnet_details.py +++ b/src/oci/core/models/create_subnet_details.py @@ -228,7 +228,7 @@ def dhcp_options_id(self): """ Gets the dhcp_options_id of this CreateSubnetDetails. The OCID of the set of DHCP options the subnet will use. If you don't - provide a value, the subnet will use the VCN's default set of DHCP options. + provide a value, the subnet uses the VCN's default set of DHCP options. :return: The dhcp_options_id of this CreateSubnetDetails. @@ -241,7 +241,7 @@ def dhcp_options_id(self, dhcp_options_id): """ Sets the dhcp_options_id of this CreateSubnetDetails. The OCID of the set of DHCP options the subnet will use. If you don't - provide a value, the subnet will use the VCN's default set of DHCP options. + provide a value, the subnet uses the VCN's default set of DHCP options. :param dhcp_options_id: The dhcp_options_id of this CreateSubnetDetails. @@ -410,7 +410,7 @@ def route_table_id(self): """ Gets the route_table_id of this CreateSubnetDetails. The OCID of the route table the subnet will use. If you don't provide a value, - the subnet will use the VCN's default route table. + the subnet uses the VCN's default route table. :return: The route_table_id of this CreateSubnetDetails. @@ -423,7 +423,7 @@ def route_table_id(self, route_table_id): """ Sets the route_table_id of this CreateSubnetDetails. The OCID of the route table the subnet will use. If you don't provide a value, - the subnet will use the VCN's default route table. + the subnet uses the VCN's default route table. :param route_table_id: The route_table_id of this CreateSubnetDetails. @@ -435,10 +435,10 @@ def route_table_id(self, route_table_id): def security_list_ids(self): """ Gets the security_list_ids of this CreateSubnetDetails. - OCIDs for the security lists to associate with the subnet. If you don't - provide a value, the VCN's default security list will be associated with - the subnet. Remember that security lists are associated at the subnet - level, but the rules are applied to the individual VNICs in the subnet. + The OCIDs of the security list or lists the subnet will use. If you don't + provide a value, the subnet uses the VCN's default security list. + Remember that security lists are associated *with the subnet*, but the + rules are applied to the individual VNICs in the subnet. :return: The security_list_ids of this CreateSubnetDetails. @@ -450,10 +450,10 @@ def security_list_ids(self): def security_list_ids(self, security_list_ids): """ Sets the security_list_ids of this CreateSubnetDetails. - OCIDs for the security lists to associate with the subnet. If you don't - provide a value, the VCN's default security list will be associated with - the subnet. Remember that security lists are associated at the subnet - level, but the rules are applied to the individual VNICs in the subnet. + The OCIDs of the security list or lists the subnet will use. If you don't + provide a value, the subnet uses the VCN's default security list. + Remember that security lists are associated *with the subnet*, but the + rules are applied to the individual VNICs in the subnet. :param security_list_ids: The security_list_ids of this CreateSubnetDetails. diff --git a/src/oci/core/models/instance.py b/src/oci/core/models/instance.py index 2d1172606f..ec21aabd1b 100644 --- a/src/oci/core/models/instance.py +++ b/src/oci/core/models/instance.py @@ -154,6 +154,10 @@ def __init__(self, **kwargs): The value to assign to the time_created property of this Instance. :type time_created: datetime + :param time_maintenance_reboot_due: + The value to assign to the time_maintenance_reboot_due property of this Instance. + :type time_maintenance_reboot_due: datetime + """ self.swagger_types = { 'availability_domain': 'str', @@ -173,7 +177,8 @@ def __init__(self, **kwargs): 'region': 'str', 'shape': 'str', 'source_details': 'InstanceSourceDetails', - 'time_created': 'datetime' + 'time_created': 'datetime', + 'time_maintenance_reboot_due': 'datetime' } self.attribute_map = { @@ -194,7 +199,8 @@ def __init__(self, **kwargs): 'region': 'region', 'shape': 'shape', 'source_details': 'sourceDetails', - 'time_created': 'timeCreated' + 'time_created': 'timeCreated', + 'time_maintenance_reboot_due': 'timeMaintenanceRebootDue' } self._availability_domain = None @@ -215,6 +221,7 @@ def __init__(self, **kwargs): self._shape = None self._source_details = None self._time_created = None + self._time_maintenance_reboot_due = None @property def availability_domain(self): @@ -780,6 +787,36 @@ def time_created(self, time_created): """ self._time_created = time_created + @property + def time_maintenance_reboot_due(self): + """ + Gets the time_maintenance_reboot_due of this Instance. + The date and time the instance is expected to be stopped / started, in the format defined by RFC3339. + After that time if instance hasn't been rebooted, Oracle will reboot the instance within 24 hours of the due time. + Regardless of how the instance was stopped, the flag will be reset to empty as soon as instance reaches Stopped state. + Example: `2018-05-25T21:10:29.600Z` + + + :return: The time_maintenance_reboot_due of this Instance. + :rtype: datetime + """ + return self._time_maintenance_reboot_due + + @time_maintenance_reboot_due.setter + def time_maintenance_reboot_due(self, time_maintenance_reboot_due): + """ + Sets the time_maintenance_reboot_due of this Instance. + The date and time the instance is expected to be stopped / started, in the format defined by RFC3339. + After that time if instance hasn't been rebooted, Oracle will reboot the instance within 24 hours of the due time. + Regardless of how the instance was stopped, the flag will be reset to empty as soon as instance reaches Stopped state. + Example: `2018-05-25T21:10:29.600Z` + + + :param time_maintenance_reboot_due: The time_maintenance_reboot_due of this Instance. + :type: datetime + """ + self._time_maintenance_reboot_due = time_maintenance_reboot_due + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/core/models/instance_configuration.py b/src/oci/core/models/instance_configuration.py new file mode 100644 index 0000000000..5a9b8df7c0 --- /dev/null +++ b/src/oci/core/models/instance_configuration.py @@ -0,0 +1,302 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstanceConfiguration(object): + """ + Instance Configuration + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfiguration 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 InstanceConfiguration. + :type compartment_id: str + + :param defined_tags: + The value to assign to the defined_tags property of this InstanceConfiguration. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this InstanceConfiguration. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this InstanceConfiguration. + :type freeform_tags: dict(str, str) + + :param id: + The value to assign to the id property of this InstanceConfiguration. + :type id: str + + :param instance_details: + The value to assign to the instance_details property of this InstanceConfiguration. + :type instance_details: InstanceConfigurationInstanceDetails + + :param deferred_fields: + The value to assign to the deferred_fields property of this InstanceConfiguration. + :type deferred_fields: list[str] + + :param time_created: + The value to assign to the time_created property of this InstanceConfiguration. + :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', + 'instance_details': 'InstanceConfigurationInstanceDetails', + 'deferred_fields': 'list[str]', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags', + 'id': 'id', + 'instance_details': 'instanceDetails', + 'deferred_fields': 'deferredFields', + 'time_created': 'timeCreated' + } + + self._compartment_id = None + self._defined_tags = None + self._display_name = None + self._freeform_tags = None + self._id = None + self._instance_details = None + self._deferred_fields = None + self._time_created = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this InstanceConfiguration. + The OCID of the compartment containing the instance configuration. + + + :return: The compartment_id of this InstanceConfiguration. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this InstanceConfiguration. + The OCID of the compartment containing the instance configuration. + + + :param compartment_id: The compartment_id of this InstanceConfiguration. + :type: str + """ + self._compartment_id = compartment_id + + @property + def defined_tags(self): + """ + Gets the defined_tags of this InstanceConfiguration. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this InstanceConfiguration. + :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 InstanceConfiguration. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this InstanceConfiguration. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this InstanceConfiguration. + A user-friendly name for the instance configuration + + + :return: The display_name of this InstanceConfiguration. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this InstanceConfiguration. + A user-friendly name for the instance configuration + + + :param display_name: The display_name of this InstanceConfiguration. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this InstanceConfiguration. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this InstanceConfiguration. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this InstanceConfiguration. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this InstanceConfiguration. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def id(self): + """ + **[Required]** Gets the id of this InstanceConfiguration. + The OCID of the instance configuration + + + :return: The id of this InstanceConfiguration. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this InstanceConfiguration. + The OCID of the instance configuration + + + :param id: The id of this InstanceConfiguration. + :type: str + """ + self._id = id + + @property + def instance_details(self): + """ + Gets the instance_details of this InstanceConfiguration. + + :return: The instance_details of this InstanceConfiguration. + :rtype: InstanceConfigurationInstanceDetails + """ + return self._instance_details + + @instance_details.setter + def instance_details(self, instance_details): + """ + Sets the instance_details of this InstanceConfiguration. + + :param instance_details: The instance_details of this InstanceConfiguration. + :type: InstanceConfigurationInstanceDetails + """ + self._instance_details = instance_details + + @property + def deferred_fields(self): + """ + Gets the deferred_fields of this InstanceConfiguration. + + :return: The deferred_fields of this InstanceConfiguration. + :rtype: list[str] + """ + return self._deferred_fields + + @deferred_fields.setter + def deferred_fields(self, deferred_fields): + """ + Sets the deferred_fields of this InstanceConfiguration. + + :param deferred_fields: The deferred_fields of this InstanceConfiguration. + :type: list[str] + """ + self._deferred_fields = deferred_fields + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this InstanceConfiguration. + The date and time the instance configuration was created, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_created of this InstanceConfiguration. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this InstanceConfiguration. + The date and time the instance configuration was created, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :param time_created: The time_created of this InstanceConfiguration. + :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/instance_configuration_attach_vnic_details.py b/src/oci/core/models/instance_configuration_attach_vnic_details.py new file mode 100644 index 0000000000..ab88cf924c --- /dev/null +++ b/src/oci/core/models/instance_configuration_attach_vnic_details.py @@ -0,0 +1,143 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstanceConfigurationAttachVnicDetails(object): + """ + InstanceConfigurationAttachVnicDetails model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationAttachVnicDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param create_vnic_details: + The value to assign to the create_vnic_details property of this InstanceConfigurationAttachVnicDetails. + :type create_vnic_details: InstanceConfigurationCreateVnicDetails + + :param display_name: + The value to assign to the display_name property of this InstanceConfigurationAttachVnicDetails. + :type display_name: str + + :param nic_index: + The value to assign to the nic_index property of this InstanceConfigurationAttachVnicDetails. + :type nic_index: int + + """ + self.swagger_types = { + 'create_vnic_details': 'InstanceConfigurationCreateVnicDetails', + 'display_name': 'str', + 'nic_index': 'int' + } + + self.attribute_map = { + 'create_vnic_details': 'createVnicDetails', + 'display_name': 'displayName', + 'nic_index': 'nicIndex' + } + + self._create_vnic_details = None + self._display_name = None + self._nic_index = None + + @property + def create_vnic_details(self): + """ + Gets the create_vnic_details of this InstanceConfigurationAttachVnicDetails. + Details for creating a new VNIC. + + + :return: The create_vnic_details of this InstanceConfigurationAttachVnicDetails. + :rtype: InstanceConfigurationCreateVnicDetails + """ + return self._create_vnic_details + + @create_vnic_details.setter + def create_vnic_details(self, create_vnic_details): + """ + Sets the create_vnic_details of this InstanceConfigurationAttachVnicDetails. + Details for creating a new VNIC. + + + :param create_vnic_details: The create_vnic_details of this InstanceConfigurationAttachVnicDetails. + :type: InstanceConfigurationCreateVnicDetails + """ + self._create_vnic_details = create_vnic_details + + @property + def display_name(self): + """ + Gets the display_name of this InstanceConfigurationAttachVnicDetails. + A user-friendly name for the attachment. Does not have to be unique, and it cannot be changed. + + + :return: The display_name of this InstanceConfigurationAttachVnicDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this InstanceConfigurationAttachVnicDetails. + A user-friendly name for the attachment. Does not have to be unique, and it cannot be changed. + + + :param display_name: The display_name of this InstanceConfigurationAttachVnicDetails. + :type: str + """ + self._display_name = display_name + + @property + def nic_index(self): + """ + Gets the nic_index of this InstanceConfigurationAttachVnicDetails. + Which physical network interface card (NIC) the VNIC will use. Defaults to 0. + Certain bare metal instance shapes have two active physical NICs (0 and 1). If + you add a secondary VNIC to one of these instances, you can specify which NIC + the VNIC will use. For more information, see + `Virtual Network Interface Cards (VNICs)`__. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm + + + :return: The nic_index of this InstanceConfigurationAttachVnicDetails. + :rtype: int + """ + return self._nic_index + + @nic_index.setter + def nic_index(self, nic_index): + """ + Sets the nic_index of this InstanceConfigurationAttachVnicDetails. + Which physical network interface card (NIC) the VNIC will use. Defaults to 0. + Certain bare metal instance shapes have two active physical NICs (0 and 1). If + you add a secondary VNIC to one of these instances, you can specify which NIC + the VNIC will use. For more information, see + `Virtual Network Interface Cards (VNICs)`__. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm + + + :param nic_index: The nic_index of this InstanceConfigurationAttachVnicDetails. + :type: int + """ + self._nic_index = nic_index + + 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/instance_configuration_attach_volume_details.py b/src/oci/core/models/instance_configuration_attach_volume_details.py new file mode 100644 index 0000000000..1ec229246a --- /dev/null +++ b/src/oci/core/models/instance_configuration_attach_volume_details.py @@ -0,0 +1,152 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstanceConfigurationAttachVolumeDetails(object): + """ + Volume attachmentDetails. Please see :class:`AttachVolumeDetails` + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationAttachVolumeDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.core.models.InstanceConfigurationIscsiAttachVolumeDetails` + * :class:`~oci.core.models.InstanceConfigurationParavirtualizedAttachVolumeDetails` + + 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 InstanceConfigurationAttachVolumeDetails. + :type display_name: str + + :param is_read_only: + The value to assign to the is_read_only property of this InstanceConfigurationAttachVolumeDetails. + :type is_read_only: bool + + :param type: + The value to assign to the type property of this InstanceConfigurationAttachVolumeDetails. + :type type: str + + """ + self.swagger_types = { + 'display_name': 'str', + 'is_read_only': 'bool', + 'type': 'str' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'is_read_only': 'isReadOnly', + 'type': 'type' + } + + self._display_name = None + self._is_read_only = None + self._type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['type'] + + if type == 'iscsi': + return 'InstanceConfigurationIscsiAttachVolumeDetails' + + if type == 'paravirtualized': + return 'InstanceConfigurationParavirtualizedAttachVolumeDetails' + else: + return 'InstanceConfigurationAttachVolumeDetails' + + @property + def display_name(self): + """ + Gets the display_name of this InstanceConfigurationAttachVolumeDetails. + A user-friendly name. Does not have to be unique, and it cannot be changed. Avoid entering confidential information. + + + :return: The display_name of this InstanceConfigurationAttachVolumeDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this InstanceConfigurationAttachVolumeDetails. + A user-friendly name. Does not have to be unique, and it cannot be changed. Avoid entering confidential information. + + + :param display_name: The display_name of this InstanceConfigurationAttachVolumeDetails. + :type: str + """ + self._display_name = display_name + + @property + def is_read_only(self): + """ + Gets the is_read_only of this InstanceConfigurationAttachVolumeDetails. + Whether the attachment should be created in read-only mode. + + + :return: The is_read_only of this InstanceConfigurationAttachVolumeDetails. + :rtype: bool + """ + return self._is_read_only + + @is_read_only.setter + def is_read_only(self, is_read_only): + """ + Sets the is_read_only of this InstanceConfigurationAttachVolumeDetails. + Whether the attachment should be created in read-only mode. + + + :param is_read_only: The is_read_only of this InstanceConfigurationAttachVolumeDetails. + :type: bool + """ + self._is_read_only = is_read_only + + @property + def type(self): + """ + **[Required]** Gets the type of this InstanceConfigurationAttachVolumeDetails. + The type of volume. The only supported values are \"iscsi\" and \"paravirtualized\". + + + :return: The type of this InstanceConfigurationAttachVolumeDetails. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this InstanceConfigurationAttachVolumeDetails. + The type of volume. The only supported values are \"iscsi\" and \"paravirtualized\". + + + :param type: The type of this InstanceConfigurationAttachVolumeDetails. + :type: str + """ + self._type = type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/instance_configuration_block_volume_details.py b/src/oci/core/models/instance_configuration_block_volume_details.py new file mode 100644 index 0000000000..ea2cf1d7e5 --- /dev/null +++ b/src/oci/core/models/instance_configuration_block_volume_details.py @@ -0,0 +1,123 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstanceConfigurationBlockVolumeDetails(object): + """ + Create new block volumes or attach to an existing volume. Specify either createDetails or volumeId. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationBlockVolumeDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param attach_details: + The value to assign to the attach_details property of this InstanceConfigurationBlockVolumeDetails. + :type attach_details: InstanceConfigurationAttachVolumeDetails + + :param create_details: + The value to assign to the create_details property of this InstanceConfigurationBlockVolumeDetails. + :type create_details: InstanceConfigurationCreateVolumeDetails + + :param volume_id: + The value to assign to the volume_id property of this InstanceConfigurationBlockVolumeDetails. + :type volume_id: str + + """ + self.swagger_types = { + 'attach_details': 'InstanceConfigurationAttachVolumeDetails', + 'create_details': 'InstanceConfigurationCreateVolumeDetails', + 'volume_id': 'str' + } + + self.attribute_map = { + 'attach_details': 'attachDetails', + 'create_details': 'createDetails', + 'volume_id': 'volumeId' + } + + self._attach_details = None + self._create_details = None + self._volume_id = None + + @property + def attach_details(self): + """ + Gets the attach_details of this InstanceConfigurationBlockVolumeDetails. + + :return: The attach_details of this InstanceConfigurationBlockVolumeDetails. + :rtype: InstanceConfigurationAttachVolumeDetails + """ + return self._attach_details + + @attach_details.setter + def attach_details(self, attach_details): + """ + Sets the attach_details of this InstanceConfigurationBlockVolumeDetails. + + :param attach_details: The attach_details of this InstanceConfigurationBlockVolumeDetails. + :type: InstanceConfigurationAttachVolumeDetails + """ + self._attach_details = attach_details + + @property + def create_details(self): + """ + Gets the create_details of this InstanceConfigurationBlockVolumeDetails. + + :return: The create_details of this InstanceConfigurationBlockVolumeDetails. + :rtype: InstanceConfigurationCreateVolumeDetails + """ + return self._create_details + + @create_details.setter + def create_details(self, create_details): + """ + Sets the create_details of this InstanceConfigurationBlockVolumeDetails. + + :param create_details: The create_details of this InstanceConfigurationBlockVolumeDetails. + :type: InstanceConfigurationCreateVolumeDetails + """ + self._create_details = create_details + + @property + def volume_id(self): + """ + Gets the volume_id of this InstanceConfigurationBlockVolumeDetails. + The OCID of the volume. + + + :return: The volume_id of this InstanceConfigurationBlockVolumeDetails. + :rtype: str + """ + return self._volume_id + + @volume_id.setter + def volume_id(self, volume_id): + """ + Sets the volume_id of this InstanceConfigurationBlockVolumeDetails. + The OCID of the volume. + + + :param volume_id: The volume_id of this InstanceConfigurationBlockVolumeDetails. + :type: str + """ + self._volume_id = volume_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/instance_configuration_create_vnic_details.py b/src/oci/core/models/instance_configuration_create_vnic_details.py new file mode 100644 index 0000000000..ea789b0a44 --- /dev/null +++ b/src/oci/core/models/instance_configuration_create_vnic_details.py @@ -0,0 +1,206 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstanceConfigurationCreateVnicDetails(object): + """ + Please see :class:`CreateVnicDetails` + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationCreateVnicDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param assign_public_ip: + The value to assign to the assign_public_ip property of this InstanceConfigurationCreateVnicDetails. + :type assign_public_ip: bool + + :param display_name: + The value to assign to the display_name property of this InstanceConfigurationCreateVnicDetails. + :type display_name: str + + :param hostname_label: + The value to assign to the hostname_label property of this InstanceConfigurationCreateVnicDetails. + :type hostname_label: str + + :param private_ip: + The value to assign to the private_ip property of this InstanceConfigurationCreateVnicDetails. + :type private_ip: str + + :param skip_source_dest_check: + The value to assign to the skip_source_dest_check property of this InstanceConfigurationCreateVnicDetails. + :type skip_source_dest_check: bool + + :param subnet_id: + The value to assign to the subnet_id property of this InstanceConfigurationCreateVnicDetails. + :type subnet_id: str + + """ + self.swagger_types = { + 'assign_public_ip': 'bool', + 'display_name': 'str', + 'hostname_label': 'str', + 'private_ip': 'str', + 'skip_source_dest_check': 'bool', + 'subnet_id': 'str' + } + + self.attribute_map = { + 'assign_public_ip': 'assignPublicIp', + 'display_name': 'displayName', + 'hostname_label': 'hostnameLabel', + 'private_ip': 'privateIp', + 'skip_source_dest_check': 'skipSourceDestCheck', + 'subnet_id': 'subnetId' + } + + self._assign_public_ip = None + self._display_name = None + self._hostname_label = None + self._private_ip = None + self._skip_source_dest_check = None + self._subnet_id = None + + @property + def assign_public_ip(self): + """ + Gets the assign_public_ip of this InstanceConfigurationCreateVnicDetails. + + :return: The assign_public_ip of this InstanceConfigurationCreateVnicDetails. + :rtype: bool + """ + return self._assign_public_ip + + @assign_public_ip.setter + def assign_public_ip(self, assign_public_ip): + """ + Sets the assign_public_ip of this InstanceConfigurationCreateVnicDetails. + + :param assign_public_ip: The assign_public_ip of this InstanceConfigurationCreateVnicDetails. + :type: bool + """ + self._assign_public_ip = assign_public_ip + + @property + def display_name(self): + """ + Gets the display_name of this InstanceConfigurationCreateVnicDetails. + A user-friendly name for the VNIC. Does not have to be unique. + Avoid entering confidential information. + + + :return: The display_name of this InstanceConfigurationCreateVnicDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this InstanceConfigurationCreateVnicDetails. + A user-friendly name for the VNIC. Does not have to be unique. + Avoid entering confidential information. + + + :param display_name: The display_name of this InstanceConfigurationCreateVnicDetails. + :type: str + """ + self._display_name = display_name + + @property + def hostname_label(self): + """ + Gets the hostname_label of this InstanceConfigurationCreateVnicDetails. + + :return: The hostname_label of this InstanceConfigurationCreateVnicDetails. + :rtype: str + """ + return self._hostname_label + + @hostname_label.setter + def hostname_label(self, hostname_label): + """ + Sets the hostname_label of this InstanceConfigurationCreateVnicDetails. + + :param hostname_label: The hostname_label of this InstanceConfigurationCreateVnicDetails. + :type: str + """ + self._hostname_label = hostname_label + + @property + def private_ip(self): + """ + Gets the private_ip of this InstanceConfigurationCreateVnicDetails. + + :return: The private_ip of this InstanceConfigurationCreateVnicDetails. + :rtype: str + """ + return self._private_ip + + @private_ip.setter + def private_ip(self, private_ip): + """ + Sets the private_ip of this InstanceConfigurationCreateVnicDetails. + + :param private_ip: The private_ip of this InstanceConfigurationCreateVnicDetails. + :type: str + """ + self._private_ip = private_ip + + @property + def skip_source_dest_check(self): + """ + Gets the skip_source_dest_check of this InstanceConfigurationCreateVnicDetails. + + :return: The skip_source_dest_check of this InstanceConfigurationCreateVnicDetails. + :rtype: bool + """ + return self._skip_source_dest_check + + @skip_source_dest_check.setter + def skip_source_dest_check(self, skip_source_dest_check): + """ + Sets the skip_source_dest_check of this InstanceConfigurationCreateVnicDetails. + + :param skip_source_dest_check: The skip_source_dest_check of this InstanceConfigurationCreateVnicDetails. + :type: bool + """ + self._skip_source_dest_check = skip_source_dest_check + + @property + def subnet_id(self): + """ + Gets the subnet_id of this InstanceConfigurationCreateVnicDetails. + + :return: The subnet_id of this InstanceConfigurationCreateVnicDetails. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """ + Sets the subnet_id of this InstanceConfigurationCreateVnicDetails. + + :param subnet_id: The subnet_id of this InstanceConfigurationCreateVnicDetails. + :type: str + """ + self._subnet_id = subnet_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/instance_configuration_create_volume_details.py b/src/oci/core/models/instance_configuration_create_volume_details.py new file mode 100644 index 0000000000..64b90e0904 --- /dev/null +++ b/src/oci/core/models/instance_configuration_create_volume_details.py @@ -0,0 +1,320 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstanceConfigurationCreateVolumeDetails(object): + """ + Creates a new block volume. Please see :class:`CreateVolumeDetails` + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationCreateVolumeDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param availability_domain: + The value to assign to the availability_domain property of this InstanceConfigurationCreateVolumeDetails. + :type availability_domain: str + + :param backup_policy_id: + The value to assign to the backup_policy_id property of this InstanceConfigurationCreateVolumeDetails. + :type backup_policy_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this InstanceConfigurationCreateVolumeDetails. + :type compartment_id: str + + :param defined_tags: + The value to assign to the defined_tags property of this InstanceConfigurationCreateVolumeDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this InstanceConfigurationCreateVolumeDetails. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this InstanceConfigurationCreateVolumeDetails. + :type freeform_tags: dict(str, str) + + :param size_in_gbs: + The value to assign to the size_in_gbs property of this InstanceConfigurationCreateVolumeDetails. + :type size_in_gbs: int + + :param source_details: + The value to assign to the source_details property of this InstanceConfigurationCreateVolumeDetails. + :type source_details: InstanceConfigurationVolumeSourceDetails + + """ + self.swagger_types = { + 'availability_domain': 'str', + 'backup_policy_id': 'str', + 'compartment_id': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)', + 'size_in_gbs': 'int', + 'source_details': 'InstanceConfigurationVolumeSourceDetails' + } + + self.attribute_map = { + 'availability_domain': 'availabilityDomain', + 'backup_policy_id': 'backupPolicyId', + 'compartment_id': 'compartmentId', + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags', + 'size_in_gbs': 'sizeInGBs', + 'source_details': 'sourceDetails' + } + + self._availability_domain = None + self._backup_policy_id = None + self._compartment_id = None + self._defined_tags = None + self._display_name = None + self._freeform_tags = None + self._size_in_gbs = None + self._source_details = None + + @property + def availability_domain(self): + """ + Gets the availability_domain of this InstanceConfigurationCreateVolumeDetails. + The availability domain of the volume. + + Example: `Uocm:PHX-AD-1` + + + :return: The availability_domain of this InstanceConfigurationCreateVolumeDetails. + :rtype: str + """ + return self._availability_domain + + @availability_domain.setter + def availability_domain(self, availability_domain): + """ + Sets the availability_domain of this InstanceConfigurationCreateVolumeDetails. + The availability domain of the volume. + + Example: `Uocm:PHX-AD-1` + + + :param availability_domain: The availability_domain of this InstanceConfigurationCreateVolumeDetails. + :type: str + """ + self._availability_domain = availability_domain + + @property + def backup_policy_id(self): + """ + Gets the backup_policy_id of this InstanceConfigurationCreateVolumeDetails. + If provided, specifies the ID of the volume backup policy to assign to the newly + created volume. If omitted, no policy will be assigned. + + + :return: The backup_policy_id of this InstanceConfigurationCreateVolumeDetails. + :rtype: str + """ + return self._backup_policy_id + + @backup_policy_id.setter + def backup_policy_id(self, backup_policy_id): + """ + Sets the backup_policy_id of this InstanceConfigurationCreateVolumeDetails. + If provided, specifies the ID of the volume backup policy to assign to the newly + created volume. If omitted, no policy will be assigned. + + + :param backup_policy_id: The backup_policy_id of this InstanceConfigurationCreateVolumeDetails. + :type: str + """ + self._backup_policy_id = backup_policy_id + + @property + def compartment_id(self): + """ + Gets the compartment_id of this InstanceConfigurationCreateVolumeDetails. + The OCID of the compartment that contains the volume. + + + :return: The compartment_id of this InstanceConfigurationCreateVolumeDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this InstanceConfigurationCreateVolumeDetails. + The OCID of the compartment that contains the volume. + + + :param compartment_id: The compartment_id of this InstanceConfigurationCreateVolumeDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def defined_tags(self): + """ + Gets the defined_tags of this InstanceConfigurationCreateVolumeDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this InstanceConfigurationCreateVolumeDetails. + :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 InstanceConfigurationCreateVolumeDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this InstanceConfigurationCreateVolumeDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this InstanceConfigurationCreateVolumeDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :return: The display_name of this InstanceConfigurationCreateVolumeDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this InstanceConfigurationCreateVolumeDetails. + 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 InstanceConfigurationCreateVolumeDetails. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this InstanceConfigurationCreateVolumeDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this InstanceConfigurationCreateVolumeDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this InstanceConfigurationCreateVolumeDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this InstanceConfigurationCreateVolumeDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def size_in_gbs(self): + """ + Gets the size_in_gbs of this InstanceConfigurationCreateVolumeDetails. + The size of the volume in GBs. + + + :return: The size_in_gbs of this InstanceConfigurationCreateVolumeDetails. + :rtype: int + """ + return self._size_in_gbs + + @size_in_gbs.setter + def size_in_gbs(self, size_in_gbs): + """ + Sets the size_in_gbs of this InstanceConfigurationCreateVolumeDetails. + The size of the volume in GBs. + + + :param size_in_gbs: The size_in_gbs of this InstanceConfigurationCreateVolumeDetails. + :type: int + """ + self._size_in_gbs = size_in_gbs + + @property + def source_details(self): + """ + Gets the source_details of this InstanceConfigurationCreateVolumeDetails. + Specifies the volume source details for a new Block volume. The volume source is either another Block volume in the same availability domain or a Block volume backup. + This is an optional field. If not specified or set to null, the new Block volume will be empty. + When specified, the new Block volume will contain data from the source volume or backup. + + + :return: The source_details of this InstanceConfigurationCreateVolumeDetails. + :rtype: InstanceConfigurationVolumeSourceDetails + """ + return self._source_details + + @source_details.setter + def source_details(self, source_details): + """ + Sets the source_details of this InstanceConfigurationCreateVolumeDetails. + Specifies the volume source details for a new Block volume. The volume source is either another Block volume in the same availability domain or a Block volume backup. + This is an optional field. If not specified or set to null, the new Block volume will be empty. + When specified, the new Block volume will contain data from the source volume or backup. + + + :param source_details: The source_details of this InstanceConfigurationCreateVolumeDetails. + :type: InstanceConfigurationVolumeSourceDetails + """ + self._source_details = source_details + + 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/instance_configuration_instance_details.py b/src/oci/core/models/instance_configuration_instance_details.py new file mode 100644 index 0000000000..3e9c2b3094 --- /dev/null +++ b/src/oci/core/models/instance_configuration_instance_details.py @@ -0,0 +1,86 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstanceConfigurationInstanceDetails(object): + """ + InstanceConfigurationInstanceDetails model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationInstanceDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.core.models.ComputeInstanceDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param instance_type: + The value to assign to the instance_type property of this InstanceConfigurationInstanceDetails. + :type instance_type: str + + """ + self.swagger_types = { + 'instance_type': 'str' + } + + self.attribute_map = { + 'instance_type': 'instanceType' + } + + self._instance_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['instanceType'] + + if type == 'compute': + return 'ComputeInstanceDetails' + else: + return 'InstanceConfigurationInstanceDetails' + + @property + def instance_type(self): + """ + **[Required]** Gets the instance_type of this InstanceConfigurationInstanceDetails. + The type of instance details. Supported instanceType is compute + + + :return: The instance_type of this InstanceConfigurationInstanceDetails. + :rtype: str + """ + return self._instance_type + + @instance_type.setter + def instance_type(self, instance_type): + """ + Sets the instance_type of this InstanceConfigurationInstanceDetails. + The type of instance details. Supported instanceType is compute + + + :param instance_type: The instance_type of this InstanceConfigurationInstanceDetails. + :type: str + """ + self._instance_type = instance_type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/instance_configuration_instance_source_details.py b/src/oci/core/models/instance_configuration_instance_source_details.py new file mode 100644 index 0000000000..662d9498ed --- /dev/null +++ b/src/oci/core/models/instance_configuration_instance_source_details.py @@ -0,0 +1,94 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstanceConfigurationInstanceSourceDetails(object): + """ + InstanceConfigurationInstanceSourceDetails model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationInstanceSourceDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.core.models.InstanceConfigurationInstanceSourceViaImageDetails` + * :class:`~oci.core.models.InstanceConfigurationInstanceSourceViaBootVolumeDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source_type: + The value to assign to the source_type property of this InstanceConfigurationInstanceSourceDetails. + :type source_type: str + + """ + self.swagger_types = { + 'source_type': 'str' + } + + self.attribute_map = { + 'source_type': 'sourceType' + } + + self._source_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['sourceType'] + + if type == 'image': + return 'InstanceConfigurationInstanceSourceViaImageDetails' + + if type == 'bootVolume': + return 'InstanceConfigurationInstanceSourceViaBootVolumeDetails' + else: + return 'InstanceConfigurationInstanceSourceDetails' + + @property + def source_type(self): + """ + **[Required]** Gets the source_type of this InstanceConfigurationInstanceSourceDetails. + The source type for the instance. + Use `image` when specifying the image OCID. Use `bootVolume` when specifying + the boot volume OCID. + + + :return: The source_type of this InstanceConfigurationInstanceSourceDetails. + :rtype: str + """ + return self._source_type + + @source_type.setter + def source_type(self, source_type): + """ + Sets the source_type of this InstanceConfigurationInstanceSourceDetails. + The source type for the instance. + Use `image` when specifying the image OCID. Use `bootVolume` when specifying + the boot volume OCID. + + + :param source_type: The source_type of this InstanceConfigurationInstanceSourceDetails. + :type: str + """ + self._source_type = source_type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/instance_configuration_instance_source_via_boot_volume_details.py b/src/oci/core/models/instance_configuration_instance_source_via_boot_volume_details.py new file mode 100644 index 0000000000..b874d3f180 --- /dev/null +++ b/src/oci/core/models/instance_configuration_instance_source_via_boot_volume_details.py @@ -0,0 +1,78 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +from .instance_configuration_instance_source_details import InstanceConfigurationInstanceSourceDetails +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 InstanceConfigurationInstanceSourceViaBootVolumeDetails(InstanceConfigurationInstanceSourceDetails): + """ + InstanceConfigurationInstanceSourceViaBootVolumeDetails model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationInstanceSourceViaBootVolumeDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.core.models.InstanceConfigurationInstanceSourceViaBootVolumeDetails.source_type` attribute + of this class is ``bootVolume`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source_type: + The value to assign to the source_type property of this InstanceConfigurationInstanceSourceViaBootVolumeDetails. + :type source_type: str + + :param boot_volume_id: + The value to assign to the boot_volume_id property of this InstanceConfigurationInstanceSourceViaBootVolumeDetails. + :type boot_volume_id: str + + """ + self.swagger_types = { + 'source_type': 'str', + 'boot_volume_id': 'str' + } + + self.attribute_map = { + 'source_type': 'sourceType', + 'boot_volume_id': 'bootVolumeId' + } + + self._source_type = None + self._boot_volume_id = None + self._source_type = 'bootVolume' + + @property + def boot_volume_id(self): + """ + Gets the boot_volume_id of this InstanceConfigurationInstanceSourceViaBootVolumeDetails. + The OCID of the boot volume used to boot the instance. + + + :return: The boot_volume_id of this InstanceConfigurationInstanceSourceViaBootVolumeDetails. + :rtype: str + """ + return self._boot_volume_id + + @boot_volume_id.setter + def boot_volume_id(self, boot_volume_id): + """ + Sets the boot_volume_id of this InstanceConfigurationInstanceSourceViaBootVolumeDetails. + The OCID of the boot volume used to boot the instance. + + + :param boot_volume_id: The boot_volume_id of this InstanceConfigurationInstanceSourceViaBootVolumeDetails. + :type: str + """ + self._boot_volume_id = boot_volume_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/instance_configuration_instance_source_via_image_details.py b/src/oci/core/models/instance_configuration_instance_source_via_image_details.py new file mode 100644 index 0000000000..9cd522741d --- /dev/null +++ b/src/oci/core/models/instance_configuration_instance_source_via_image_details.py @@ -0,0 +1,78 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +from .instance_configuration_instance_source_details import InstanceConfigurationInstanceSourceDetails +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 InstanceConfigurationInstanceSourceViaImageDetails(InstanceConfigurationInstanceSourceDetails): + """ + InstanceConfigurationInstanceSourceViaImageDetails model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationInstanceSourceViaImageDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.core.models.InstanceConfigurationInstanceSourceViaImageDetails.source_type` attribute + of this class is ``image`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source_type: + The value to assign to the source_type property of this InstanceConfigurationInstanceSourceViaImageDetails. + :type source_type: str + + :param image_id: + The value to assign to the image_id property of this InstanceConfigurationInstanceSourceViaImageDetails. + :type image_id: str + + """ + self.swagger_types = { + 'source_type': 'str', + 'image_id': 'str' + } + + self.attribute_map = { + 'source_type': 'sourceType', + 'image_id': 'imageId' + } + + self._source_type = None + self._image_id = None + self._source_type = 'image' + + @property + def image_id(self): + """ + Gets the image_id of this InstanceConfigurationInstanceSourceViaImageDetails. + The OCID of the image used to boot the instance. + + + :return: The image_id of this InstanceConfigurationInstanceSourceViaImageDetails. + :rtype: str + """ + return self._image_id + + @image_id.setter + def image_id(self, image_id): + """ + Sets the image_id of this InstanceConfigurationInstanceSourceViaImageDetails. + The OCID of the image used to boot the instance. + + + :param image_id: The image_id of this InstanceConfigurationInstanceSourceViaImageDetails. + :type: str + """ + self._image_id = image_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/instance_configuration_iscsi_attach_volume_details.py b/src/oci/core/models/instance_configuration_iscsi_attach_volume_details.py new file mode 100644 index 0000000000..07a16bc7b8 --- /dev/null +++ b/src/oci/core/models/instance_configuration_iscsi_attach_volume_details.py @@ -0,0 +1,92 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +from .instance_configuration_attach_volume_details import InstanceConfigurationAttachVolumeDetails +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 InstanceConfigurationIscsiAttachVolumeDetails(InstanceConfigurationAttachVolumeDetails): + """ + InstanceConfigurationIscsiAttachVolumeDetails model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationIscsiAttachVolumeDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.core.models.InstanceConfigurationIscsiAttachVolumeDetails.type` attribute + of this class is ``iscsi`` and it should not be changed. + 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 InstanceConfigurationIscsiAttachVolumeDetails. + :type display_name: str + + :param is_read_only: + The value to assign to the is_read_only property of this InstanceConfigurationIscsiAttachVolumeDetails. + :type is_read_only: bool + + :param type: + The value to assign to the type property of this InstanceConfigurationIscsiAttachVolumeDetails. + :type type: str + + :param use_chap: + The value to assign to the use_chap property of this InstanceConfigurationIscsiAttachVolumeDetails. + :type use_chap: bool + + """ + self.swagger_types = { + 'display_name': 'str', + 'is_read_only': 'bool', + 'type': 'str', + 'use_chap': 'bool' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'is_read_only': 'isReadOnly', + 'type': 'type', + 'use_chap': 'useChap' + } + + self._display_name = None + self._is_read_only = None + self._type = None + self._use_chap = None + self._type = 'iscsi' + + @property + def use_chap(self): + """ + Gets the use_chap of this InstanceConfigurationIscsiAttachVolumeDetails. + Whether to use CHAP authentication for the volume attachment. Defaults to false. + + + :return: The use_chap of this InstanceConfigurationIscsiAttachVolumeDetails. + :rtype: bool + """ + return self._use_chap + + @use_chap.setter + def use_chap(self, use_chap): + """ + Sets the use_chap of this InstanceConfigurationIscsiAttachVolumeDetails. + Whether to use CHAP authentication for the volume attachment. Defaults to false. + + + :param use_chap: The use_chap of this InstanceConfigurationIscsiAttachVolumeDetails. + :type: bool + """ + self._use_chap = use_chap + + 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/instance_configuration_launch_instance_details.py b/src/oci/core/models/instance_configuration_launch_instance_details.py new file mode 100644 index 0000000000..9f0283f654 --- /dev/null +++ b/src/oci/core/models/instance_configuration_launch_instance_details.py @@ -0,0 +1,595 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstanceConfigurationLaunchInstanceDetails(object): + """ + See Instance launch details - :class:`LaunchInstanceDetails` + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationLaunchInstanceDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param availability_domain: + The value to assign to the availability_domain property of this InstanceConfigurationLaunchInstanceDetails. + :type availability_domain: str + + :param compartment_id: + The value to assign to the compartment_id property of this InstanceConfigurationLaunchInstanceDetails. + :type compartment_id: str + + :param create_vnic_details: + The value to assign to the create_vnic_details property of this InstanceConfigurationLaunchInstanceDetails. + :type create_vnic_details: InstanceConfigurationCreateVnicDetails + + :param defined_tags: + The value to assign to the defined_tags property of this InstanceConfigurationLaunchInstanceDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this InstanceConfigurationLaunchInstanceDetails. + :type display_name: str + + :param extended_metadata: + The value to assign to the extended_metadata property of this InstanceConfigurationLaunchInstanceDetails. + :type extended_metadata: dict(str, object) + + :param freeform_tags: + The value to assign to the freeform_tags property of this InstanceConfigurationLaunchInstanceDetails. + :type freeform_tags: dict(str, str) + + :param ipxe_script: + The value to assign to the ipxe_script property of this InstanceConfigurationLaunchInstanceDetails. + :type ipxe_script: str + + :param metadata: + The value to assign to the metadata property of this InstanceConfigurationLaunchInstanceDetails. + :type metadata: dict(str, str) + + :param shape: + The value to assign to the shape property of this InstanceConfigurationLaunchInstanceDetails. + :type shape: str + + :param source_details: + The value to assign to the source_details property of this InstanceConfigurationLaunchInstanceDetails. + :type source_details: InstanceConfigurationInstanceSourceDetails + + """ + self.swagger_types = { + 'availability_domain': 'str', + 'compartment_id': 'str', + 'create_vnic_details': 'InstanceConfigurationCreateVnicDetails', + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'extended_metadata': 'dict(str, object)', + 'freeform_tags': 'dict(str, str)', + 'ipxe_script': 'str', + 'metadata': 'dict(str, str)', + 'shape': 'str', + 'source_details': 'InstanceConfigurationInstanceSourceDetails' + } + + self.attribute_map = { + 'availability_domain': 'availabilityDomain', + 'compartment_id': 'compartmentId', + 'create_vnic_details': 'createVnicDetails', + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'extended_metadata': 'extendedMetadata', + 'freeform_tags': 'freeformTags', + 'ipxe_script': 'ipxeScript', + 'metadata': 'metadata', + 'shape': 'shape', + 'source_details': 'sourceDetails' + } + + self._availability_domain = None + self._compartment_id = None + self._create_vnic_details = None + self._defined_tags = None + self._display_name = None + self._extended_metadata = None + self._freeform_tags = None + self._ipxe_script = None + self._metadata = None + self._shape = None + self._source_details = None + + @property + def availability_domain(self): + """ + Gets the availability_domain of this InstanceConfigurationLaunchInstanceDetails. + The availability domain of the instance. + + Example: `Uocm:PHX-AD-1` + + + :return: The availability_domain of this InstanceConfigurationLaunchInstanceDetails. + :rtype: str + """ + return self._availability_domain + + @availability_domain.setter + def availability_domain(self, availability_domain): + """ + Sets the availability_domain of this InstanceConfigurationLaunchInstanceDetails. + The availability domain of the instance. + + Example: `Uocm:PHX-AD-1` + + + :param availability_domain: The availability_domain of this InstanceConfigurationLaunchInstanceDetails. + :type: str + """ + self._availability_domain = availability_domain + + @property + def compartment_id(self): + """ + Gets the compartment_id of this InstanceConfigurationLaunchInstanceDetails. + The OCID of the compartment. + + + :return: The compartment_id of this InstanceConfigurationLaunchInstanceDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this InstanceConfigurationLaunchInstanceDetails. + The OCID of the compartment. + + + :param compartment_id: The compartment_id of this InstanceConfigurationLaunchInstanceDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def create_vnic_details(self): + """ + Gets the create_vnic_details of this InstanceConfigurationLaunchInstanceDetails. + Details for the primary VNIC, which is automatically created and attached when + the instance is launched. + + + :return: The create_vnic_details of this InstanceConfigurationLaunchInstanceDetails. + :rtype: InstanceConfigurationCreateVnicDetails + """ + return self._create_vnic_details + + @create_vnic_details.setter + def create_vnic_details(self, create_vnic_details): + """ + Sets the create_vnic_details of this InstanceConfigurationLaunchInstanceDetails. + Details for the primary VNIC, which is automatically created and attached when + the instance is launched. + + + :param create_vnic_details: The create_vnic_details of this InstanceConfigurationLaunchInstanceDetails. + :type: InstanceConfigurationCreateVnicDetails + """ + self._create_vnic_details = create_vnic_details + + @property + def defined_tags(self): + """ + Gets the defined_tags of this InstanceConfigurationLaunchInstanceDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this InstanceConfigurationLaunchInstanceDetails. + :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 InstanceConfigurationLaunchInstanceDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this InstanceConfigurationLaunchInstanceDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this InstanceConfigurationLaunchInstanceDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Example: `My bare metal instance` + + + :return: The display_name of this InstanceConfigurationLaunchInstanceDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this InstanceConfigurationLaunchInstanceDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Example: `My bare metal instance` + + + :param display_name: The display_name of this InstanceConfigurationLaunchInstanceDetails. + :type: str + """ + self._display_name = display_name + + @property + def extended_metadata(self): + """ + Gets the extended_metadata of this InstanceConfigurationLaunchInstanceDetails. + Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the 'metadata' object. + + They are distinguished from 'metadata' fields in that these can be nested JSON objects (whereas 'metadata' fields are string/string maps only). + + + :return: The extended_metadata of this InstanceConfigurationLaunchInstanceDetails. + :rtype: dict(str, object) + """ + return self._extended_metadata + + @extended_metadata.setter + def extended_metadata(self, extended_metadata): + """ + Sets the extended_metadata of this InstanceConfigurationLaunchInstanceDetails. + Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the 'metadata' object. + + They are distinguished from 'metadata' fields in that these can be nested JSON objects (whereas 'metadata' fields are string/string maps only). + + + :param extended_metadata: The extended_metadata of this InstanceConfigurationLaunchInstanceDetails. + :type: dict(str, object) + """ + self._extended_metadata = extended_metadata + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this InstanceConfigurationLaunchInstanceDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this InstanceConfigurationLaunchInstanceDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this InstanceConfigurationLaunchInstanceDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this InstanceConfigurationLaunchInstanceDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def ipxe_script(self): + """ + Gets the ipxe_script of this InstanceConfigurationLaunchInstanceDetails. + This is an advanced option. + + When a bare metal or virtual machine + instance boots, the iPXE firmware that runs on the instance is + configured to run an iPXE script to continue the boot process. + + If you want more control over the boot process, you can provide + your own custom iPXE script that will run when the instance boots; + however, you should be aware that the same iPXE script will run + every time an instance boots; not only after the initial + LaunchInstance call. + + The default iPXE script connects to the instance's local boot + volume over iSCSI and performs a network boot. If you use a custom iPXE + script and want to network-boot from the instance's local boot volume + over iSCSI the same way as the default iPXE script, you should use the + following iSCSI IP address: 169.254.0.2, and boot volume IQN: + iqn.2015-02.oracle.boot. + + For more information about the Bring Your Own Image feature of + Oracle Cloud Infrastructure, see + `Bring Your Own Image`__. + + For more information about iPXE, see http://ipxe.org. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/bringyourownimage.htm + + + :return: The ipxe_script of this InstanceConfigurationLaunchInstanceDetails. + :rtype: str + """ + return self._ipxe_script + + @ipxe_script.setter + def ipxe_script(self, ipxe_script): + """ + Sets the ipxe_script of this InstanceConfigurationLaunchInstanceDetails. + This is an advanced option. + + When a bare metal or virtual machine + instance boots, the iPXE firmware that runs on the instance is + configured to run an iPXE script to continue the boot process. + + If you want more control over the boot process, you can provide + your own custom iPXE script that will run when the instance boots; + however, you should be aware that the same iPXE script will run + every time an instance boots; not only after the initial + LaunchInstance call. + + The default iPXE script connects to the instance's local boot + volume over iSCSI and performs a network boot. If you use a custom iPXE + script and want to network-boot from the instance's local boot volume + over iSCSI the same way as the default iPXE script, you should use the + following iSCSI IP address: 169.254.0.2, and boot volume IQN: + iqn.2015-02.oracle.boot. + + For more information about the Bring Your Own Image feature of + Oracle Cloud Infrastructure, see + `Bring Your Own Image`__. + + For more information about iPXE, see http://ipxe.org. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/bringyourownimage.htm + + + :param ipxe_script: The ipxe_script of this InstanceConfigurationLaunchInstanceDetails. + :type: str + """ + self._ipxe_script = ipxe_script + + @property + def metadata(self): + """ + Gets the metadata of this InstanceConfigurationLaunchInstanceDetails. + Custom metadata key/value pairs that you provide, such as the SSH public key + required to connect to the instance. + + A metadata service runs on every launched instance. The service is an HTTP + endpoint listening on 169.254.169.254. You can use the service to: + + * Provide information to `Cloud-Init`__ + to be used for various system initialization tasks. + + * Get information about the instance, including the custom metadata that you + provide when you launch the instance. + + **Providing Cloud-Init Metadata** + + You can use the following metadata key names to provide information to + Cloud-Init: + + **\"ssh_authorized_keys\"** - Provide one or more public SSH keys to be + included in the `~/.ssh/authorized_keys` file for the default user on the + instance. Use a newline character to separate multiple keys. The SSH + keys must be in the format necessary for the `authorized_keys` file, as shown + in the example below. + + **\"user_data\"** - Provide your own base64-encoded data to be used by + Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. For + information about how to take advantage of user data, see the + `Cloud-Init Documentation`__. + + **Note:** Cloud-Init does not pull this data from the `http://169.254.169.254/opc/v1/instance/metadata/` + path. When the instance launches and either of these keys are provided, the key values are formatted as + OpenStack metadata and copied to the following locations, which are recognized by Cloud-Init: + + `http://169.254.169.254/openstack/latest/meta_data.json` - This JSON blob + contains, among other things, the SSH keys that you provided for + **\"ssh_authorized_keys\"**. + + `http://169.254.169.254/openstack/latest/user_data` - Contains the + base64-decoded data that you provided for **\"user_data\"**. + + **Metadata Example** + + \"metadata\" : { + \"quake_bot_level\" : \"Severe\", + \"ssh_authorized_keys\" : \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCZ06fccNTQfq+xubFlJ5ZR3kt+uzspdH9tXL+lAejSM1NXM+CFZev7MIxfEjas06y80ZBZ7DUTQO0GxJPeD8NCOb1VorF8M4xuLwrmzRtkoZzU16umt4y1W0Q4ifdp3IiiU0U8/WxczSXcUVZOLqkz5dc6oMHdMVpkimietWzGZ4LBBsH/LjEVY7E0V+a0sNchlVDIZcm7ErReBLcdTGDq0uLBiuChyl6RUkX1PNhusquTGwK7zc8OBXkRuubn5UKXhI3Ul9Nyk4XESkVWIGNKmw8mSpoJSjR8P9ZjRmcZVo8S+x4KVPMZKQEor== ryan.smith@company.com + ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAzJSAtwEPoB3Jmr58IXrDGzLuDYkWAYg8AsLYlo6JZvKpjY1xednIcfEVQJm4T2DhVmdWhRrwQ8DmayVZvBkLt+zs2LdoAJEVimKwXcJFD/7wtH8Lnk17HiglbbbNXsemjDY0hea4JUE5CfvkIdZBITuMrfqSmA4n3VNoorXYdvtTMoGG8fxMub46RPtuxtqi9bG9Zqenordkg5FJt2mVNfQRqf83CWojcOkklUWq4CjyxaeLf5i9gv1fRoBo4QhiA8I6NCSppO8GnoV/6Ox6TNoh9BiifqGKC9VGYuC89RvUajRBTZSK2TK4DPfaT+2R+slPsFrwiT/oPEhhEK1S5Q== rsa-key-20160227\", + \"user_data\" : \"SWYgeW91IGNhbiBzZWUgdGhpcywgdGhlbiBpdCB3b3JrZWQgbWF5YmUuCg==\" + } + **Getting Metadata on the Instance** + + To get information about your instance, connect to the instance using SSH and issue any of the + following GET requests: + + curl http://169.254.169.254/opc/v1/instance/ + curl http://169.254.169.254/opc/v1/instance/metadata/ + curl http://169.254.169.254/opc/v1/instance/metadata/ + + You'll get back a response that includes all the instance information; only the metadata information; or + the metadata information for the specified key name, respectively. + + __ https://cloudinit.readthedocs.org/en/latest/ + __ http://cloudinit.readthedocs.org/en/latest/topics/format.html + + + :return: The metadata of this InstanceConfigurationLaunchInstanceDetails. + :rtype: dict(str, str) + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """ + Sets the metadata of this InstanceConfigurationLaunchInstanceDetails. + Custom metadata key/value pairs that you provide, such as the SSH public key + required to connect to the instance. + + A metadata service runs on every launched instance. The service is an HTTP + endpoint listening on 169.254.169.254. You can use the service to: + + * Provide information to `Cloud-Init`__ + to be used for various system initialization tasks. + + * Get information about the instance, including the custom metadata that you + provide when you launch the instance. + + **Providing Cloud-Init Metadata** + + You can use the following metadata key names to provide information to + Cloud-Init: + + **\"ssh_authorized_keys\"** - Provide one or more public SSH keys to be + included in the `~/.ssh/authorized_keys` file for the default user on the + instance. Use a newline character to separate multiple keys. The SSH + keys must be in the format necessary for the `authorized_keys` file, as shown + in the example below. + + **\"user_data\"** - Provide your own base64-encoded data to be used by + Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. For + information about how to take advantage of user data, see the + `Cloud-Init Documentation`__. + + **Note:** Cloud-Init does not pull this data from the `http://169.254.169.254/opc/v1/instance/metadata/` + path. When the instance launches and either of these keys are provided, the key values are formatted as + OpenStack metadata and copied to the following locations, which are recognized by Cloud-Init: + + `http://169.254.169.254/openstack/latest/meta_data.json` - This JSON blob + contains, among other things, the SSH keys that you provided for + **\"ssh_authorized_keys\"**. + + `http://169.254.169.254/openstack/latest/user_data` - Contains the + base64-decoded data that you provided for **\"user_data\"**. + + **Metadata Example** + + \"metadata\" : { + \"quake_bot_level\" : \"Severe\", + \"ssh_authorized_keys\" : \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCZ06fccNTQfq+xubFlJ5ZR3kt+uzspdH9tXL+lAejSM1NXM+CFZev7MIxfEjas06y80ZBZ7DUTQO0GxJPeD8NCOb1VorF8M4xuLwrmzRtkoZzU16umt4y1W0Q4ifdp3IiiU0U8/WxczSXcUVZOLqkz5dc6oMHdMVpkimietWzGZ4LBBsH/LjEVY7E0V+a0sNchlVDIZcm7ErReBLcdTGDq0uLBiuChyl6RUkX1PNhusquTGwK7zc8OBXkRuubn5UKXhI3Ul9Nyk4XESkVWIGNKmw8mSpoJSjR8P9ZjRmcZVo8S+x4KVPMZKQEor== ryan.smith@company.com + ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAzJSAtwEPoB3Jmr58IXrDGzLuDYkWAYg8AsLYlo6JZvKpjY1xednIcfEVQJm4T2DhVmdWhRrwQ8DmayVZvBkLt+zs2LdoAJEVimKwXcJFD/7wtH8Lnk17HiglbbbNXsemjDY0hea4JUE5CfvkIdZBITuMrfqSmA4n3VNoorXYdvtTMoGG8fxMub46RPtuxtqi9bG9Zqenordkg5FJt2mVNfQRqf83CWojcOkklUWq4CjyxaeLf5i9gv1fRoBo4QhiA8I6NCSppO8GnoV/6Ox6TNoh9BiifqGKC9VGYuC89RvUajRBTZSK2TK4DPfaT+2R+slPsFrwiT/oPEhhEK1S5Q== rsa-key-20160227\", + \"user_data\" : \"SWYgeW91IGNhbiBzZWUgdGhpcywgdGhlbiBpdCB3b3JrZWQgbWF5YmUuCg==\" + } + **Getting Metadata on the Instance** + + To get information about your instance, connect to the instance using SSH and issue any of the + following GET requests: + + curl http://169.254.169.254/opc/v1/instance/ + curl http://169.254.169.254/opc/v1/instance/metadata/ + curl http://169.254.169.254/opc/v1/instance/metadata/ + + You'll get back a response that includes all the instance information; only the metadata information; or + the metadata information for the specified key name, respectively. + + __ https://cloudinit.readthedocs.org/en/latest/ + __ http://cloudinit.readthedocs.org/en/latest/topics/format.html + + + :param metadata: The metadata of this InstanceConfigurationLaunchInstanceDetails. + :type: dict(str, str) + """ + self._metadata = metadata + + @property + def shape(self): + """ + Gets the shape of this InstanceConfigurationLaunchInstanceDetails. + The shape of an instance. The shape determines the number of CPUs, amount of memory, + and other resources allocated to the instance. + + You can enumerate all available shapes by calling :func:`list_shapes`. + + + :return: The shape of this InstanceConfigurationLaunchInstanceDetails. + :rtype: str + """ + return self._shape + + @shape.setter + def shape(self, shape): + """ + Sets the shape of this InstanceConfigurationLaunchInstanceDetails. + The shape of an instance. The shape determines the number of CPUs, amount of memory, + and other resources allocated to the instance. + + You can enumerate all available shapes by calling :func:`list_shapes`. + + + :param shape: The shape of this InstanceConfigurationLaunchInstanceDetails. + :type: str + """ + self._shape = shape + + @property + def source_details(self): + """ + Gets the source_details of this InstanceConfigurationLaunchInstanceDetails. + Details for creating an instance. + Use this parameter to specify whether a boot volume or an image should be used to launch a new instance. + + + :return: The source_details of this InstanceConfigurationLaunchInstanceDetails. + :rtype: InstanceConfigurationInstanceSourceDetails + """ + return self._source_details + + @source_details.setter + def source_details(self, source_details): + """ + Sets the source_details of this InstanceConfigurationLaunchInstanceDetails. + Details for creating an instance. + Use this parameter to specify whether a boot volume or an image should be used to launch a new instance. + + + :param source_details: The source_details of this InstanceConfigurationLaunchInstanceDetails. + :type: InstanceConfigurationInstanceSourceDetails + """ + self._source_details = source_details + + 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/instance_configuration_paravirtualized_attach_volume_details.py b/src/oci/core/models/instance_configuration_paravirtualized_attach_volume_details.py new file mode 100644 index 0000000000..77e97a8246 --- /dev/null +++ b/src/oci/core/models/instance_configuration_paravirtualized_attach_volume_details.py @@ -0,0 +1,61 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +from .instance_configuration_attach_volume_details import InstanceConfigurationAttachVolumeDetails +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 InstanceConfigurationParavirtualizedAttachVolumeDetails(InstanceConfigurationAttachVolumeDetails): + """ + InstanceConfigurationParavirtualizedAttachVolumeDetails model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationParavirtualizedAttachVolumeDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.core.models.InstanceConfigurationParavirtualizedAttachVolumeDetails.type` attribute + of this class is ``paravirtualized`` and it should not be changed. + 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 InstanceConfigurationParavirtualizedAttachVolumeDetails. + :type display_name: str + + :param is_read_only: + The value to assign to the is_read_only property of this InstanceConfigurationParavirtualizedAttachVolumeDetails. + :type is_read_only: bool + + :param type: + The value to assign to the type property of this InstanceConfigurationParavirtualizedAttachVolumeDetails. + :type type: str + + """ + self.swagger_types = { + 'display_name': 'str', + 'is_read_only': 'bool', + 'type': 'str' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'is_read_only': 'isReadOnly', + 'type': 'type' + } + + self._display_name = None + self._is_read_only = None + self._type = None + self._type = 'paravirtualized' + + 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/instance_configuration_summary.py b/src/oci/core/models/instance_configuration_summary.py new file mode 100644 index 0000000000..5faa43fca5 --- /dev/null +++ b/src/oci/core/models/instance_configuration_summary.py @@ -0,0 +1,164 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstanceConfigurationSummary(object): + """ + Instance Configuration Summary + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationSummary 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 InstanceConfigurationSummary. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this InstanceConfigurationSummary. + :type display_name: str + + :param id: + The value to assign to the id property of this InstanceConfigurationSummary. + :type id: str + + :param time_created: + The value to assign to the time_created property of this InstanceConfigurationSummary. + :type time_created: datetime + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'display_name': 'str', + 'id': 'str', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'id': 'id', + 'time_created': 'timeCreated' + } + + self._compartment_id = None + self._display_name = None + self._id = None + self._time_created = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this InstanceConfigurationSummary. + The OCID of the compartment containing the instance configuration. + + + :return: The compartment_id of this InstanceConfigurationSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this InstanceConfigurationSummary. + The OCID of the compartment containing the instance configuration. + + + :param compartment_id: The compartment_id of this InstanceConfigurationSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + Gets the display_name of this InstanceConfigurationSummary. + A user-friendly name for the instance configuration + + + :return: The display_name of this InstanceConfigurationSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this InstanceConfigurationSummary. + A user-friendly name for the instance configuration + + + :param display_name: The display_name of this InstanceConfigurationSummary. + :type: str + """ + self._display_name = display_name + + @property + def id(self): + """ + **[Required]** Gets the id of this InstanceConfigurationSummary. + The OCID of the instance configuration + + + :return: The id of this InstanceConfigurationSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this InstanceConfigurationSummary. + The OCID of the instance configuration + + + :param id: The id of this InstanceConfigurationSummary. + :type: str + """ + self._id = id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this InstanceConfigurationSummary. + The date and time the instance configuration was created, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_created of this InstanceConfigurationSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this InstanceConfigurationSummary. + The date and time the instance configuration was created, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :param time_created: The time_created of this InstanceConfigurationSummary. + :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/instance_configuration_volume_source_details.py b/src/oci/core/models/instance_configuration_volume_source_details.py new file mode 100644 index 0000000000..2a65ebc457 --- /dev/null +++ b/src/oci/core/models/instance_configuration_volume_source_details.py @@ -0,0 +1,86 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstanceConfigurationVolumeSourceDetails(object): + """ + InstanceConfigurationVolumeSourceDetails model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationVolumeSourceDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.core.models.InstanceConfigurationVolumeSourceFromVolumeBackupDetails` + * :class:`~oci.core.models.InstanceConfigurationVolumeSourceFromVolumeDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this InstanceConfigurationVolumeSourceDetails. + :type type: str + + """ + self.swagger_types = { + 'type': 'str' + } + + self.attribute_map = { + 'type': 'type' + } + + self._type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['type'] + + if type == 'volumeBackup': + return 'InstanceConfigurationVolumeSourceFromVolumeBackupDetails' + + if type == 'volume': + return 'InstanceConfigurationVolumeSourceFromVolumeDetails' + else: + return 'InstanceConfigurationVolumeSourceDetails' + + @property + def type(self): + """ + **[Required]** Gets the type of this InstanceConfigurationVolumeSourceDetails. + + :return: The type of this InstanceConfigurationVolumeSourceDetails. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this InstanceConfigurationVolumeSourceDetails. + + :param type: The type of this InstanceConfigurationVolumeSourceDetails. + :type: str + """ + self._type = type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/instance_configuration_volume_source_from_volume_backup_details.py b/src/oci/core/models/instance_configuration_volume_source_from_volume_backup_details.py new file mode 100644 index 0000000000..b599094979 --- /dev/null +++ b/src/oci/core/models/instance_configuration_volume_source_from_volume_backup_details.py @@ -0,0 +1,78 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +from .instance_configuration_volume_source_details import InstanceConfigurationVolumeSourceDetails +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 InstanceConfigurationVolumeSourceFromVolumeBackupDetails(InstanceConfigurationVolumeSourceDetails): + """ + Specifies the volume backup. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationVolumeSourceFromVolumeBackupDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.core.models.InstanceConfigurationVolumeSourceFromVolumeBackupDetails.type` attribute + of this class is ``volumeBackup`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this InstanceConfigurationVolumeSourceFromVolumeBackupDetails. + :type type: str + + :param id: + The value to assign to the id property of this InstanceConfigurationVolumeSourceFromVolumeBackupDetails. + :type id: str + + """ + self.swagger_types = { + 'type': 'str', + 'id': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'id': 'id' + } + + self._type = None + self._id = None + self._type = 'volumeBackup' + + @property + def id(self): + """ + Gets the id of this InstanceConfigurationVolumeSourceFromVolumeBackupDetails. + The OCID of the volume backup. + + + :return: The id of this InstanceConfigurationVolumeSourceFromVolumeBackupDetails. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this InstanceConfigurationVolumeSourceFromVolumeBackupDetails. + The OCID of the volume backup. + + + :param id: The id of this InstanceConfigurationVolumeSourceFromVolumeBackupDetails. + :type: str + """ + self._id = 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/instance_configuration_volume_source_from_volume_details.py b/src/oci/core/models/instance_configuration_volume_source_from_volume_details.py new file mode 100644 index 0000000000..9ee73b5390 --- /dev/null +++ b/src/oci/core/models/instance_configuration_volume_source_from_volume_details.py @@ -0,0 +1,78 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +from .instance_configuration_volume_source_details import InstanceConfigurationVolumeSourceDetails +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 InstanceConfigurationVolumeSourceFromVolumeDetails(InstanceConfigurationVolumeSourceDetails): + """ + Specifies the source volume. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceConfigurationVolumeSourceFromVolumeDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.core.models.InstanceConfigurationVolumeSourceFromVolumeDetails.type` attribute + of this class is ``volume`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this InstanceConfigurationVolumeSourceFromVolumeDetails. + :type type: str + + :param id: + The value to assign to the id property of this InstanceConfigurationVolumeSourceFromVolumeDetails. + :type id: str + + """ + self.swagger_types = { + 'type': 'str', + 'id': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'id': 'id' + } + + self._type = None + self._id = None + self._type = 'volume' + + @property + def id(self): + """ + Gets the id of this InstanceConfigurationVolumeSourceFromVolumeDetails. + The OCID of the volume. + + + :return: The id of this InstanceConfigurationVolumeSourceFromVolumeDetails. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this InstanceConfigurationVolumeSourceFromVolumeDetails. + The OCID of the volume. + + + :param id: The id of this InstanceConfigurationVolumeSourceFromVolumeDetails. + :type: str + """ + self._id = 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/instance_pool.py b/src/oci/core/models/instance_pool.py new file mode 100644 index 0000000000..4667fa5525 --- /dev/null +++ b/src/oci/core/models/instance_pool.py @@ -0,0 +1,412 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstancePool(object): + """ + Instance Pool + """ + + #: A constant which can be used with the lifecycle_state property of a InstancePool. + #: This constant has a value of "PROVISIONING" + LIFECYCLE_STATE_PROVISIONING = "PROVISIONING" + + #: A constant which can be used with the lifecycle_state property of a InstancePool. + #: This constant has a value of "SCALING" + LIFECYCLE_STATE_SCALING = "SCALING" + + #: A constant which can be used with the lifecycle_state property of a InstancePool. + #: This constant has a value of "STARTING" + LIFECYCLE_STATE_STARTING = "STARTING" + + #: A constant which can be used with the lifecycle_state property of a InstancePool. + #: This constant has a value of "STOPPING" + LIFECYCLE_STATE_STOPPING = "STOPPING" + + #: A constant which can be used with the lifecycle_state property of a InstancePool. + #: This constant has a value of "TERMINATING" + LIFECYCLE_STATE_TERMINATING = "TERMINATING" + + #: A constant which can be used with the lifecycle_state property of a InstancePool. + #: This constant has a value of "STOPPED" + LIFECYCLE_STATE_STOPPED = "STOPPED" + + #: A constant which can be used with the lifecycle_state property of a InstancePool. + #: This constant has a value of "TERMINATED" + LIFECYCLE_STATE_TERMINATED = "TERMINATED" + + #: A constant which can be used with the lifecycle_state property of a InstancePool. + #: This constant has a value of "RUNNING" + LIFECYCLE_STATE_RUNNING = "RUNNING" + + def __init__(self, **kwargs): + """ + Initializes a new InstancePool 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 InstancePool. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this InstancePool. + :type compartment_id: str + + :param defined_tags: + The value to assign to the defined_tags property of this InstancePool. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this InstancePool. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this InstancePool. + :type freeform_tags: dict(str, str) + + :param instance_configuration_id: + The value to assign to the instance_configuration_id property of this InstancePool. + :type instance_configuration_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this InstancePool. + Allowed values for this property are: "PROVISIONING", "SCALING", "STARTING", "STOPPING", "TERMINATING", "STOPPED", "TERMINATED", "RUNNING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param placement_configurations: + The value to assign to the placement_configurations property of this InstancePool. + :type placement_configurations: list[InstancePoolPlacementConfiguration] + + :param size: + The value to assign to the size property of this InstancePool. + :type size: int + + :param time_created: + The value to assign to the time_created property of this InstancePool. + :type time_created: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)', + 'instance_configuration_id': 'str', + 'lifecycle_state': 'str', + 'placement_configurations': 'list[InstancePoolPlacementConfiguration]', + 'size': 'int', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags', + 'instance_configuration_id': 'instanceConfigurationId', + 'lifecycle_state': 'lifecycleState', + 'placement_configurations': 'placementConfigurations', + 'size': 'size', + 'time_created': 'timeCreated' + } + + self._id = None + self._compartment_id = None + self._defined_tags = None + self._display_name = None + self._freeform_tags = None + self._instance_configuration_id = None + self._lifecycle_state = None + self._placement_configurations = None + self._size = None + self._time_created = None + + @property + def id(self): + """ + **[Required]** Gets the id of this InstancePool. + The OCID of the instance pool + + + :return: The id of this InstancePool. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this InstancePool. + The OCID of the instance pool + + + :param id: The id of this InstancePool. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this InstancePool. + The OCID of the compartment containing the instance pool + + + :return: The compartment_id of this InstancePool. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this InstancePool. + The OCID of the compartment containing the instance pool + + + :param compartment_id: The compartment_id of this InstancePool. + :type: str + """ + self._compartment_id = compartment_id + + @property + def defined_tags(self): + """ + Gets the defined_tags of this InstancePool. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this InstancePool. + :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 InstancePool. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this InstancePool. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this InstancePool. + The user-friendly name. Does not have to be unique. + + + :return: The display_name of this InstancePool. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this InstancePool. + The user-friendly name. Does not have to be unique. + + + :param display_name: The display_name of this InstancePool. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this InstancePool. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this InstancePool. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this InstancePool. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this InstancePool. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def instance_configuration_id(self): + """ + **[Required]** Gets the instance_configuration_id of this InstancePool. + The OCID of the instance configuration associated to the intance pool. + + + :return: The instance_configuration_id of this InstancePool. + :rtype: str + """ + return self._instance_configuration_id + + @instance_configuration_id.setter + def instance_configuration_id(self, instance_configuration_id): + """ + Sets the instance_configuration_id of this InstancePool. + The OCID of the instance configuration associated to the intance pool. + + + :param instance_configuration_id: The instance_configuration_id of this InstancePool. + :type: str + """ + self._instance_configuration_id = instance_configuration_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this InstancePool. + The current state of the instance pool. + + Allowed values for this property are: "PROVISIONING", "SCALING", "STARTING", "STOPPING", "TERMINATING", "STOPPED", "TERMINATED", "RUNNING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this InstancePool. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this InstancePool. + The current state of the instance pool. + + + :param lifecycle_state: The lifecycle_state of this InstancePool. + :type: str + """ + allowed_values = ["PROVISIONING", "SCALING", "STARTING", "STOPPING", "TERMINATING", "STOPPED", "TERMINATED", "RUNNING"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def placement_configurations(self): + """ + **[Required]** Gets the placement_configurations of this InstancePool. + The placement configurations for the instance pool. + + + :return: The placement_configurations of this InstancePool. + :rtype: list[InstancePoolPlacementConfiguration] + """ + return self._placement_configurations + + @placement_configurations.setter + def placement_configurations(self, placement_configurations): + """ + Sets the placement_configurations of this InstancePool. + The placement configurations for the instance pool. + + + :param placement_configurations: The placement_configurations of this InstancePool. + :type: list[InstancePoolPlacementConfiguration] + """ + self._placement_configurations = placement_configurations + + @property + def size(self): + """ + **[Required]** Gets the size of this InstancePool. + The number of instances that should be in the instance pool. + + + :return: The size of this InstancePool. + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """ + Sets the size of this InstancePool. + The number of instances that should be in the instance pool. + + + :param size: The size of this InstancePool. + :type: int + """ + self._size = size + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this InstancePool. + The date and time the instance pool was created, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_created of this InstancePool. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this InstancePool. + The date and time the instance pool was created, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :param time_created: The time_created of this InstancePool. + :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/instance_pool_placement_configuration.py b/src/oci/core/models/instance_pool_placement_configuration.py new file mode 100644 index 0000000000..9e95a1b1cf --- /dev/null +++ b/src/oci/core/models/instance_pool_placement_configuration.py @@ -0,0 +1,133 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstancePoolPlacementConfiguration(object): + """ + The location for where an instance pool will place instances. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstancePoolPlacementConfiguration object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param availability_domain: + The value to assign to the availability_domain property of this InstancePoolPlacementConfiguration. + :type availability_domain: str + + :param primary_subnet_id: + The value to assign to the primary_subnet_id property of this InstancePoolPlacementConfiguration. + :type primary_subnet_id: str + + :param secondary_vnic_subnets: + The value to assign to the secondary_vnic_subnets property of this InstancePoolPlacementConfiguration. + :type secondary_vnic_subnets: list[InstancePoolPlacementSecondaryVnicSubnet] + + """ + self.swagger_types = { + 'availability_domain': 'str', + 'primary_subnet_id': 'str', + 'secondary_vnic_subnets': 'list[InstancePoolPlacementSecondaryVnicSubnet]' + } + + self.attribute_map = { + 'availability_domain': 'availabilityDomain', + 'primary_subnet_id': 'primarySubnetId', + 'secondary_vnic_subnets': 'secondaryVnicSubnets' + } + + self._availability_domain = None + self._primary_subnet_id = None + self._secondary_vnic_subnets = None + + @property + def availability_domain(self): + """ + **[Required]** Gets the availability_domain of this InstancePoolPlacementConfiguration. + The availability domain to place instances. + Example: `Uocm:PHX-AD-1` + + + :return: The availability_domain of this InstancePoolPlacementConfiguration. + :rtype: str + """ + return self._availability_domain + + @availability_domain.setter + def availability_domain(self, availability_domain): + """ + Sets the availability_domain of this InstancePoolPlacementConfiguration. + The availability domain to place instances. + Example: `Uocm:PHX-AD-1` + + + :param availability_domain: The availability_domain of this InstancePoolPlacementConfiguration. + :type: str + """ + self._availability_domain = availability_domain + + @property + def primary_subnet_id(self): + """ + **[Required]** Gets the primary_subnet_id of this InstancePoolPlacementConfiguration. + The OCID of the primary subnet to place instances. + + + :return: The primary_subnet_id of this InstancePoolPlacementConfiguration. + :rtype: str + """ + return self._primary_subnet_id + + @primary_subnet_id.setter + def primary_subnet_id(self, primary_subnet_id): + """ + Sets the primary_subnet_id of this InstancePoolPlacementConfiguration. + The OCID of the primary subnet to place instances. + + + :param primary_subnet_id: The primary_subnet_id of this InstancePoolPlacementConfiguration. + :type: str + """ + self._primary_subnet_id = primary_subnet_id + + @property + def secondary_vnic_subnets(self): + """ + Gets the secondary_vnic_subnets of this InstancePoolPlacementConfiguration. + The set of secondary VNIC data for instances in the pool. + + + :return: The secondary_vnic_subnets of this InstancePoolPlacementConfiguration. + :rtype: list[InstancePoolPlacementSecondaryVnicSubnet] + """ + return self._secondary_vnic_subnets + + @secondary_vnic_subnets.setter + def secondary_vnic_subnets(self, secondary_vnic_subnets): + """ + Sets the secondary_vnic_subnets of this InstancePoolPlacementConfiguration. + The set of secondary VNIC data for instances in the pool. + + + :param secondary_vnic_subnets: The secondary_vnic_subnets of this InstancePoolPlacementConfiguration. + :type: list[InstancePoolPlacementSecondaryVnicSubnet] + """ + self._secondary_vnic_subnets = secondary_vnic_subnets + + 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/instance_pool_placement_secondary_vnic_subnet.py b/src/oci/core/models/instance_pool_placement_secondary_vnic_subnet.py new file mode 100644 index 0000000000..8fec490d6d --- /dev/null +++ b/src/oci/core/models/instance_pool_placement_secondary_vnic_subnet.py @@ -0,0 +1,102 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstancePoolPlacementSecondaryVnicSubnet(object): + """ + The secondary VNIC object for the placement configuration for an instance pool. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstancePoolPlacementSecondaryVnicSubnet 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 InstancePoolPlacementSecondaryVnicSubnet. + :type display_name: str + + :param subnet_id: + The value to assign to the subnet_id property of this InstancePoolPlacementSecondaryVnicSubnet. + :type subnet_id: str + + """ + self.swagger_types = { + 'display_name': 'str', + 'subnet_id': 'str' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'subnet_id': 'subnetId' + } + + self._display_name = None + self._subnet_id = None + + @property + def display_name(self): + """ + Gets the display_name of this InstancePoolPlacementSecondaryVnicSubnet. + The displayName of the vnic. This is also use to match against the Instance Configuration defined + secondary vnic. + + + :return: The display_name of this InstancePoolPlacementSecondaryVnicSubnet. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this InstancePoolPlacementSecondaryVnicSubnet. + The displayName of the vnic. This is also use to match against the Instance Configuration defined + secondary vnic. + + + :param display_name: The display_name of this InstancePoolPlacementSecondaryVnicSubnet. + :type: str + """ + self._display_name = display_name + + @property + def subnet_id(self): + """ + **[Required]** Gets the subnet_id of this InstancePoolPlacementSecondaryVnicSubnet. + The subnet OCID for the secondary vnic + + + :return: The subnet_id of this InstancePoolPlacementSecondaryVnicSubnet. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """ + Sets the subnet_id of this InstancePoolPlacementSecondaryVnicSubnet. + The subnet OCID for the secondary vnic + + + :param subnet_id: The subnet_id of this InstancePoolPlacementSecondaryVnicSubnet. + :type: str + """ + self._subnet_id = subnet_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/instance_pool_summary.py b/src/oci/core/models/instance_pool_summary.py new file mode 100644 index 0000000000..ffa988fce6 --- /dev/null +++ b/src/oci/core/models/instance_pool_summary.py @@ -0,0 +1,328 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstancePoolSummary(object): + """ + Condensed InstancePool data when listing instance pools. + """ + + #: A constant which can be used with the lifecycle_state property of a InstancePoolSummary. + #: This constant has a value of "PROVISIONING" + LIFECYCLE_STATE_PROVISIONING = "PROVISIONING" + + #: A constant which can be used with the lifecycle_state property of a InstancePoolSummary. + #: This constant has a value of "SCALING" + LIFECYCLE_STATE_SCALING = "SCALING" + + #: A constant which can be used with the lifecycle_state property of a InstancePoolSummary. + #: This constant has a value of "STARTING" + LIFECYCLE_STATE_STARTING = "STARTING" + + #: A constant which can be used with the lifecycle_state property of a InstancePoolSummary. + #: This constant has a value of "STOPPING" + LIFECYCLE_STATE_STOPPING = "STOPPING" + + #: A constant which can be used with the lifecycle_state property of a InstancePoolSummary. + #: This constant has a value of "TERMINATING" + LIFECYCLE_STATE_TERMINATING = "TERMINATING" + + #: A constant which can be used with the lifecycle_state property of a InstancePoolSummary. + #: This constant has a value of "STOPPED" + LIFECYCLE_STATE_STOPPED = "STOPPED" + + #: A constant which can be used with the lifecycle_state property of a InstancePoolSummary. + #: This constant has a value of "TERMINATED" + LIFECYCLE_STATE_TERMINATED = "TERMINATED" + + #: A constant which can be used with the lifecycle_state property of a InstancePoolSummary. + #: This constant has a value of "RUNNING" + LIFECYCLE_STATE_RUNNING = "RUNNING" + + def __init__(self, **kwargs): + """ + Initializes a new InstancePoolSummary 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 InstancePoolSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this InstancePoolSummary. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this InstancePoolSummary. + :type display_name: str + + :param instance_configuration_id: + The value to assign to the instance_configuration_id property of this InstancePoolSummary. + :type instance_configuration_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this InstancePoolSummary. + Allowed values for this property are: "PROVISIONING", "SCALING", "STARTING", "STOPPING", "TERMINATING", "STOPPED", "TERMINATED", "RUNNING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param availability_domains: + The value to assign to the availability_domains property of this InstancePoolSummary. + :type availability_domains: list[str] + + :param size: + The value to assign to the size property of this InstancePoolSummary. + :type size: int + + :param time_created: + The value to assign to the time_created property of this InstancePoolSummary. + :type time_created: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'instance_configuration_id': 'str', + 'lifecycle_state': 'str', + 'availability_domains': 'list[str]', + 'size': 'int', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'instance_configuration_id': 'instanceConfigurationId', + 'lifecycle_state': 'lifecycleState', + 'availability_domains': 'availabilityDomains', + 'size': 'size', + 'time_created': 'timeCreated' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._instance_configuration_id = None + self._lifecycle_state = None + self._availability_domains = None + self._size = None + self._time_created = None + + @property + def id(self): + """ + **[Required]** Gets the id of this InstancePoolSummary. + The OCID of the instance pool + + + :return: The id of this InstancePoolSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this InstancePoolSummary. + The OCID of the instance pool + + + :param id: The id of this InstancePoolSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this InstancePoolSummary. + The OCID of the compartment containing the instance pool + + + :return: The compartment_id of this InstancePoolSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this InstancePoolSummary. + The OCID of the compartment containing the instance pool + + + :param compartment_id: The compartment_id of this InstancePoolSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + Gets the display_name of this InstancePoolSummary. + The user-friendly name. Does not have to be unique. + + + :return: The display_name of this InstancePoolSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this InstancePoolSummary. + The user-friendly name. Does not have to be unique. + + + :param display_name: The display_name of this InstancePoolSummary. + :type: str + """ + self._display_name = display_name + + @property + def instance_configuration_id(self): + """ + **[Required]** Gets the instance_configuration_id of this InstancePoolSummary. + The OCID of the instance configuration associated to the intance pool. + + + :return: The instance_configuration_id of this InstancePoolSummary. + :rtype: str + """ + return self._instance_configuration_id + + @instance_configuration_id.setter + def instance_configuration_id(self, instance_configuration_id): + """ + Sets the instance_configuration_id of this InstancePoolSummary. + The OCID of the instance configuration associated to the intance pool. + + + :param instance_configuration_id: The instance_configuration_id of this InstancePoolSummary. + :type: str + """ + self._instance_configuration_id = instance_configuration_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this InstancePoolSummary. + The current state of the instance pool. + + Allowed values for this property are: "PROVISIONING", "SCALING", "STARTING", "STOPPING", "TERMINATING", "STOPPED", "TERMINATED", "RUNNING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this InstancePoolSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this InstancePoolSummary. + The current state of the instance pool. + + + :param lifecycle_state: The lifecycle_state of this InstancePoolSummary. + :type: str + """ + allowed_values = ["PROVISIONING", "SCALING", "STARTING", "STOPPING", "TERMINATING", "STOPPED", "TERMINATED", "RUNNING"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def availability_domains(self): + """ + **[Required]** Gets the availability_domains of this InstancePoolSummary. + The availability domains for the instance pool. + + + :return: The availability_domains of this InstancePoolSummary. + :rtype: list[str] + """ + return self._availability_domains + + @availability_domains.setter + def availability_domains(self, availability_domains): + """ + Sets the availability_domains of this InstancePoolSummary. + The availability domains for the instance pool. + + + :param availability_domains: The availability_domains of this InstancePoolSummary. + :type: list[str] + """ + self._availability_domains = availability_domains + + @property + def size(self): + """ + **[Required]** Gets the size of this InstancePoolSummary. + The number of instances that should be in the instance pool. + + + :return: The size of this InstancePoolSummary. + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """ + Sets the size of this InstancePoolSummary. + The number of instances that should be in the instance pool. + + + :param size: The size of this InstancePoolSummary. + :type: int + """ + self._size = size + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this InstancePoolSummary. + The date and time the instance pool was created, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_created of this InstancePoolSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this InstancePoolSummary. + The date and time the instance pool was created, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :param time_created: The time_created of this InstancePoolSummary. + :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/instance_summary.py b/src/oci/core/models/instance_summary.py new file mode 100644 index 0000000000..9ccd2855fb --- /dev/null +++ b/src/oci/core/models/instance_summary.py @@ -0,0 +1,356 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 InstanceSummary(object): + """ + Condensed instance data when listing instances in an instance pool. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstanceSummary 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 InstanceSummary. + :type id: str + + :param availability_domain: + The value to assign to the availability_domain property of this InstanceSummary. + :type availability_domain: str + + :param compartment_id: + The value to assign to the compartment_id property of this InstanceSummary. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this InstanceSummary. + :type display_name: str + + :param fault_domain: + The value to assign to the fault_domain property of this InstanceSummary. + :type fault_domain: str + + :param instance_configuration_id: + The value to assign to the instance_configuration_id property of this InstanceSummary. + :type instance_configuration_id: str + + :param region: + The value to assign to the region property of this InstanceSummary. + :type region: str + + :param shape: + The value to assign to the shape property of this InstanceSummary. + :type shape: str + + :param state: + The value to assign to the state property of this InstanceSummary. + :type state: str + + :param time_created: + The value to assign to the time_created property of this InstanceSummary. + :type time_created: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'availability_domain': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'fault_domain': 'str', + 'instance_configuration_id': 'str', + 'region': 'str', + 'shape': 'str', + 'state': 'str', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'availability_domain': 'availabilityDomain', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'fault_domain': 'faultDomain', + 'instance_configuration_id': 'instanceConfigurationId', + 'region': 'region', + 'shape': 'shape', + 'state': 'state', + 'time_created': 'timeCreated' + } + + self._id = None + self._availability_domain = None + self._compartment_id = None + self._display_name = None + self._fault_domain = None + self._instance_configuration_id = None + self._region = None + self._shape = None + self._state = None + self._time_created = None + + @property + def id(self): + """ + **[Required]** Gets the id of this InstanceSummary. + The OCID of the instance + + + :return: The id of this InstanceSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this InstanceSummary. + The OCID of the instance + + + :param id: The id of this InstanceSummary. + :type: str + """ + self._id = id + + @property + def availability_domain(self): + """ + **[Required]** Gets the availability_domain of this InstanceSummary. + The availability domain the instance is running in. + + + :return: The availability_domain of this InstanceSummary. + :rtype: str + """ + return self._availability_domain + + @availability_domain.setter + def availability_domain(self, availability_domain): + """ + Sets the availability_domain of this InstanceSummary. + The availability domain the instance is running in. + + + :param availability_domain: The availability_domain of this InstanceSummary. + :type: str + """ + self._availability_domain = availability_domain + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this InstanceSummary. + The OCID of the compartment that contains the instance. + + + :return: The compartment_id of this InstanceSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this InstanceSummary. + The OCID of the compartment that contains the instance. + + + :param compartment_id: The compartment_id of this InstanceSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + Gets the display_name of this InstanceSummary. + The user-friendly name. Does not have to be unique. + + + :return: The display_name of this InstanceSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this InstanceSummary. + The user-friendly name. Does not have to be unique. + + + :param display_name: The display_name of this InstanceSummary. + :type: str + """ + self._display_name = display_name + + @property + def fault_domain(self): + """ + Gets the fault_domain of this InstanceSummary. + The name of the Fault Domain the instance is running in. + + + :return: The fault_domain of this InstanceSummary. + :rtype: str + """ + return self._fault_domain + + @fault_domain.setter + def fault_domain(self, fault_domain): + """ + Sets the fault_domain of this InstanceSummary. + The name of the Fault Domain the instance is running in. + + + :param fault_domain: The fault_domain of this InstanceSummary. + :type: str + """ + self._fault_domain = fault_domain + + @property + def instance_configuration_id(self): + """ + **[Required]** Gets the instance_configuration_id of this InstanceSummary. + The OCID of the instance confgiuration used to create the instance. + + + :return: The instance_configuration_id of this InstanceSummary. + :rtype: str + """ + return self._instance_configuration_id + + @instance_configuration_id.setter + def instance_configuration_id(self, instance_configuration_id): + """ + Sets the instance_configuration_id of this InstanceSummary. + The OCID of the instance confgiuration used to create the instance. + + + :param instance_configuration_id: The instance_configuration_id of this InstanceSummary. + :type: str + """ + self._instance_configuration_id = instance_configuration_id + + @property + def region(self): + """ + **[Required]** Gets the region of this InstanceSummary. + The region that contains the availability domain the instance is running in. + + + :return: The region of this InstanceSummary. + :rtype: str + """ + return self._region + + @region.setter + def region(self, region): + """ + Sets the region of this InstanceSummary. + The region that contains the availability domain the instance is running in. + + + :param region: The region of this InstanceSummary. + :type: str + """ + self._region = region + + @property + def shape(self): + """ + Gets the shape of this InstanceSummary. + The shape of an instance. The shape determines the number of CPUs, amount of memory, + and other resources allocated to the instance. + + You can enumerate all available shapes by calling :func:`list_shapes`. + + + :return: The shape of this InstanceSummary. + :rtype: str + """ + return self._shape + + @shape.setter + def shape(self, shape): + """ + Sets the shape of this InstanceSummary. + The shape of an instance. The shape determines the number of CPUs, amount of memory, + and other resources allocated to the instance. + + You can enumerate all available shapes by calling :func:`list_shapes`. + + + :param shape: The shape of this InstanceSummary. + :type: str + """ + self._shape = shape + + @property + def state(self): + """ + **[Required]** Gets the state of this InstanceSummary. + The current state of the instance pool instance. + + + :return: The state of this InstanceSummary. + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """ + Sets the state of this InstanceSummary. + The current state of the instance pool instance. + + + :param state: The state of this InstanceSummary. + :type: str + """ + self._state = state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this InstanceSummary. + The date and time the instance pool instance was created, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_created of this InstanceSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this InstanceSummary. + The date and time the instance pool instance was created, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :param time_created: The time_created of this InstanceSummary. + :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/subnet.py b/src/oci/core/models/subnet.py index 9307cf55ce..eed400190e 100644 --- a/src/oci/core/models/subnet.py +++ b/src/oci/core/models/subnet.py @@ -302,7 +302,7 @@ def defined_tags(self, defined_tags): def dhcp_options_id(self): """ Gets the dhcp_options_id of this Subnet. - The OCID of the set of DHCP options associated with the subnet. + The OCID of the set of DHCP options that the subnet uses. :return: The dhcp_options_id of this Subnet. @@ -314,7 +314,7 @@ def dhcp_options_id(self): def dhcp_options_id(self, dhcp_options_id): """ Sets the dhcp_options_id of this Subnet. - The OCID of the set of DHCP options associated with the subnet. + The OCID of the set of DHCP options that the subnet uses. :param dhcp_options_id: The dhcp_options_id of this Subnet. @@ -538,7 +538,7 @@ def prohibit_public_ip_on_vnic(self, prohibit_public_ip_on_vnic): def route_table_id(self): """ **[Required]** Gets the route_table_id of this Subnet. - The OCID of the route table the subnet is using. + The OCID of the route table that the subnet uses. :return: The route_table_id of this Subnet. @@ -550,7 +550,7 @@ def route_table_id(self): def route_table_id(self, route_table_id): """ Sets the route_table_id of this Subnet. - The OCID of the route table the subnet is using. + The OCID of the route table that the subnet uses. :param route_table_id: The route_table_id of this Subnet. @@ -562,7 +562,9 @@ def route_table_id(self, route_table_id): def security_list_ids(self): """ Gets the security_list_ids of this Subnet. - OCIDs for the security lists to use for VNICs in this subnet. + The OCIDs of the security list or lists that the subnet uses. Remember + that security lists are associated *with the subnet*, but the + rules are applied to the individual VNICs in the subnet. :return: The security_list_ids of this Subnet. @@ -574,7 +576,9 @@ def security_list_ids(self): def security_list_ids(self, security_list_ids): """ Sets the security_list_ids of this Subnet. - OCIDs for the security lists to use for VNICs in this subnet. + The OCIDs of the security list or lists that the subnet uses. Remember + that security lists are associated *with the subnet*, but the + rules are applied to the individual VNICs in the subnet. :param security_list_ids: The security_list_ids of this Subnet. diff --git a/src/oci/core/models/update_instance_configuration_details.py b/src/oci/core/models/update_instance_configuration_details.py new file mode 100644 index 0000000000..057500f388 --- /dev/null +++ b/src/oci/core/models/update_instance_configuration_details.py @@ -0,0 +1,159 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 UpdateInstanceConfigurationDetails(object): + """ + UpdateInstanceConfigurationDetails model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateInstanceConfigurationDetails 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 UpdateInstanceConfigurationDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this UpdateInstanceConfigurationDetails. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateInstanceConfigurationDetails. + :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 UpdateInstanceConfigurationDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateInstanceConfigurationDetails. + :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 UpdateInstanceConfigurationDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateInstanceConfigurationDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this UpdateInstanceConfigurationDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Example: `My instance configuration` + + + :return: The display_name of this UpdateInstanceConfigurationDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateInstanceConfigurationDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + Example: `My instance configuration` + + + :param display_name: The display_name of this UpdateInstanceConfigurationDetails. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateInstanceConfigurationDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateInstanceConfigurationDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateInstanceConfigurationDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateInstanceConfigurationDetails. + :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_pool_details.py b/src/oci/core/models/update_instance_pool_details.py new file mode 100644 index 0000000000..f94337f644 --- /dev/null +++ b/src/oci/core/models/update_instance_pool_details.py @@ -0,0 +1,248 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 UpdateInstancePoolDetails(object): + """ + The data to update an instance pool. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateInstancePoolDetails 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 UpdateInstancePoolDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this UpdateInstancePoolDetails. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateInstancePoolDetails. + :type freeform_tags: dict(str, str) + + :param instance_configuration_id: + The value to assign to the instance_configuration_id property of this UpdateInstancePoolDetails. + :type instance_configuration_id: str + + :param placement_configurations: + The value to assign to the placement_configurations property of this UpdateInstancePoolDetails. + :type placement_configurations: list[UpdateInstancePoolPlacementConfigurationDetails] + + :param size: + The value to assign to the size property of this UpdateInstancePoolDetails. + :type size: int + + """ + self.swagger_types = { + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)', + 'instance_configuration_id': 'str', + 'placement_configurations': 'list[UpdateInstancePoolPlacementConfigurationDetails]', + 'size': 'int' + } + + self.attribute_map = { + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags', + 'instance_configuration_id': 'instanceConfigurationId', + 'placement_configurations': 'placementConfigurations', + 'size': 'size' + } + + self._defined_tags = None + self._display_name = None + self._freeform_tags = None + self._instance_configuration_id = None + self._placement_configurations = None + self._size = None + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateInstancePoolDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateInstancePoolDetails. + :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 UpdateInstancePoolDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateInstancePoolDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this UpdateInstancePoolDetails. + The user-friendly name. Does not have to be unique. + + + :return: The display_name of this UpdateInstancePoolDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateInstancePoolDetails. + The user-friendly name. Does not have to be unique. + + + :param display_name: The display_name of this UpdateInstancePoolDetails. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateInstancePoolDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateInstancePoolDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateInstancePoolDetails. + 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateInstancePoolDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def instance_configuration_id(self): + """ + Gets the instance_configuration_id of this UpdateInstancePoolDetails. + The OCID of the instance configuration associated to the intance pool. + + + :return: The instance_configuration_id of this UpdateInstancePoolDetails. + :rtype: str + """ + return self._instance_configuration_id + + @instance_configuration_id.setter + def instance_configuration_id(self, instance_configuration_id): + """ + Sets the instance_configuration_id of this UpdateInstancePoolDetails. + The OCID of the instance configuration associated to the intance pool. + + + :param instance_configuration_id: The instance_configuration_id of this UpdateInstancePoolDetails. + :type: str + """ + self._instance_configuration_id = instance_configuration_id + + @property + def placement_configurations(self): + """ + Gets the placement_configurations of this UpdateInstancePoolDetails. + The placement configurations for the instance pool. + There should be 1 placement configuration for each desired AD. + + + :return: The placement_configurations of this UpdateInstancePoolDetails. + :rtype: list[UpdateInstancePoolPlacementConfigurationDetails] + """ + return self._placement_configurations + + @placement_configurations.setter + def placement_configurations(self, placement_configurations): + """ + Sets the placement_configurations of this UpdateInstancePoolDetails. + The placement configurations for the instance pool. + There should be 1 placement configuration for each desired AD. + + + :param placement_configurations: The placement_configurations of this UpdateInstancePoolDetails. + :type: list[UpdateInstancePoolPlacementConfigurationDetails] + """ + self._placement_configurations = placement_configurations + + @property + def size(self): + """ + Gets the size of this UpdateInstancePoolDetails. + The number of instances that should be in the instance pool. + + + :return: The size of this UpdateInstancePoolDetails. + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """ + Sets the size of this UpdateInstancePoolDetails. + The number of instances that should be in the instance pool. + + + :param size: The size of this UpdateInstancePoolDetails. + :type: int + """ + self._size = size + + 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_pool_placement_configuration_details.py b/src/oci/core/models/update_instance_pool_placement_configuration_details.py new file mode 100644 index 0000000000..00d5d725ab --- /dev/null +++ b/src/oci/core/models/update_instance_pool_placement_configuration_details.py @@ -0,0 +1,133 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 UpdateInstancePoolPlacementConfigurationDetails(object): + """ + The location for where an instance pool will place instances. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateInstancePoolPlacementConfigurationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param availability_domain: + The value to assign to the availability_domain property of this UpdateInstancePoolPlacementConfigurationDetails. + :type availability_domain: str + + :param primary_subnet_id: + The value to assign to the primary_subnet_id property of this UpdateInstancePoolPlacementConfigurationDetails. + :type primary_subnet_id: str + + :param secondary_vnic_subnets: + The value to assign to the secondary_vnic_subnets property of this UpdateInstancePoolPlacementConfigurationDetails. + :type secondary_vnic_subnets: list[InstancePoolPlacementSecondaryVnicSubnet] + + """ + self.swagger_types = { + 'availability_domain': 'str', + 'primary_subnet_id': 'str', + 'secondary_vnic_subnets': 'list[InstancePoolPlacementSecondaryVnicSubnet]' + } + + self.attribute_map = { + 'availability_domain': 'availabilityDomain', + 'primary_subnet_id': 'primarySubnetId', + 'secondary_vnic_subnets': 'secondaryVnicSubnets' + } + + self._availability_domain = None + self._primary_subnet_id = None + self._secondary_vnic_subnets = None + + @property + def availability_domain(self): + """ + **[Required]** Gets the availability_domain of this UpdateInstancePoolPlacementConfigurationDetails. + The availability domain to place instances. + Example: `Uocm:PHX-AD-1` + + + :return: The availability_domain of this UpdateInstancePoolPlacementConfigurationDetails. + :rtype: str + """ + return self._availability_domain + + @availability_domain.setter + def availability_domain(self, availability_domain): + """ + Sets the availability_domain of this UpdateInstancePoolPlacementConfigurationDetails. + The availability domain to place instances. + Example: `Uocm:PHX-AD-1` + + + :param availability_domain: The availability_domain of this UpdateInstancePoolPlacementConfigurationDetails. + :type: str + """ + self._availability_domain = availability_domain + + @property + def primary_subnet_id(self): + """ + **[Required]** Gets the primary_subnet_id of this UpdateInstancePoolPlacementConfigurationDetails. + The OCID of the primary subnet to place instances. + + + :return: The primary_subnet_id of this UpdateInstancePoolPlacementConfigurationDetails. + :rtype: str + """ + return self._primary_subnet_id + + @primary_subnet_id.setter + def primary_subnet_id(self, primary_subnet_id): + """ + Sets the primary_subnet_id of this UpdateInstancePoolPlacementConfigurationDetails. + The OCID of the primary subnet to place instances. + + + :param primary_subnet_id: The primary_subnet_id of this UpdateInstancePoolPlacementConfigurationDetails. + :type: str + """ + self._primary_subnet_id = primary_subnet_id + + @property + def secondary_vnic_subnets(self): + """ + Gets the secondary_vnic_subnets of this UpdateInstancePoolPlacementConfigurationDetails. + The set of subnet OCIDs for secondary VNICs for instances in the pool. + + + :return: The secondary_vnic_subnets of this UpdateInstancePoolPlacementConfigurationDetails. + :rtype: list[InstancePoolPlacementSecondaryVnicSubnet] + """ + return self._secondary_vnic_subnets + + @secondary_vnic_subnets.setter + def secondary_vnic_subnets(self, secondary_vnic_subnets): + """ + Sets the secondary_vnic_subnets of this UpdateInstancePoolPlacementConfigurationDetails. + The set of subnet OCIDs for secondary VNICs for instances in the pool. + + + :param secondary_vnic_subnets: The secondary_vnic_subnets of this UpdateInstancePoolPlacementConfigurationDetails. + :type: list[InstancePoolPlacementSecondaryVnicSubnet] + """ + self._secondary_vnic_subnets = secondary_vnic_subnets + + 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/volume_backup.py b/src/oci/core/models/volume_backup.py index e886e4d02a..9c7f2769b9 100644 --- a/src/oci/core/models/volume_backup.py +++ b/src/oci/core/models/volume_backup.py @@ -113,6 +113,10 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type source_type: str + :param source_volume_backup_id: + The value to assign to the source_volume_backup_id property of this VolumeBackup. + :type source_volume_backup_id: str + :param time_created: The value to assign to the time_created property of this VolumeBackup. :type time_created: datetime @@ -151,6 +155,7 @@ def __init__(self, **kwargs): 'size_in_gbs': 'int', 'size_in_mbs': 'int', 'source_type': 'str', + 'source_volume_backup_id': 'str', 'time_created': 'datetime', 'time_request_received': 'datetime', 'type': 'str', @@ -170,6 +175,7 @@ def __init__(self, **kwargs): 'size_in_gbs': 'sizeInGBs', 'size_in_mbs': 'sizeInMBs', 'source_type': 'sourceType', + 'source_volume_backup_id': 'sourceVolumeBackupId', 'time_created': 'timeCreated', 'time_request_received': 'timeRequestReceived', 'type': 'type', @@ -188,6 +194,7 @@ def __init__(self, **kwargs): self._size_in_gbs = None self._size_in_mbs = None self._source_type = None + self._source_volume_backup_id = None self._time_created = None self._time_request_received = None self._type = None @@ -481,6 +488,30 @@ def source_type(self, source_type): source_type = 'UNKNOWN_ENUM_VALUE' self._source_type = source_type + @property + def source_volume_backup_id(self): + """ + Gets the source_volume_backup_id of this VolumeBackup. + The OCID of the source volume backup. + + + :return: The source_volume_backup_id of this VolumeBackup. + :rtype: str + """ + return self._source_volume_backup_id + + @source_volume_backup_id.setter + def source_volume_backup_id(self, source_volume_backup_id): + """ + Sets the source_volume_backup_id of this VolumeBackup. + The OCID of the source volume backup. + + + :param source_volume_backup_id: The source_volume_backup_id of this VolumeBackup. + :type: str + """ + self._source_volume_backup_id = source_volume_backup_id + @property def time_created(self): """ diff --git a/src/oci/core/virtual_network_client.py b/src/oci/core/virtual_network_client.py index adc8f88b53..ad23cfb332 100644 --- a/src/oci/core/virtual_network_client.py +++ b/src/oci/core/virtual_network_client.py @@ -73,7 +73,8 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/20160918' + 'base_path': '/20160918', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("virtual_network", config, signer, core_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') @@ -9808,7 +9809,7 @@ def update_service_gateway(self, service_gateway_id, update_service_gateway_deta def update_subnet(self, subnet_id, update_subnet_details, **kwargs): """ UpdateSubnet - Updates the specified subnet's display name. Avoid entering confidential information. + Updates the specified subnet. :param str subnet_id: (required) @@ -9888,8 +9889,7 @@ def update_subnet(self, subnet_id, update_subnet_details, **kwargs): def update_vcn(self, vcn_id, update_vcn_details, **kwargs): """ UpdateVcn - Updates the specified VCN's display name. - Avoid entering confidential information. + Updates the specified VCN. :param str vcn_id: (required) diff --git a/src/oci/database/database_client.py b/src/oci/database/database_client.py index 7a72d2cebc..fb1784b76c 100644 --- a/src/oci/database/database_client.py +++ b/src/oci/database/database_client.py @@ -73,11 +73,109 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/20160918' + 'base_path': '/20160918', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("database", config, signer, database_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') + def complete_external_backup_job(self, backup_id, complete_external_backup_job_details, **kwargs): + """ + CompleteExternalBackupJob + Changes the status of the standalone backup resource to `ACTIVE` after the backup is created from the on-premises database and placed in Oracle Cloud Infrastructure Object Storage. + + **Note:** This API is used by an Oracle Cloud Infrastructure Python script that is packaged with the Oracle Cloud Infrastructure CLI. Oracle recommends that you use the script instead using the API directly. See `Migrating an On-Premises Database to Oracle Cloud Infrastructure by Creating a Backup in the Cloud`__ for more information. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Tasks/mig-onprembackup.htm + + + :param str backup_id: (required) + The backup `OCID`__. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm + + :param CompleteExternalBackupJobDetails complete_external_backup_job_details: (required) + Updates the status of the backup resource. + + :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_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.database.models.ExternalBackupJob` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/externalBackupJobs/{backupId}/actions/complete" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "complete_external_backup_job got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "backupId": backup_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-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=complete_external_backup_job_details, + response_type="ExternalBackupJob") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=complete_external_backup_job_details, + response_type="ExternalBackupJob") + def create_autonomous_data_warehouse(self, create_autonomous_data_warehouse_details, **kwargs): """ Creates a new Autonomous Data Warehouse. @@ -232,6 +330,9 @@ def create_autonomous_database(self, create_autonomous_database_details, **kwarg has been deleted and purged from the system, then a retry of the original creation request may be rejected). + :param str opc_request_id: (optional) + Unique identifier for the request. + :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. @@ -249,7 +350,8 @@ def create_autonomous_database(self, create_autonomous_database_details, **kwarg # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_retry_token" + "opc_retry_token", + "opc_request_id" ] extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] if extra_kwargs: @@ -259,7 +361,8 @@ def create_autonomous_database(self, create_autonomous_database_details, **kwarg header_params = { "accept": "application/json", "content-type": "application/json", - "opc-retry-token": kwargs.get("opc_retry_token", missing) + "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} @@ -301,6 +404,9 @@ def create_autonomous_database_backup(self, create_autonomous_database_backup_de has been deleted and purged from the system, then a retry of the original creation request may be rejected). + :param str opc_request_id: (optional) + Unique identifier for the request. + :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. @@ -318,7 +424,8 @@ def create_autonomous_database_backup(self, create_autonomous_database_backup_de # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "opc_retry_token" + "opc_retry_token", + "opc_request_id" ] extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] if extra_kwargs: @@ -328,7 +435,8 @@ def create_autonomous_database_backup(self, create_autonomous_database_backup_de header_params = { "accept": "application/json", "content-type": "application/json", - "opc-retry-token": kwargs.get("opc_retry_token", missing) + "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} @@ -588,6 +696,79 @@ def create_db_home(self, create_db_home_with_db_system_id_details, **kwargs): body=create_db_home_with_db_system_id_details, response_type="DbHome") + def create_external_backup_job(self, create_external_backup_job_details, **kwargs): + """ + CreateExternalBackupJob + Creates a new backup resource and returns the information the caller needs to back up an on-premises Oracle Database to Oracle Cloud Infrastructure. + + **Note:** This API is used by an Oracle Cloud Infrastructure Python script that is packaged with the Oracle Cloud Infrastructure CLI. Oracle recommends that you use the script instead using the API directly. See `Migrating an On-Premises Database to Oracle Cloud Infrastructure by Creating a Backup in the Cloud`__ for more information. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Tasks/mig-onprembackup.htm + + + :param CreateExternalBackupJobDetails create_external_backup_job_details: (required) + Request to create a cloud backup resource for a database running outside the cloud. + + :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.database.models.ExternalBackupJob` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/externalBackupJobs" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "opc_retry_token" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_external_backup_job 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) + } + 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_external_backup_job_details, + response_type="ExternalBackupJob") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_external_backup_job_details, + response_type="ExternalBackupJob") + def db_node_action(self, db_node_id, action, **kwargs): """ DbNodeAction @@ -793,6 +974,9 @@ def delete_autonomous_database(self, autonomous_database_id, **kwargs): 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) + Unique identifier for the request. + :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. @@ -810,7 +994,8 @@ def delete_autonomous_database(self, autonomous_database_id, **kwargs): # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "if_match" + "if_match", + "opc_request_id" ] extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] if extra_kwargs: @@ -830,7 +1015,8 @@ def delete_autonomous_database(self, autonomous_database_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", 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} @@ -1105,6 +1291,188 @@ def failover_data_guard_association(self, database_id, data_guard_association_id body=failover_data_guard_association_details, response_type="DataGuardAssociation") + def generate_autonomous_data_warehouse_wallet(self, autonomous_data_warehouse_id, generate_autonomous_data_warehouse_wallet_details, **kwargs): + """ + Creates and downloads a wallet for the specified Autonomous Data Warehouse. + Creates and downloads a wallet for the specified Autonomous Data Warehouse. + + + :param str autonomous_data_warehouse_id: (required) + The database `OCID`__. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm + + :param GenerateAutonomousDataWarehouseWalletDetails generate_autonomous_data_warehouse_wallet_details: (required) + Request to create a new Autonomous Data Warehouse wallet. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 stream + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/autonomousDataWarehouses/{autonomousDataWarehouseId}/actions/generateWallet" + 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( + "generate_autonomous_data_warehouse_wallet got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "autonomousDataWarehouseId": autonomous_data_warehouse_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/octet-stream", + "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=generate_autonomous_data_warehouse_wallet_details, + response_type="stream") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_autonomous_data_warehouse_wallet_details, + response_type="stream") + + def generate_autonomous_database_wallet(self, autonomous_database_id, generate_autonomous_database_wallet_details, **kwargs): + """ + Creates and downloads a wallet for the specified Autonomous Data Warehouse. + Creates and downloads a wallet for the specified Autonomous Transaction Processing database. + + + :param str autonomous_database_id: (required) + The database `OCID`__. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm + + :param GenerateAutonomousDatabaseWalletDetails generate_autonomous_database_wallet_details: (required) + Request to create a new Autonomous Transaction Processing database wallet. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 stream + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/autonomousDatabases/{autonomousDatabaseId}/actions/generateWallet" + 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( + "generate_autonomous_database_wallet got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "autonomousDatabaseId": autonomous_database_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/octet-stream", + "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=generate_autonomous_database_wallet_details, + response_type="stream") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_autonomous_database_wallet_details, + response_type="stream") + def get_autonomous_data_warehouse(self, autonomous_data_warehouse_id, **kwargs): """ Gets the details of the specified Autonomous Data Warehouse. @@ -1248,6 +1616,9 @@ def get_autonomous_database(self, autonomous_database_id, **kwargs): __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm + :param str opc_request_id: (optional) + Unique identifier for the request. + :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. @@ -1262,7 +1633,11 @@ def get_autonomous_database(self, autonomous_database_id, **kwargs): resource_path = "/autonomousDatabases/{autonomousDatabaseId}" method = "GET" - expected_kwargs = ["retry_strategy"] + # 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( @@ -1280,8 +1655,10 @@ def get_autonomous_database(self, autonomous_database_id, **kwargs): 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'): @@ -1314,6 +1691,9 @@ def get_autonomous_database_backup(self, autonomous_database_backup_id, **kwargs __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm + :param str opc_request_id: (optional) + Unique identifier for the request. + :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. @@ -1328,7 +1708,11 @@ def get_autonomous_database_backup(self, autonomous_database_backup_id, **kwargs resource_path = "/autonomousDatabaseBackups/{autonomousDatabaseBackupId}" method = "GET" - expected_kwargs = ["retry_strategy"] + # 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( @@ -1346,8 +1730,10 @@ def get_autonomous_database_backup(self, autonomous_database_backup_id, **kwargs 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'): @@ -1868,20 +2254,92 @@ def get_db_system(self, db_system_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.database.models.DbSystem` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.database.models.DbSystem` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/dbSystems/{dbSystemId}" + 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_db_system got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "dbSystemId": db_system_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="DbSystem") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DbSystem") + + def get_db_system_patch(self, db_system_id, patch_id, **kwargs): + """ + GetDbSystemPatch + Gets information about a specified patch package. + + + :param str db_system_id: (required) + The DB system `OCID`__. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm + + :param str patch_id: (required) + The `OCID`__ of the patch. + + __ https://docs.us-phoenix-1.oraclecloud.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 :class:`~oci.database.models.Patch` :rtype: :class:`~oci.response.Response` """ - resource_path = "/dbSystems/{dbSystemId}" + resource_path = "/dbSystems/{dbSystemId}/patches/{patchId}" 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_db_system got unknown kwargs: {!r}".format(extra_kwargs)) + "get_db_system_patch got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "dbSystemId": db_system_id + "dbSystemId": db_system_id, + "patchId": patch_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1906,19 +2364,19 @@ def get_db_system(self, db_system_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="DbSystem") + response_type="Patch") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - response_type="DbSystem") + response_type="Patch") - def get_db_system_patch(self, db_system_id, patch_id, **kwargs): + def get_db_system_patch_history_entry(self, db_system_id, patch_history_entry_id, **kwargs): """ - GetDbSystemPatch - Gets information about a specified patch package. + GetDbSystemPatchHistoryEntry + Gets the patch history details for the specified patchHistoryEntryId. :param str db_system_id: (required) @@ -1926,8 +2384,8 @@ def get_db_system_patch(self, db_system_id, patch_id, **kwargs): __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm - :param str patch_id: (required) - The `OCID`__ of the patch. + :param str patch_history_entry_id: (required) + The `OCID`__ of the patch history entry. __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm @@ -1939,21 +2397,21 @@ def get_db_system_patch(self, db_system_id, patch_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.database.models.Patch` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.database.models.PatchHistoryEntry` :rtype: :class:`~oci.response.Response` """ - resource_path = "/dbSystems/{dbSystemId}/patches/{patchId}" + resource_path = "/dbSystems/{dbSystemId}/patchHistoryEntries/{patchHistoryEntryId}" 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_db_system_patch got unknown kwargs: {!r}".format(extra_kwargs)) + "get_db_system_patch_history_entry got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "dbSystemId": db_system_id, - "patchId": patch_id + "patchHistoryEntryId": patch_history_entry_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1978,28 +2436,27 @@ def get_db_system_patch(self, db_system_id, patch_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="Patch") + response_type="PatchHistoryEntry") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - response_type="Patch") + response_type="PatchHistoryEntry") - def get_db_system_patch_history_entry(self, db_system_id, patch_history_entry_id, **kwargs): + def get_external_backup_job(self, backup_id, **kwargs): """ - GetDbSystemPatchHistoryEntry - Gets the patch history details for the specified patchHistoryEntryId. + GetExternalBackupJob + Gets information about the specified external backup job. + **Note:** This API is used by an Oracle Cloud Infrastructure Python script that is packaged with the Oracle Cloud Infrastructure CLI. Oracle recommends that you use the script instead using the API directly. See `Migrating an On-Premises Database to Oracle Cloud Infrastructure by Creating a Backup in the Cloud`__ for more information. - :param str db_system_id: (required) - The DB system `OCID`__. + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Tasks/mig-onprembackup.htm - __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm - :param str patch_history_entry_id: (required) - The `OCID`__ of the patch history entry. + :param str backup_id: (required) + The backup `OCID`__. __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm @@ -2011,21 +2468,20 @@ def get_db_system_patch_history_entry(self, db_system_id, patch_history_entry_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 :class:`~oci.database.models.PatchHistoryEntry` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.database.models.ExternalBackupJob` :rtype: :class:`~oci.response.Response` """ - resource_path = "/dbSystems/{dbSystemId}/patchHistoryEntries/{patchHistoryEntryId}" + resource_path = "/externalBackupJobs/{backupId}" 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_db_system_patch_history_entry got unknown kwargs: {!r}".format(extra_kwargs)) + "get_external_backup_job got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "dbSystemId": db_system_id, - "patchHistoryEntryId": patch_history_entry_id + "backupId": backup_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2050,14 +2506,14 @@ def get_db_system_patch_history_entry(self, db_system_id, patch_history_entry_id method=method, path_params=path_params, header_params=header_params, - response_type="PatchHistoryEntry") + response_type="ExternalBackupJob") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - response_type="PatchHistoryEntry") + response_type="ExternalBackupJob") def launch_db_system(self, launch_db_system_details, **kwargs): """ @@ -2431,6 +2887,9 @@ def list_autonomous_database_backups(self, **kwargs): :param str display_name: (optional) A filter to return only resources that match the entire display name given. The match is not case sensitive. + :param str opc_request_id: (optional) + Unique identifier for the request. + :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. @@ -2455,7 +2914,8 @@ def list_autonomous_database_backups(self, **kwargs): "sort_by", "sort_order", "lifecycle_state", - "display_name" + "display_name", + "opc_request_id" ] extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] if extra_kwargs: @@ -2497,8 +2957,10 @@ def list_autonomous_database_backups(self, **kwargs): 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'): @@ -2552,11 +3014,14 @@ def list_autonomous_databases(self, compartment_id, **kwargs): :param str lifecycle_state: (optional) A filter to return only resources that match the given lifecycle state exactly. - Allowed values are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION" + Allowed values are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION" :param str display_name: (optional) A filter to return only resources that match the entire display name given. The match is not case sensitive. + :param str opc_request_id: (optional) + Unique identifier for the request. + :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. @@ -2579,7 +3044,8 @@ def list_autonomous_databases(self, compartment_id, **kwargs): "sort_by", "sort_order", "lifecycle_state", - "display_name" + "display_name", + "opc_request_id" ] extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] if extra_kwargs: @@ -2601,7 +3067,7 @@ def list_autonomous_databases(self, compartment_id, **kwargs): ) if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION"] + lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION"] 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) @@ -2620,8 +3086,10 @@ def list_autonomous_databases(self, compartment_id, **kwargs): 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'): @@ -2832,6 +3300,24 @@ def list_databases(self, compartment_id, db_home_id, **kwargs): :param str page: (optional) The pagination token to continue listing from. + :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 DBNAME is ascending. The DBNAME sort order is case sensitive. + + Allowed values are: "DBNAME", "TIMECREATED" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str lifecycle_state: (optional) + A filter to return only resources that match the given lifecycle state exactly. + + Allowed values are: "PROVISIONING", "AVAILABLE", "UPDATING", "BACKUP_IN_PROGRESS", "TERMINATING", "TERMINATED", "RESTORE_FAILED", "FAILED" + + :param str db_name: (optional) + A filter to return only resources that match the entire database name given. The match is not case sensitive. + :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. @@ -2850,18 +3336,47 @@ def list_databases(self, compartment_id, db_home_id, **kwargs): expected_kwargs = [ "retry_strategy", "limit", - "page" + "page", + "sort_by", + "sort_order", + "lifecycle_state", + "db_name" ] extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_databases got unknown kwargs: {!r}".format(extra_kwargs)) + if 'sort_by' in kwargs: + sort_by_allowed_values = ["DBNAME", "TIMECREATED"] + 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) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "UPDATING", "BACKUP_IN_PROGRESS", "TERMINATING", "TERMINATED", "RESTORE_FAILED", "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) + ) + query_params = { "compartmentId": compartment_id, "dbHomeId": db_home_id, "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing) + "page": kwargs.get("page", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "dbName": kwargs.get("db_name", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -3082,6 +3597,24 @@ def list_db_homes(self, compartment_id, db_system_id, **kwargs): :param str page: (optional) The pagination token to continue listing from. + :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 sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str lifecycle_state: (optional) + A filter to return only resources that match the given lifecycle state exactly. + + Allowed values are: "PROVISIONING", "AVAILABLE", "UPDATING", "TERMINATING", "TERMINATED", "FAILED" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. The match is not case sensitive. + :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. @@ -3100,18 +3633,47 @@ def list_db_homes(self, compartment_id, db_system_id, **kwargs): expected_kwargs = [ "retry_strategy", "limit", - "page" + "page", + "sort_by", + "sort_order", + "lifecycle_state", + "display_name" ] extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_db_homes 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) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "UPDATING", "TERMINATING", "TERMINATED", "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) + ) + query_params = { "compartmentId": compartment_id, "dbSystemId": db_system_id, "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing) + "page": kwargs.get("page", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "displayName": kwargs.get("display_name", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -3162,6 +3724,21 @@ def list_db_nodes(self, compartment_id, db_system_id, **kwargs): :param str page: (optional) The pagination token to continue listing from. + :param str sort_by: (optional) + Sort by TIMECREATED. Default order for TIMECREATED is descending. + + Allowed values are: "TIMECREATED" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str lifecycle_state: (optional) + A filter to return only resources that match the given lifecycle state exactly. + + Allowed values are: "PROVISIONING", "AVAILABLE", "UPDATING", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "FAILED" + :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. @@ -3180,18 +3757,45 @@ def list_db_nodes(self, compartment_id, db_system_id, **kwargs): expected_kwargs = [ "retry_strategy", "limit", - "page" + "page", + "sort_by", + "sort_order", + "lifecycle_state" ] extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_db_nodes got unknown kwargs: {!r}".format(extra_kwargs)) + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED"] + 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) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "UPDATING", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "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) + ) + query_params = { "compartmentId": compartment_id, "dbSystemId": db_system_id, "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing) + "page": kwargs.get("page", 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} @@ -3490,6 +4094,29 @@ def list_db_systems(self, compartment_id, **kwargs): __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm + :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. + + **Note:** If you do not include the availability domain filter, the resources are grouped by availability domain, then sorted. + + Allowed values are: "TIMECREATED", "DISPLAYNAME" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :param str lifecycle_state: (optional) + A filter to return only resources that match the given lifecycle state exactly. + + Allowed values are: "PROVISIONING", "AVAILABLE", "UPDATING", "TERMINATING", "TERMINATED", "FAILED" + + :param str availability_domain: (optional) + A filter to return only resources that match the given availability domain exactly. + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. The match is not case sensitive. + :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. @@ -3509,18 +4136,49 @@ def list_db_systems(self, compartment_id, **kwargs): "retry_strategy", "limit", "page", - "backup_id" + "backup_id", + "sort_by", + "sort_order", + "lifecycle_state", + "availability_domain", + "display_name" ] extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_db_systems 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) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["PROVISIONING", "AVAILABLE", "UPDATING", "TERMINATING", "TERMINATED", "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) + ) + query_params = { "compartmentId": compartment_id, "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), - "backupId": kwargs.get("backup_id", missing) + "backupId": kwargs.get("backup_id", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "availabilityDomain": kwargs.get("availability_domain", missing), + "displayName": kwargs.get("display_name", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -4216,6 +4874,9 @@ def stop_autonomous_database(self, autonomous_database_id, **kwargs): 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) + Unique identifier for the request. + :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. @@ -4233,7 +4894,8 @@ def stop_autonomous_database(self, autonomous_database_id, **kwargs): # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "if_match" + "if_match", + "opc_request_id" ] extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] if extra_kwargs: @@ -4253,7 +4915,8 @@ def stop_autonomous_database(self, autonomous_database_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", 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} @@ -4544,6 +5207,9 @@ def update_autonomous_database(self, autonomous_database_id, update_autonomous_d 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) + Unique identifier for the request. + :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. @@ -4561,7 +5227,8 @@ def update_autonomous_database(self, autonomous_database_id, update_autonomous_d # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", - "if_match" + "if_match", + "opc_request_id" ] extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] if extra_kwargs: @@ -4581,7 +5248,8 @@ def update_autonomous_database(self, autonomous_database_id, update_autonomous_d header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", 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} diff --git a/src/oci/database/models/__init__.py b/src/oci/database/models/__init__.py index c3697b2385..5124c65dda 100644 --- a/src/oci/database/models/__init__.py +++ b/src/oci/database/models/__init__.py @@ -15,6 +15,7 @@ from .autonomous_database_summary import AutonomousDatabaseSummary from .backup import Backup from .backup_summary import BackupSummary +from .complete_external_backup_job_details import CompleteExternalBackupJobDetails from .create_autonomous_data_warehouse_backup_details import CreateAutonomousDataWarehouseBackupDetails from .create_autonomous_data_warehouse_details import CreateAutonomousDataWarehouseDetails from .create_autonomous_database_backup_details import CreateAutonomousDatabaseBackupDetails @@ -29,6 +30,7 @@ from .create_db_home_with_db_system_id_base import CreateDbHomeWithDbSystemIdBase from .create_db_home_with_db_system_id_details import CreateDbHomeWithDbSystemIdDetails from .create_db_home_with_db_system_id_from_backup_details import CreateDbHomeWithDbSystemIdFromBackupDetails +from .create_external_backup_job_details import CreateExternalBackupJobDetails from .data_guard_association import DataGuardAssociation from .data_guard_association_summary import DataGuardAssociationSummary from .database import Database @@ -42,7 +44,10 @@ from .db_system_shape_summary import DbSystemShapeSummary from .db_system_summary import DbSystemSummary from .db_version_summary import DbVersionSummary +from .external_backup_job import ExternalBackupJob from .failover_data_guard_association_details import FailoverDataGuardAssociationDetails +from .generate_autonomous_data_warehouse_wallet_details import GenerateAutonomousDataWarehouseWalletDetails +from .generate_autonomous_database_wallet_details import GenerateAutonomousDatabaseWalletDetails from .launch_db_system_base import LaunchDbSystemBase from .launch_db_system_details import LaunchDbSystemDetails from .launch_db_system_from_backup_details import LaunchDbSystemFromBackupDetails @@ -76,6 +81,7 @@ "AutonomousDatabaseSummary": AutonomousDatabaseSummary, "Backup": Backup, "BackupSummary": BackupSummary, + "CompleteExternalBackupJobDetails": CompleteExternalBackupJobDetails, "CreateAutonomousDataWarehouseBackupDetails": CreateAutonomousDataWarehouseBackupDetails, "CreateAutonomousDataWarehouseDetails": CreateAutonomousDataWarehouseDetails, "CreateAutonomousDatabaseBackupDetails": CreateAutonomousDatabaseBackupDetails, @@ -90,6 +96,7 @@ "CreateDbHomeWithDbSystemIdBase": CreateDbHomeWithDbSystemIdBase, "CreateDbHomeWithDbSystemIdDetails": CreateDbHomeWithDbSystemIdDetails, "CreateDbHomeWithDbSystemIdFromBackupDetails": CreateDbHomeWithDbSystemIdFromBackupDetails, + "CreateExternalBackupJobDetails": CreateExternalBackupJobDetails, "DataGuardAssociation": DataGuardAssociation, "DataGuardAssociationSummary": DataGuardAssociationSummary, "Database": Database, @@ -103,7 +110,10 @@ "DbSystemShapeSummary": DbSystemShapeSummary, "DbSystemSummary": DbSystemSummary, "DbVersionSummary": DbVersionSummary, + "ExternalBackupJob": ExternalBackupJob, "FailoverDataGuardAssociationDetails": FailoverDataGuardAssociationDetails, + "GenerateAutonomousDataWarehouseWalletDetails": GenerateAutonomousDataWarehouseWalletDetails, + "GenerateAutonomousDatabaseWalletDetails": GenerateAutonomousDatabaseWalletDetails, "LaunchDbSystemBase": LaunchDbSystemBase, "LaunchDbSystemDetails": LaunchDbSystemDetails, "LaunchDbSystemFromBackupDetails": LaunchDbSystemFromBackupDetails, diff --git a/src/oci/database/models/autonomous_data_warehouse.py b/src/oci/database/models/autonomous_data_warehouse.py index 311e2cdc35..6b50d1a069 100644 --- a/src/oci/database/models/autonomous_data_warehouse.py +++ b/src/oci/database/models/autonomous_data_warehouse.py @@ -95,6 +95,10 @@ def __init__(self, **kwargs): The value to assign to the db_name property of this AutonomousDataWarehouse. :type db_name: str + :param db_version: + The value to assign to the db_version property of this AutonomousDataWarehouse. + :type db_version: str + :param defined_tags: The value to assign to the defined_tags property of this AutonomousDataWarehouse. :type defined_tags: dict(str, dict(str, object)) @@ -142,6 +146,7 @@ def __init__(self, **kwargs): 'cpu_core_count': 'int', 'data_storage_size_in_tbs': 'int', 'db_name': 'str', + 'db_version': 'str', 'defined_tags': 'dict(str, dict(str, object))', 'display_name': 'str', 'freeform_tags': 'dict(str, str)', @@ -159,6 +164,7 @@ def __init__(self, **kwargs): 'cpu_core_count': 'cpuCoreCount', 'data_storage_size_in_tbs': 'dataStorageSizeInTBs', 'db_name': 'dbName', + 'db_version': 'dbVersion', 'defined_tags': 'definedTags', 'display_name': 'displayName', 'freeform_tags': 'freeformTags', @@ -175,6 +181,7 @@ def __init__(self, **kwargs): self._cpu_core_count = None self._data_storage_size_in_tbs = None self._db_name = None + self._db_version = None self._defined_tags = None self._display_name = None self._freeform_tags = None @@ -309,6 +316,30 @@ def db_name(self, db_name): """ self._db_name = db_name + @property + def db_version(self): + """ + Gets the db_version of this AutonomousDataWarehouse. + A valid Oracle Database version for Autonomous Data Warehouse. + + + :return: The db_version of this AutonomousDataWarehouse. + :rtype: str + """ + return self._db_version + + @db_version.setter + def db_version(self, db_version): + """ + Sets the db_version of this AutonomousDataWarehouse. + A valid Oracle Database version for Autonomous Data Warehouse. + + + :param db_version: The db_version of this AutonomousDataWarehouse. + :type: str + """ + self._db_version = db_version + @property def defined_tags(self): """ @@ -463,7 +494,7 @@ def license_model(self, license_model): def lifecycle_details(self): """ Gets the lifecycle_details of this AutonomousDataWarehouse. - Additional information about the current lifecycle state. + Information about the current lifecycle state. :return: The lifecycle_details of this AutonomousDataWarehouse. @@ -475,7 +506,7 @@ def lifecycle_details(self): def lifecycle_details(self, lifecycle_details): """ Sets the lifecycle_details of this AutonomousDataWarehouse. - Additional information about the current lifecycle state. + Information about the current lifecycle state. :param lifecycle_details: The lifecycle_details of this AutonomousDataWarehouse. diff --git a/src/oci/database/models/autonomous_data_warehouse_connection_strings.py b/src/oci/database/models/autonomous_data_warehouse_connection_strings.py index 03f79d418c..3216f3629e 100644 --- a/src/oci/database/models/autonomous_data_warehouse_connection_strings.py +++ b/src/oci/database/models/autonomous_data_warehouse_connection_strings.py @@ -17,6 +17,10 @@ def __init__(self, **kwargs): Initializes a new AutonomousDataWarehouseConnectionStrings object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class): + :param all_connection_strings: + The value to assign to the all_connection_strings property of this AutonomousDataWarehouseConnectionStrings. + :type all_connection_strings: dict(str, str) + :param high: The value to assign to the high property of this AutonomousDataWarehouseConnectionStrings. :type high: str @@ -31,21 +35,48 @@ def __init__(self, **kwargs): """ self.swagger_types = { + 'all_connection_strings': 'dict(str, str)', 'high': 'str', 'low': 'str', 'medium': 'str' } self.attribute_map = { + 'all_connection_strings': 'allConnectionStrings', 'high': 'high', 'low': 'low', 'medium': 'medium' } + self._all_connection_strings = None self._high = None self._low = None self._medium = None + @property + def all_connection_strings(self): + """ + Gets the all_connection_strings of this AutonomousDataWarehouseConnectionStrings. + All connection strings to use to connect to the Data Warehouse. + + + :return: The all_connection_strings of this AutonomousDataWarehouseConnectionStrings. + :rtype: dict(str, str) + """ + return self._all_connection_strings + + @all_connection_strings.setter + def all_connection_strings(self, all_connection_strings): + """ + Sets the all_connection_strings of this AutonomousDataWarehouseConnectionStrings. + All connection strings to use to connect to the Data Warehouse. + + + :param all_connection_strings: The all_connection_strings of this AutonomousDataWarehouseConnectionStrings. + :type: dict(str, str) + """ + self._all_connection_strings = all_connection_strings + @property def high(self): """ diff --git a/src/oci/database/models/autonomous_data_warehouse_summary.py b/src/oci/database/models/autonomous_data_warehouse_summary.py index e1972a6f35..846153b727 100644 --- a/src/oci/database/models/autonomous_data_warehouse_summary.py +++ b/src/oci/database/models/autonomous_data_warehouse_summary.py @@ -95,6 +95,10 @@ def __init__(self, **kwargs): The value to assign to the db_name property of this AutonomousDataWarehouseSummary. :type db_name: str + :param db_version: + The value to assign to the db_version property of this AutonomousDataWarehouseSummary. + :type db_version: str + :param defined_tags: The value to assign to the defined_tags property of this AutonomousDataWarehouseSummary. :type defined_tags: dict(str, dict(str, object)) @@ -142,6 +146,7 @@ def __init__(self, **kwargs): 'cpu_core_count': 'int', 'data_storage_size_in_tbs': 'int', 'db_name': 'str', + 'db_version': 'str', 'defined_tags': 'dict(str, dict(str, object))', 'display_name': 'str', 'freeform_tags': 'dict(str, str)', @@ -159,6 +164,7 @@ def __init__(self, **kwargs): 'cpu_core_count': 'cpuCoreCount', 'data_storage_size_in_tbs': 'dataStorageSizeInTBs', 'db_name': 'dbName', + 'db_version': 'dbVersion', 'defined_tags': 'definedTags', 'display_name': 'displayName', 'freeform_tags': 'freeformTags', @@ -175,6 +181,7 @@ def __init__(self, **kwargs): self._cpu_core_count = None self._data_storage_size_in_tbs = None self._db_name = None + self._db_version = None self._defined_tags = None self._display_name = None self._freeform_tags = None @@ -309,6 +316,30 @@ def db_name(self, db_name): """ self._db_name = db_name + @property + def db_version(self): + """ + Gets the db_version of this AutonomousDataWarehouseSummary. + A valid Oracle Database version for Autonomous Data Warehouse. + + + :return: The db_version of this AutonomousDataWarehouseSummary. + :rtype: str + """ + return self._db_version + + @db_version.setter + def db_version(self, db_version): + """ + Sets the db_version of this AutonomousDataWarehouseSummary. + A valid Oracle Database version for Autonomous Data Warehouse. + + + :param db_version: The db_version of this AutonomousDataWarehouseSummary. + :type: str + """ + self._db_version = db_version + @property def defined_tags(self): """ @@ -463,7 +494,7 @@ def license_model(self, license_model): def lifecycle_details(self): """ Gets the lifecycle_details of this AutonomousDataWarehouseSummary. - Additional information about the current lifecycle state. + Information about the current lifecycle state. :return: The lifecycle_details of this AutonomousDataWarehouseSummary. @@ -475,7 +506,7 @@ def lifecycle_details(self): def lifecycle_details(self, lifecycle_details): """ Sets the lifecycle_details of this AutonomousDataWarehouseSummary. - Additional information about the current lifecycle state. + Information about the current lifecycle state. :param lifecycle_details: The lifecycle_details of this AutonomousDataWarehouseSummary. diff --git a/src/oci/database/models/autonomous_database.py b/src/oci/database/models/autonomous_database.py index 76bb28aebe..2f413436d3 100644 --- a/src/oci/database/models/autonomous_database.py +++ b/src/oci/database/models/autonomous_database.py @@ -58,6 +58,10 @@ class AutonomousDatabase(object): #: This constant has a value of "RESTORE_IN_PROGRESS" LIFECYCLE_STATE_RESTORE_IN_PROGRESS = "RESTORE_IN_PROGRESS" + #: A constant which can be used with the lifecycle_state property of a AutonomousDatabase. + #: This constant has a value of "RESTORE_FAILED" + LIFECYCLE_STATE_RESTORE_FAILED = "RESTORE_FAILED" + #: A constant which can be used with the lifecycle_state property of a AutonomousDatabase. #: This constant has a value of "BACKUP_IN_PROGRESS" LIFECYCLE_STATE_BACKUP_IN_PROGRESS = "BACKUP_IN_PROGRESS" @@ -95,6 +99,10 @@ def __init__(self, **kwargs): The value to assign to the db_name property of this AutonomousDatabase. :type db_name: str + :param db_version: + The value to assign to the db_version property of this AutonomousDatabase. + :type db_version: str + :param defined_tags: The value to assign to the defined_tags property of this AutonomousDatabase. :type defined_tags: dict(str, dict(str, object)) @@ -123,7 +131,7 @@ def __init__(self, **kwargs): :param lifecycle_state: The value to assign to the lifecycle_state property of this AutonomousDatabase. - Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str @@ -142,6 +150,7 @@ def __init__(self, **kwargs): 'cpu_core_count': 'int', 'data_storage_size_in_tbs': 'int', 'db_name': 'str', + 'db_version': 'str', 'defined_tags': 'dict(str, dict(str, object))', 'display_name': 'str', 'freeform_tags': 'dict(str, str)', @@ -159,6 +168,7 @@ def __init__(self, **kwargs): 'cpu_core_count': 'cpuCoreCount', 'data_storage_size_in_tbs': 'dataStorageSizeInTBs', 'db_name': 'dbName', + 'db_version': 'dbVersion', 'defined_tags': 'definedTags', 'display_name': 'displayName', 'freeform_tags': 'freeformTags', @@ -175,6 +185,7 @@ def __init__(self, **kwargs): self._cpu_core_count = None self._data_storage_size_in_tbs = None self._db_name = None + self._db_version = None self._defined_tags = None self._display_name = None self._freeform_tags = None @@ -309,6 +320,30 @@ def db_name(self, db_name): """ self._db_name = db_name + @property + def db_version(self): + """ + Gets the db_version of this AutonomousDatabase. + A valid Oracle Database version for Autonomous Database. + + + :return: The db_version of this AutonomousDatabase. + :rtype: str + """ + return self._db_version + + @db_version.setter + def db_version(self, db_version): + """ + Sets the db_version of this AutonomousDatabase. + A valid Oracle Database version for Autonomous Database. + + + :param db_version: The db_version of this AutonomousDatabase. + :type: str + """ + self._db_version = db_version + @property def defined_tags(self): """ @@ -463,7 +498,7 @@ def license_model(self, license_model): def lifecycle_details(self): """ Gets the lifecycle_details of this AutonomousDatabase. - Additional information about the current lifecycle state. + Information about the current lifecycle state. :return: The lifecycle_details of this AutonomousDatabase. @@ -475,7 +510,7 @@ def lifecycle_details(self): def lifecycle_details(self, lifecycle_details): """ Sets the lifecycle_details of this AutonomousDatabase. - Additional information about the current lifecycle state. + Information about the current lifecycle state. :param lifecycle_details: The lifecycle_details of this AutonomousDatabase. @@ -489,7 +524,7 @@ def lifecycle_state(self): **[Required]** Gets the lifecycle_state of this AutonomousDatabase. The current state of the database. - Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -508,7 +543,7 @@ def lifecycle_state(self, lifecycle_state): :param lifecycle_state: The lifecycle_state of this AutonomousDatabase. :type: str """ - allowed_values = ["PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION"] + allowed_values = ["PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION"] if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state diff --git a/src/oci/database/models/autonomous_database_connection_strings.py b/src/oci/database/models/autonomous_database_connection_strings.py index 6e19f6e569..abad977ec0 100644 --- a/src/oci/database/models/autonomous_database_connection_strings.py +++ b/src/oci/database/models/autonomous_database_connection_strings.py @@ -17,6 +17,10 @@ def __init__(self, **kwargs): Initializes a new AutonomousDatabaseConnectionStrings object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class): + :param all_connection_strings: + The value to assign to the all_connection_strings property of this AutonomousDatabaseConnectionStrings. + :type all_connection_strings: dict(str, str) + :param high: The value to assign to the high property of this AutonomousDatabaseConnectionStrings. :type high: str @@ -31,21 +35,48 @@ def __init__(self, **kwargs): """ self.swagger_types = { + 'all_connection_strings': 'dict(str, str)', 'high': 'str', 'low': 'str', 'medium': 'str' } self.attribute_map = { + 'all_connection_strings': 'allConnectionStrings', 'high': 'high', 'low': 'low', 'medium': 'medium' } + self._all_connection_strings = None self._high = None self._low = None self._medium = None + @property + def all_connection_strings(self): + """ + Gets the all_connection_strings of this AutonomousDatabaseConnectionStrings. + All connection strings to use to connect to the Autonomous Database. + + + :return: The all_connection_strings of this AutonomousDatabaseConnectionStrings. + :rtype: dict(str, str) + """ + return self._all_connection_strings + + @all_connection_strings.setter + def all_connection_strings(self, all_connection_strings): + """ + Sets the all_connection_strings of this AutonomousDatabaseConnectionStrings. + All connection strings to use to connect to the Autonomous Database. + + + :param all_connection_strings: The all_connection_strings of this AutonomousDatabaseConnectionStrings. + :type: dict(str, str) + """ + self._all_connection_strings = all_connection_strings + @property def high(self): """ diff --git a/src/oci/database/models/autonomous_database_summary.py b/src/oci/database/models/autonomous_database_summary.py index cfb6914c99..81979b0f3c 100644 --- a/src/oci/database/models/autonomous_database_summary.py +++ b/src/oci/database/models/autonomous_database_summary.py @@ -58,6 +58,10 @@ class AutonomousDatabaseSummary(object): #: This constant has a value of "RESTORE_IN_PROGRESS" LIFECYCLE_STATE_RESTORE_IN_PROGRESS = "RESTORE_IN_PROGRESS" + #: A constant which can be used with the lifecycle_state property of a AutonomousDatabaseSummary. + #: This constant has a value of "RESTORE_FAILED" + LIFECYCLE_STATE_RESTORE_FAILED = "RESTORE_FAILED" + #: A constant which can be used with the lifecycle_state property of a AutonomousDatabaseSummary. #: This constant has a value of "BACKUP_IN_PROGRESS" LIFECYCLE_STATE_BACKUP_IN_PROGRESS = "BACKUP_IN_PROGRESS" @@ -95,6 +99,10 @@ def __init__(self, **kwargs): The value to assign to the db_name property of this AutonomousDatabaseSummary. :type db_name: str + :param db_version: + The value to assign to the db_version property of this AutonomousDatabaseSummary. + :type db_version: str + :param defined_tags: The value to assign to the defined_tags property of this AutonomousDatabaseSummary. :type defined_tags: dict(str, dict(str, object)) @@ -123,7 +131,7 @@ def __init__(self, **kwargs): :param lifecycle_state: The value to assign to the lifecycle_state property of this AutonomousDatabaseSummary. - Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str @@ -142,6 +150,7 @@ def __init__(self, **kwargs): 'cpu_core_count': 'int', 'data_storage_size_in_tbs': 'int', 'db_name': 'str', + 'db_version': 'str', 'defined_tags': 'dict(str, dict(str, object))', 'display_name': 'str', 'freeform_tags': 'dict(str, str)', @@ -159,6 +168,7 @@ def __init__(self, **kwargs): 'cpu_core_count': 'cpuCoreCount', 'data_storage_size_in_tbs': 'dataStorageSizeInTBs', 'db_name': 'dbName', + 'db_version': 'dbVersion', 'defined_tags': 'definedTags', 'display_name': 'displayName', 'freeform_tags': 'freeformTags', @@ -175,6 +185,7 @@ def __init__(self, **kwargs): self._cpu_core_count = None self._data_storage_size_in_tbs = None self._db_name = None + self._db_version = None self._defined_tags = None self._display_name = None self._freeform_tags = None @@ -309,6 +320,30 @@ def db_name(self, db_name): """ self._db_name = db_name + @property + def db_version(self): + """ + Gets the db_version of this AutonomousDatabaseSummary. + A valid Oracle Database version for Autonomous Database. + + + :return: The db_version of this AutonomousDatabaseSummary. + :rtype: str + """ + return self._db_version + + @db_version.setter + def db_version(self, db_version): + """ + Sets the db_version of this AutonomousDatabaseSummary. + A valid Oracle Database version for Autonomous Database. + + + :param db_version: The db_version of this AutonomousDatabaseSummary. + :type: str + """ + self._db_version = db_version + @property def defined_tags(self): """ @@ -463,7 +498,7 @@ def license_model(self, license_model): def lifecycle_details(self): """ Gets the lifecycle_details of this AutonomousDatabaseSummary. - Additional information about the current lifecycle state. + Information about the current lifecycle state. :return: The lifecycle_details of this AutonomousDatabaseSummary. @@ -475,7 +510,7 @@ def lifecycle_details(self): def lifecycle_details(self, lifecycle_details): """ Sets the lifecycle_details of this AutonomousDatabaseSummary. - Additional information about the current lifecycle state. + Information about the current lifecycle state. :param lifecycle_details: The lifecycle_details of this AutonomousDatabaseSummary. @@ -489,7 +524,7 @@ def lifecycle_state(self): **[Required]** Gets the lifecycle_state of this AutonomousDatabaseSummary. The current state of the database. - Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -508,7 +543,7 @@ def lifecycle_state(self, lifecycle_state): :param lifecycle_state: The lifecycle_state of this AutonomousDatabaseSummary. :type: str """ - allowed_values = ["PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION"] + allowed_values = ["PROVISIONING", "AVAILABLE", "STOPPING", "STOPPED", "STARTING", "TERMINATING", "TERMINATED", "UNAVAILABLE", "RESTORE_IN_PROGRESS", "RESTORE_FAILED", "BACKUP_IN_PROGRESS", "SCALE_IN_PROGRESS", "AVAILABLE_NEEDS_ATTENTION"] if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state diff --git a/src/oci/database/models/backup.py b/src/oci/database/models/backup.py index 4b620d6060..402a5e899a 100644 --- a/src/oci/database/models/backup.py +++ b/src/oci/database/models/backup.py @@ -17,6 +17,22 @@ class Backup(object): __ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm """ + #: A constant which can be used with the database_edition property of a Backup. + #: This constant has a value of "STANDARD_EDITION" + DATABASE_EDITION_STANDARD_EDITION = "STANDARD_EDITION" + + #: A constant which can be used with the database_edition property of a Backup. + #: This constant has a value of "ENTERPRISE_EDITION" + DATABASE_EDITION_ENTERPRISE_EDITION = "ENTERPRISE_EDITION" + + #: A constant which can be used with the database_edition property of a Backup. + #: This constant has a value of "ENTERPRISE_EDITION_HIGH_PERFORMANCE" + DATABASE_EDITION_ENTERPRISE_EDITION_HIGH_PERFORMANCE = "ENTERPRISE_EDITION_HIGH_PERFORMANCE" + + #: A constant which can be used with the database_edition property of a Backup. + #: This constant has a value of "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" + DATABASE_EDITION_ENTERPRISE_EDITION_EXTREME_PERFORMANCE = "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" + #: A constant which can be used with the lifecycle_state property of a Backup. #: This constant has a value of "CREATING" LIFECYCLE_STATE_CREATING = "CREATING" @@ -64,15 +80,17 @@ def __init__(self, **kwargs): :param database_edition: The value to assign to the database_edition property of this Backup. + Allowed values for this property are: "STANDARD_EDITION", "ENTERPRISE_EDITION", "ENTERPRISE_EDITION_HIGH_PERFORMANCE", "ENTERPRISE_EDITION_EXTREME_PERFORMANCE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type database_edition: str :param database_id: The value to assign to the database_id property of this Backup. :type database_id: str - :param db_data_size_in_mbs: - The value to assign to the db_data_size_in_mbs property of this Backup. - :type db_data_size_in_mbs: int + :param database_size_in_g_bs: + The value to assign to the database_size_in_g_bs property of this Backup. + :type database_size_in_g_bs: float :param display_name: The value to assign to the display_name property of this Backup. @@ -112,7 +130,7 @@ def __init__(self, **kwargs): 'compartment_id': 'str', 'database_edition': 'str', 'database_id': 'str', - 'db_data_size_in_mbs': 'int', + 'database_size_in_g_bs': 'float', 'display_name': 'str', 'id': 'str', 'lifecycle_details': 'str', @@ -127,7 +145,7 @@ def __init__(self, **kwargs): 'compartment_id': 'compartmentId', 'database_edition': 'databaseEdition', 'database_id': 'databaseId', - 'db_data_size_in_mbs': 'dbDataSizeInMBs', + 'database_size_in_g_bs': 'databaseSizeInGBs', 'display_name': 'displayName', 'id': 'id', 'lifecycle_details': 'lifecycleDetails', @@ -141,7 +159,7 @@ def __init__(self, **kwargs): self._compartment_id = None self._database_edition = None self._database_id = None - self._db_data_size_in_mbs = None + self._database_size_in_g_bs = None self._display_name = None self._id = None self._lifecycle_details = None @@ -208,6 +226,9 @@ def database_edition(self): Gets the database_edition of this Backup. The Oracle Database edition of the DB system from which the database backup was taken. + Allowed values for this property are: "STANDARD_EDITION", "ENTERPRISE_EDITION", "ENTERPRISE_EDITION_HIGH_PERFORMANCE", "ENTERPRISE_EDITION_EXTREME_PERFORMANCE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :return: The database_edition of this Backup. :rtype: str @@ -224,6 +245,9 @@ def database_edition(self, database_edition): :param database_edition: The database_edition of this Backup. :type: str """ + allowed_values = ["STANDARD_EDITION", "ENTERPRISE_EDITION", "ENTERPRISE_EDITION_HIGH_PERFORMANCE", "ENTERPRISE_EDITION_EXTREME_PERFORMANCE"] + if not value_allowed_none_or_none_sentinel(database_edition, allowed_values): + database_edition = 'UNKNOWN_ENUM_VALUE' self._database_edition = database_edition @property @@ -255,28 +279,28 @@ def database_id(self, database_id): self._database_id = database_id @property - def db_data_size_in_mbs(self): + def database_size_in_g_bs(self): """ - Gets the db_data_size_in_mbs of this Backup. - Size of the database in megabytes (MB) at the time the backup was taken. + Gets the database_size_in_g_bs of this Backup. + The size of the database in gigabytes at the time the backup was taken. - :return: The db_data_size_in_mbs of this Backup. - :rtype: int + :return: The database_size_in_g_bs of this Backup. + :rtype: float """ - return self._db_data_size_in_mbs + return self._database_size_in_g_bs - @db_data_size_in_mbs.setter - def db_data_size_in_mbs(self, db_data_size_in_mbs): + @database_size_in_g_bs.setter + def database_size_in_g_bs(self, database_size_in_g_bs): """ - Sets the db_data_size_in_mbs of this Backup. - Size of the database in megabytes (MB) at the time the backup was taken. + Sets the database_size_in_g_bs of this Backup. + The size of the database in gigabytes at the time the backup was taken. - :param db_data_size_in_mbs: The db_data_size_in_mbs of this Backup. - :type: int + :param database_size_in_g_bs: The database_size_in_g_bs of this Backup. + :type: float """ - self._db_data_size_in_mbs = db_data_size_in_mbs + self._database_size_in_g_bs = database_size_in_g_bs @property def display_name(self): diff --git a/src/oci/database/models/backup_summary.py b/src/oci/database/models/backup_summary.py index cb1c7a30ab..72b407b32b 100644 --- a/src/oci/database/models/backup_summary.py +++ b/src/oci/database/models/backup_summary.py @@ -17,6 +17,22 @@ class BackupSummary(object): __ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm """ + #: A constant which can be used with the database_edition property of a BackupSummary. + #: This constant has a value of "STANDARD_EDITION" + DATABASE_EDITION_STANDARD_EDITION = "STANDARD_EDITION" + + #: A constant which can be used with the database_edition property of a BackupSummary. + #: This constant has a value of "ENTERPRISE_EDITION" + DATABASE_EDITION_ENTERPRISE_EDITION = "ENTERPRISE_EDITION" + + #: A constant which can be used with the database_edition property of a BackupSummary. + #: This constant has a value of "ENTERPRISE_EDITION_HIGH_PERFORMANCE" + DATABASE_EDITION_ENTERPRISE_EDITION_HIGH_PERFORMANCE = "ENTERPRISE_EDITION_HIGH_PERFORMANCE" + + #: A constant which can be used with the database_edition property of a BackupSummary. + #: This constant has a value of "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" + DATABASE_EDITION_ENTERPRISE_EDITION_EXTREME_PERFORMANCE = "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" + #: A constant which can be used with the lifecycle_state property of a BackupSummary. #: This constant has a value of "CREATING" LIFECYCLE_STATE_CREATING = "CREATING" @@ -64,15 +80,17 @@ def __init__(self, **kwargs): :param database_edition: The value to assign to the database_edition property of this BackupSummary. + Allowed values for this property are: "STANDARD_EDITION", "ENTERPRISE_EDITION", "ENTERPRISE_EDITION_HIGH_PERFORMANCE", "ENTERPRISE_EDITION_EXTREME_PERFORMANCE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type database_edition: str :param database_id: The value to assign to the database_id property of this BackupSummary. :type database_id: str - :param db_data_size_in_mbs: - The value to assign to the db_data_size_in_mbs property of this BackupSummary. - :type db_data_size_in_mbs: int + :param database_size_in_g_bs: + The value to assign to the database_size_in_g_bs property of this BackupSummary. + :type database_size_in_g_bs: float :param display_name: The value to assign to the display_name property of this BackupSummary. @@ -112,7 +130,7 @@ def __init__(self, **kwargs): 'compartment_id': 'str', 'database_edition': 'str', 'database_id': 'str', - 'db_data_size_in_mbs': 'int', + 'database_size_in_g_bs': 'float', 'display_name': 'str', 'id': 'str', 'lifecycle_details': 'str', @@ -127,7 +145,7 @@ def __init__(self, **kwargs): 'compartment_id': 'compartmentId', 'database_edition': 'databaseEdition', 'database_id': 'databaseId', - 'db_data_size_in_mbs': 'dbDataSizeInMBs', + 'database_size_in_g_bs': 'databaseSizeInGBs', 'display_name': 'displayName', 'id': 'id', 'lifecycle_details': 'lifecycleDetails', @@ -141,7 +159,7 @@ def __init__(self, **kwargs): self._compartment_id = None self._database_edition = None self._database_id = None - self._db_data_size_in_mbs = None + self._database_size_in_g_bs = None self._display_name = None self._id = None self._lifecycle_details = None @@ -208,6 +226,9 @@ def database_edition(self): Gets the database_edition of this BackupSummary. The Oracle Database edition of the DB system from which the database backup was taken. + Allowed values for this property are: "STANDARD_EDITION", "ENTERPRISE_EDITION", "ENTERPRISE_EDITION_HIGH_PERFORMANCE", "ENTERPRISE_EDITION_EXTREME_PERFORMANCE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :return: The database_edition of this BackupSummary. :rtype: str @@ -224,6 +245,9 @@ def database_edition(self, database_edition): :param database_edition: The database_edition of this BackupSummary. :type: str """ + allowed_values = ["STANDARD_EDITION", "ENTERPRISE_EDITION", "ENTERPRISE_EDITION_HIGH_PERFORMANCE", "ENTERPRISE_EDITION_EXTREME_PERFORMANCE"] + if not value_allowed_none_or_none_sentinel(database_edition, allowed_values): + database_edition = 'UNKNOWN_ENUM_VALUE' self._database_edition = database_edition @property @@ -255,28 +279,28 @@ def database_id(self, database_id): self._database_id = database_id @property - def db_data_size_in_mbs(self): + def database_size_in_g_bs(self): """ - Gets the db_data_size_in_mbs of this BackupSummary. - Size of the database in megabytes (MB) at the time the backup was taken. + Gets the database_size_in_g_bs of this BackupSummary. + The size of the database in gigabytes at the time the backup was taken. - :return: The db_data_size_in_mbs of this BackupSummary. - :rtype: int + :return: The database_size_in_g_bs of this BackupSummary. + :rtype: float """ - return self._db_data_size_in_mbs + return self._database_size_in_g_bs - @db_data_size_in_mbs.setter - def db_data_size_in_mbs(self, db_data_size_in_mbs): + @database_size_in_g_bs.setter + def database_size_in_g_bs(self, database_size_in_g_bs): """ - Sets the db_data_size_in_mbs of this BackupSummary. - Size of the database in megabytes (MB) at the time the backup was taken. + Sets the database_size_in_g_bs of this BackupSummary. + The size of the database in gigabytes at the time the backup was taken. - :param db_data_size_in_mbs: The db_data_size_in_mbs of this BackupSummary. - :type: int + :param database_size_in_g_bs: The database_size_in_g_bs of this BackupSummary. + :type: float """ - self._db_data_size_in_mbs = db_data_size_in_mbs + self._database_size_in_g_bs = database_size_in_g_bs @property def display_name(self): diff --git a/src/oci/database/models/complete_external_backup_job_details.py b/src/oci/database/models/complete_external_backup_job_details.py new file mode 100644 index 0000000000..a2f1f496b7 --- /dev/null +++ b/src/oci/database/models/complete_external_backup_job_details.py @@ -0,0 +1,224 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 CompleteExternalBackupJobDetails(object): + """ + CompleteExternalBackupJobDetails model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CompleteExternalBackupJobDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param cf_backup_handle: + The value to assign to the cf_backup_handle property of this CompleteExternalBackupJobDetails. + :type cf_backup_handle: str + + :param data_size: + The value to assign to the data_size property of this CompleteExternalBackupJobDetails. + :type data_size: int + + :param redo_size: + The value to assign to the redo_size property of this CompleteExternalBackupJobDetails. + :type redo_size: int + + :param spf_backup_handle: + The value to assign to the spf_backup_handle property of this CompleteExternalBackupJobDetails. + :type spf_backup_handle: str + + :param sql_patches: + The value to assign to the sql_patches property of this CompleteExternalBackupJobDetails. + :type sql_patches: list[str] + + :param tde_wallet_path: + The value to assign to the tde_wallet_path property of this CompleteExternalBackupJobDetails. + :type tde_wallet_path: str + + """ + self.swagger_types = { + 'cf_backup_handle': 'str', + 'data_size': 'int', + 'redo_size': 'int', + 'spf_backup_handle': 'str', + 'sql_patches': 'list[str]', + 'tde_wallet_path': 'str' + } + + self.attribute_map = { + 'cf_backup_handle': 'cfBackupHandle', + 'data_size': 'dataSize', + 'redo_size': 'redoSize', + 'spf_backup_handle': 'spfBackupHandle', + 'sql_patches': 'sqlPatches', + 'tde_wallet_path': 'tdeWalletPath' + } + + self._cf_backup_handle = None + self._data_size = None + self._redo_size = None + self._spf_backup_handle = None + self._sql_patches = None + self._tde_wallet_path = None + + @property + def cf_backup_handle(self): + """ + Gets the cf_backup_handle of this CompleteExternalBackupJobDetails. + The handle of the control file backup. + + + :return: The cf_backup_handle of this CompleteExternalBackupJobDetails. + :rtype: str + """ + return self._cf_backup_handle + + @cf_backup_handle.setter + def cf_backup_handle(self, cf_backup_handle): + """ + Sets the cf_backup_handle of this CompleteExternalBackupJobDetails. + The handle of the control file backup. + + + :param cf_backup_handle: The cf_backup_handle of this CompleteExternalBackupJobDetails. + :type: str + """ + self._cf_backup_handle = cf_backup_handle + + @property + def data_size(self): + """ + Gets the data_size of this CompleteExternalBackupJobDetails. + The size of the data in the database, in megabytes. + + + :return: The data_size of this CompleteExternalBackupJobDetails. + :rtype: int + """ + return self._data_size + + @data_size.setter + def data_size(self, data_size): + """ + Sets the data_size of this CompleteExternalBackupJobDetails. + The size of the data in the database, in megabytes. + + + :param data_size: The data_size of this CompleteExternalBackupJobDetails. + :type: int + """ + self._data_size = data_size + + @property + def redo_size(self): + """ + Gets the redo_size of this CompleteExternalBackupJobDetails. + The size of the redo in the database, in megabytes. + + + :return: The redo_size of this CompleteExternalBackupJobDetails. + :rtype: int + """ + return self._redo_size + + @redo_size.setter + def redo_size(self, redo_size): + """ + Sets the redo_size of this CompleteExternalBackupJobDetails. + The size of the redo in the database, in megabytes. + + + :param redo_size: The redo_size of this CompleteExternalBackupJobDetails. + :type: int + """ + self._redo_size = redo_size + + @property + def spf_backup_handle(self): + """ + Gets the spf_backup_handle of this CompleteExternalBackupJobDetails. + The handle of the spfile backup. + + + :return: The spf_backup_handle of this CompleteExternalBackupJobDetails. + :rtype: str + """ + return self._spf_backup_handle + + @spf_backup_handle.setter + def spf_backup_handle(self, spf_backup_handle): + """ + Sets the spf_backup_handle of this CompleteExternalBackupJobDetails. + The handle of the spfile backup. + + + :param spf_backup_handle: The spf_backup_handle of this CompleteExternalBackupJobDetails. + :type: str + """ + self._spf_backup_handle = spf_backup_handle + + @property + def sql_patches(self): + """ + Gets the sql_patches of this CompleteExternalBackupJobDetails. + The list of SQL patches that need to be applied to the backup during the restore. + + + :return: The sql_patches of this CompleteExternalBackupJobDetails. + :rtype: list[str] + """ + return self._sql_patches + + @sql_patches.setter + def sql_patches(self, sql_patches): + """ + Sets the sql_patches of this CompleteExternalBackupJobDetails. + The list of SQL patches that need to be applied to the backup during the restore. + + + :param sql_patches: The sql_patches of this CompleteExternalBackupJobDetails. + :type: list[str] + """ + self._sql_patches = sql_patches + + @property + def tde_wallet_path(self): + """ + Gets the tde_wallet_path of this CompleteExternalBackupJobDetails. + If the database being backed up is TDE enabled, this will be the path to the associated TDE wallet in Object Storage. + + + :return: The tde_wallet_path of this CompleteExternalBackupJobDetails. + :rtype: str + """ + return self._tde_wallet_path + + @tde_wallet_path.setter + def tde_wallet_path(self, tde_wallet_path): + """ + Sets the tde_wallet_path of this CompleteExternalBackupJobDetails. + If the database being backed up is TDE enabled, this will be the path to the associated TDE wallet in Object Storage. + + + :param tde_wallet_path: The tde_wallet_path of this CompleteExternalBackupJobDetails. + :type: str + """ + self._tde_wallet_path = tde_wallet_path + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/database/models/create_external_backup_job_details.py b/src/oci/database/models/create_external_backup_job_details.py new file mode 100644 index 0000000000..f4a395ba99 --- /dev/null +++ b/src/oci/database/models/create_external_backup_job_details.py @@ -0,0 +1,458 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 CreateExternalBackupJobDetails(object): + """ + CreateExternalBackupJobDetails model. + """ + + #: A constant which can be used with the database_edition property of a CreateExternalBackupJobDetails. + #: This constant has a value of "STANDARD_EDITION" + DATABASE_EDITION_STANDARD_EDITION = "STANDARD_EDITION" + + #: A constant which can be used with the database_edition property of a CreateExternalBackupJobDetails. + #: This constant has a value of "ENTERPRISE_EDITION" + DATABASE_EDITION_ENTERPRISE_EDITION = "ENTERPRISE_EDITION" + + #: A constant which can be used with the database_edition property of a CreateExternalBackupJobDetails. + #: This constant has a value of "ENTERPRISE_EDITION_HIGH_PERFORMANCE" + DATABASE_EDITION_ENTERPRISE_EDITION_HIGH_PERFORMANCE = "ENTERPRISE_EDITION_HIGH_PERFORMANCE" + + #: A constant which can be used with the database_edition property of a CreateExternalBackupJobDetails. + #: This constant has a value of "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" + DATABASE_EDITION_ENTERPRISE_EDITION_EXTREME_PERFORMANCE = "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" + + #: A constant which can be used with the database_mode property of a CreateExternalBackupJobDetails. + #: This constant has a value of "SI" + DATABASE_MODE_SI = "SI" + + #: A constant which can be used with the database_mode property of a CreateExternalBackupJobDetails. + #: This constant has a value of "RAC" + DATABASE_MODE_RAC = "RAC" + + def __init__(self, **kwargs): + """ + Initializes a new CreateExternalBackupJobDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param availability_domain: + The value to assign to the availability_domain property of this CreateExternalBackupJobDetails. + :type availability_domain: str + + :param character_set: + The value to assign to the character_set property of this CreateExternalBackupJobDetails. + :type character_set: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateExternalBackupJobDetails. + :type compartment_id: str + + :param database_edition: + The value to assign to the database_edition property of this CreateExternalBackupJobDetails. + Allowed values for this property are: "STANDARD_EDITION", "ENTERPRISE_EDITION", "ENTERPRISE_EDITION_HIGH_PERFORMANCE", "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" + :type database_edition: str + + :param database_mode: + The value to assign to the database_mode property of this CreateExternalBackupJobDetails. + Allowed values for this property are: "SI", "RAC" + :type database_mode: str + + :param db_name: + The value to assign to the db_name property of this CreateExternalBackupJobDetails. + :type db_name: str + + :param db_unique_name: + The value to assign to the db_unique_name property of this CreateExternalBackupJobDetails. + :type db_unique_name: str + + :param db_version: + The value to assign to the db_version property of this CreateExternalBackupJobDetails. + :type db_version: str + + :param display_name: + The value to assign to the display_name property of this CreateExternalBackupJobDetails. + :type display_name: str + + :param external_database_identifier: + The value to assign to the external_database_identifier property of this CreateExternalBackupJobDetails. + :type external_database_identifier: int + + :param ncharacter_set: + The value to assign to the ncharacter_set property of this CreateExternalBackupJobDetails. + :type ncharacter_set: str + + :param pdb_name: + The value to assign to the pdb_name property of this CreateExternalBackupJobDetails. + :type pdb_name: str + + """ + self.swagger_types = { + 'availability_domain': 'str', + 'character_set': 'str', + 'compartment_id': 'str', + 'database_edition': 'str', + 'database_mode': 'str', + 'db_name': 'str', + 'db_unique_name': 'str', + 'db_version': 'str', + 'display_name': 'str', + 'external_database_identifier': 'int', + 'ncharacter_set': 'str', + 'pdb_name': 'str' + } + + self.attribute_map = { + 'availability_domain': 'availabilityDomain', + 'character_set': 'characterSet', + 'compartment_id': 'compartmentId', + 'database_edition': 'databaseEdition', + 'database_mode': 'databaseMode', + 'db_name': 'dbName', + 'db_unique_name': 'dbUniqueName', + 'db_version': 'dbVersion', + 'display_name': 'displayName', + 'external_database_identifier': 'externalDatabaseIdentifier', + 'ncharacter_set': 'ncharacterSet', + 'pdb_name': 'pdbName' + } + + self._availability_domain = None + self._character_set = None + self._compartment_id = None + self._database_edition = None + self._database_mode = None + self._db_name = None + self._db_unique_name = None + self._db_version = None + self._display_name = None + self._external_database_identifier = None + self._ncharacter_set = None + self._pdb_name = None + + @property + def availability_domain(self): + """ + **[Required]** Gets the availability_domain of this CreateExternalBackupJobDetails. + The targeted availability domain for the backup. + + + :return: The availability_domain of this CreateExternalBackupJobDetails. + :rtype: str + """ + return self._availability_domain + + @availability_domain.setter + def availability_domain(self, availability_domain): + """ + Sets the availability_domain of this CreateExternalBackupJobDetails. + The targeted availability domain for the backup. + + + :param availability_domain: The availability_domain of this CreateExternalBackupJobDetails. + :type: str + """ + self._availability_domain = availability_domain + + @property + def character_set(self): + """ + **[Required]** Gets the character_set of this CreateExternalBackupJobDetails. + The character set for the database. + + + :return: The character_set of this CreateExternalBackupJobDetails. + :rtype: str + """ + return self._character_set + + @character_set.setter + def character_set(self, character_set): + """ + Sets the character_set of this CreateExternalBackupJobDetails. + The character set for the database. + + + :param character_set: The character_set of this CreateExternalBackupJobDetails. + :type: str + """ + self._character_set = character_set + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateExternalBackupJobDetails. + The `OCID`__ of the compartment where this backup should be created. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateExternalBackupJobDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateExternalBackupJobDetails. + The `OCID`__ of the compartment where this backup should be created. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateExternalBackupJobDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def database_edition(self): + """ + **[Required]** Gets the database_edition of this CreateExternalBackupJobDetails. + The Oracle Database edition to use for creating a database from this standalone backup. + Note that 2-node RAC DB systems require Enterprise Edition - Extreme Performance. + + Allowed values for this property are: "STANDARD_EDITION", "ENTERPRISE_EDITION", "ENTERPRISE_EDITION_HIGH_PERFORMANCE", "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" + + + :return: The database_edition of this CreateExternalBackupJobDetails. + :rtype: str + """ + return self._database_edition + + @database_edition.setter + def database_edition(self, database_edition): + """ + Sets the database_edition of this CreateExternalBackupJobDetails. + The Oracle Database edition to use for creating a database from this standalone backup. + Note that 2-node RAC DB systems require Enterprise Edition - Extreme Performance. + + + :param database_edition: The database_edition of this CreateExternalBackupJobDetails. + :type: str + """ + allowed_values = ["STANDARD_EDITION", "ENTERPRISE_EDITION", "ENTERPRISE_EDITION_HIGH_PERFORMANCE", "ENTERPRISE_EDITION_EXTREME_PERFORMANCE"] + if not value_allowed_none_or_none_sentinel(database_edition, allowed_values): + raise ValueError( + "Invalid value for `database_edition`, must be None or one of {0}" + .format(allowed_values) + ) + self._database_edition = database_edition + + @property + def database_mode(self): + """ + **[Required]** Gets the database_mode of this CreateExternalBackupJobDetails. + The mode (single instance or RAC) of the database being backed up. + + Allowed values for this property are: "SI", "RAC" + + + :return: The database_mode of this CreateExternalBackupJobDetails. + :rtype: str + """ + return self._database_mode + + @database_mode.setter + def database_mode(self, database_mode): + """ + Sets the database_mode of this CreateExternalBackupJobDetails. + The mode (single instance or RAC) of the database being backed up. + + + :param database_mode: The database_mode of this CreateExternalBackupJobDetails. + :type: str + """ + allowed_values = ["SI", "RAC"] + if not value_allowed_none_or_none_sentinel(database_mode, allowed_values): + raise ValueError( + "Invalid value for `database_mode`, must be None or one of {0}" + .format(allowed_values) + ) + self._database_mode = database_mode + + @property + def db_name(self): + """ + **[Required]** Gets the db_name of this CreateExternalBackupJobDetails. + The name of the database from which the backup is being taken. + + + :return: The db_name of this CreateExternalBackupJobDetails. + :rtype: str + """ + return self._db_name + + @db_name.setter + def db_name(self, db_name): + """ + Sets the db_name of this CreateExternalBackupJobDetails. + The name of the database from which the backup is being taken. + + + :param db_name: The db_name of this CreateExternalBackupJobDetails. + :type: str + """ + self._db_name = db_name + + @property + def db_unique_name(self): + """ + Gets the db_unique_name of this CreateExternalBackupJobDetails. + The `DB_UNIQUE_NAME` of the Oracle Database being backed up. + + + :return: The db_unique_name of this CreateExternalBackupJobDetails. + :rtype: str + """ + return self._db_unique_name + + @db_unique_name.setter + def db_unique_name(self, db_unique_name): + """ + Sets the db_unique_name of this CreateExternalBackupJobDetails. + The `DB_UNIQUE_NAME` of the Oracle Database being backed up. + + + :param db_unique_name: The db_unique_name of this CreateExternalBackupJobDetails. + :type: str + """ + self._db_unique_name = db_unique_name + + @property + def db_version(self): + """ + **[Required]** Gets the db_version of this CreateExternalBackupJobDetails. + A valid Oracle Database version. + + + :return: The db_version of this CreateExternalBackupJobDetails. + :rtype: str + """ + return self._db_version + + @db_version.setter + def db_version(self, db_version): + """ + Sets the db_version of this CreateExternalBackupJobDetails. + A valid Oracle Database version. + + + :param db_version: The db_version of this CreateExternalBackupJobDetails. + :type: str + """ + self._db_version = db_version + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this CreateExternalBackupJobDetails. + A user-friendly name for the backup. This name does not have to be unique. + + + :return: The display_name of this CreateExternalBackupJobDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateExternalBackupJobDetails. + A user-friendly name for the backup. This name does not have to be unique. + + + :param display_name: The display_name of this CreateExternalBackupJobDetails. + :type: str + """ + self._display_name = display_name + + @property + def external_database_identifier(self): + """ + **[Required]** Gets the external_database_identifier of this CreateExternalBackupJobDetails. + The `DBID` of the Oracle Database being backed up. + + + :return: The external_database_identifier of this CreateExternalBackupJobDetails. + :rtype: int + """ + return self._external_database_identifier + + @external_database_identifier.setter + def external_database_identifier(self, external_database_identifier): + """ + Sets the external_database_identifier of this CreateExternalBackupJobDetails. + The `DBID` of the Oracle Database being backed up. + + + :param external_database_identifier: The external_database_identifier of this CreateExternalBackupJobDetails. + :type: int + """ + self._external_database_identifier = external_database_identifier + + @property + def ncharacter_set(self): + """ + **[Required]** Gets the ncharacter_set of this CreateExternalBackupJobDetails. + The national character set for the database. + + + :return: The ncharacter_set of this CreateExternalBackupJobDetails. + :rtype: str + """ + return self._ncharacter_set + + @ncharacter_set.setter + def ncharacter_set(self, ncharacter_set): + """ + Sets the ncharacter_set of this CreateExternalBackupJobDetails. + The national character set for the database. + + + :param ncharacter_set: The ncharacter_set of this CreateExternalBackupJobDetails. + :type: str + """ + self._ncharacter_set = ncharacter_set + + @property + def pdb_name(self): + """ + Gets the pdb_name of this CreateExternalBackupJobDetails. + The pluggable database name. + + + :return: The pdb_name of this CreateExternalBackupJobDetails. + :rtype: str + """ + return self._pdb_name + + @pdb_name.setter + def pdb_name(self, pdb_name): + """ + Sets the pdb_name of this CreateExternalBackupJobDetails. + The pluggable database name. + + + :param pdb_name: The pdb_name of this CreateExternalBackupJobDetails. + :type: str + """ + self._pdb_name = pdb_name + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/database/models/external_backup_job.py b/src/oci/database/models/external_backup_job.py new file mode 100644 index 0000000000..837aeade38 --- /dev/null +++ b/src/oci/database/models/external_backup_job.py @@ -0,0 +1,265 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 ExternalBackupJob(object): + """ + Provides all the details that apply to an external backup job. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ExternalBackupJob object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param backup_id: + The value to assign to the backup_id property of this ExternalBackupJob. + :type backup_id: str + + :param bucket_name: + The value to assign to the bucket_name property of this ExternalBackupJob. + :type bucket_name: str + + :param provisioning: + The value to assign to the provisioning property of this ExternalBackupJob. + :type provisioning: bool + + :param swift_password: + The value to assign to the swift_password property of this ExternalBackupJob. + :type swift_password: str + + :param swift_path: + The value to assign to the swift_path property of this ExternalBackupJob. + :type swift_path: str + + :param tag: + The value to assign to the tag property of this ExternalBackupJob. + :type tag: str + + :param user_name: + The value to assign to the user_name property of this ExternalBackupJob. + :type user_name: str + + """ + self.swagger_types = { + 'backup_id': 'str', + 'bucket_name': 'str', + 'provisioning': 'bool', + 'swift_password': 'str', + 'swift_path': 'str', + 'tag': 'str', + 'user_name': 'str' + } + + self.attribute_map = { + 'backup_id': 'backupId', + 'bucket_name': 'bucketName', + 'provisioning': 'provisioning', + 'swift_password': 'swiftPassword', + 'swift_path': 'swiftPath', + 'tag': 'tag', + 'user_name': 'userName' + } + + self._backup_id = None + self._bucket_name = None + self._provisioning = None + self._swift_password = None + self._swift_path = None + self._tag = None + self._user_name = None + + @property + def backup_id(self): + """ + **[Required]** Gets the backup_id of this ExternalBackupJob. + The `OCID`__ of the associated backup resource. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm + + + :return: The backup_id of this ExternalBackupJob. + :rtype: str + """ + return self._backup_id + + @backup_id.setter + def backup_id(self, backup_id): + """ + Sets the backup_id of this ExternalBackupJob. + The `OCID`__ of the associated backup resource. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm + + + :param backup_id: The backup_id of this ExternalBackupJob. + :type: str + """ + self._backup_id = backup_id + + @property + def bucket_name(self): + """ + **[Required]** Gets the bucket_name of this ExternalBackupJob. + The name of the Swift compartment bucket where the backup should be stored. + + + :return: The bucket_name of this ExternalBackupJob. + :rtype: str + """ + return self._bucket_name + + @bucket_name.setter + def bucket_name(self, bucket_name): + """ + Sets the bucket_name of this ExternalBackupJob. + The name of the Swift compartment bucket where the backup should be stored. + + + :param bucket_name: The bucket_name of this ExternalBackupJob. + :type: str + """ + self._bucket_name = bucket_name + + @property + def provisioning(self): + """ + **[Required]** Gets the provisioning of this ExternalBackupJob. + An indicator for the provisioning state of the resource. If `TRUE`, the resource is still being provisioned. + + + :return: The provisioning of this ExternalBackupJob. + :rtype: bool + """ + return self._provisioning + + @provisioning.setter + def provisioning(self, provisioning): + """ + Sets the provisioning of this ExternalBackupJob. + An indicator for the provisioning state of the resource. If `TRUE`, the resource is still being provisioned. + + + :param provisioning: The provisioning of this ExternalBackupJob. + :type: bool + """ + self._provisioning = provisioning + + @property + def swift_password(self): + """ + Gets the swift_password of this ExternalBackupJob. + The auth token to use for access to the Swift compartment bucket that will store the standalone backup. + For information about auth tokens, see `Working with Auth Tokens`__. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm#two + + + :return: The swift_password of this ExternalBackupJob. + :rtype: str + """ + return self._swift_password + + @swift_password.setter + def swift_password(self, swift_password): + """ + Sets the swift_password of this ExternalBackupJob. + The auth token to use for access to the Swift compartment bucket that will store the standalone backup. + For information about auth tokens, see `Working with Auth Tokens`__. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm#two + + + :param swift_password: The swift_password of this ExternalBackupJob. + :type: str + """ + self._swift_password = swift_password + + @property + def swift_path(self): + """ + **[Required]** Gets the swift_path of this ExternalBackupJob. + The Swift path to use as a destination for the standalone backup. + + + :return: The swift_path of this ExternalBackupJob. + :rtype: str + """ + return self._swift_path + + @swift_path.setter + def swift_path(self, swift_path): + """ + Sets the swift_path of this ExternalBackupJob. + The Swift path to use as a destination for the standalone backup. + + + :param swift_path: The swift_path of this ExternalBackupJob. + :type: str + """ + self._swift_path = swift_path + + @property + def tag(self): + """ + **[Required]** Gets the tag of this ExternalBackupJob. + The tag for RMAN to apply to the backup. + + + :return: The tag of this ExternalBackupJob. + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """ + Sets the tag of this ExternalBackupJob. + The tag for RMAN to apply to the backup. + + + :param tag: The tag of this ExternalBackupJob. + :type: str + """ + self._tag = tag + + @property + def user_name(self): + """ + **[Required]** Gets the user_name of this ExternalBackupJob. + The Swift user name to use for transferring the standalone backup to the designated Swift compartment bucket. + + + :return: The user_name of this ExternalBackupJob. + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """ + Sets the user_name of this ExternalBackupJob. + The Swift user name to use for transferring the standalone backup to the designated Swift compartment bucket. + + + :param user_name: The user_name of this ExternalBackupJob. + :type: str + """ + self._user_name = user_name + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/database/models/generate_autonomous_data_warehouse_wallet_details.py b/src/oci/database/models/generate_autonomous_data_warehouse_wallet_details.py new file mode 100644 index 0000000000..c75c0f74bf --- /dev/null +++ b/src/oci/database/models/generate_autonomous_data_warehouse_wallet_details.py @@ -0,0 +1,69 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 GenerateAutonomousDataWarehouseWalletDetails(object): + """ + Details to create and download a wallet for an Oracle Autonomous Data Warehouse. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GenerateAutonomousDataWarehouseWalletDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param password: + The value to assign to the password property of this GenerateAutonomousDataWarehouseWalletDetails. + :type password: str + + """ + self.swagger_types = { + 'password': 'str' + } + + self.attribute_map = { + 'password': 'password' + } + + self._password = None + + @property + def password(self): + """ + **[Required]** Gets the password of this GenerateAutonomousDataWarehouseWalletDetails. + The password to encrypt the keys inside the wallet. + + + :return: The password of this GenerateAutonomousDataWarehouseWalletDetails. + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """ + Sets the password of this GenerateAutonomousDataWarehouseWalletDetails. + The password to encrypt the keys inside the wallet. + + + :param password: The password of this GenerateAutonomousDataWarehouseWalletDetails. + :type: str + """ + self._password = password + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/database/models/generate_autonomous_database_wallet_details.py b/src/oci/database/models/generate_autonomous_database_wallet_details.py new file mode 100644 index 0000000000..8c19edd484 --- /dev/null +++ b/src/oci/database/models/generate_autonomous_database_wallet_details.py @@ -0,0 +1,69 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 GenerateAutonomousDatabaseWalletDetails(object): + """ + Details to create and download an Oracle Autonomous Transaction Processing database wallet. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GenerateAutonomousDatabaseWalletDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param password: + The value to assign to the password property of this GenerateAutonomousDatabaseWalletDetails. + :type password: str + + """ + self.swagger_types = { + 'password': 'str' + } + + self.attribute_map = { + 'password': 'password' + } + + self._password = None + + @property + def password(self): + """ + **[Required]** Gets the password of this GenerateAutonomousDatabaseWalletDetails. + The password to encrypt the keys inside the wallet. + + + :return: The password of this GenerateAutonomousDatabaseWalletDetails. + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """ + Sets the password of this GenerateAutonomousDatabaseWalletDetails. + The password to encrypt the keys inside the wallet. + + + :param password: The password of this GenerateAutonomousDatabaseWalletDetails. + :type: str + """ + self._password = password + + 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/dns/dns_client.py b/src/oci/dns/dns_client.py index baf5498894..b916a2bad4 100644 --- a/src/oci/dns/dns_client.py +++ b/src/oci/dns/dns_client.py @@ -73,7 +73,8 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/20180115' + 'base_path': '/20180115', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("dns", config, signer, dns_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') diff --git a/src/oci/email/email_client.py b/src/oci/email/email_client.py index b9037a53d4..08c4665089 100644 --- a/src/oci/email/email_client.py +++ b/src/oci/email/email_client.py @@ -73,7 +73,8 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/20170907' + 'base_path': '/20170907', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("email", config, signer, email_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') diff --git a/src/oci/file_storage/file_storage_client.py b/src/oci/file_storage/file_storage_client.py index d19eefc058..cfa9a61002 100644 --- a/src/oci/file_storage/file_storage_client.py +++ b/src/oci/file_storage/file_storage_client.py @@ -73,7 +73,8 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/20171215' + 'base_path': '/20171215', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("file_storage", config, signer, file_storage_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') diff --git a/src/oci/identity/identity_client.py b/src/oci/identity/identity_client.py index 25359c1c89..af673ed263 100644 --- a/src/oci/identity/identity_client.py +++ b/src/oci/identity/identity_client.py @@ -73,7 +73,8 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/20160918' + 'base_path': '/20160918', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("identity", config, signer, identity_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') @@ -248,11 +249,11 @@ def create_auth_token(self, create_auth_token_details, user_id, **kwargs): def create_compartment(self, create_compartment_details, **kwargs): """ CreateCompartment - Creates a new compartment in your tenancy. + Creates a new compartment in the specified compartment. **Important:** Compartments cannot be deleted. - You must specify your tenancy's OCID as the compartment ID in the request object. Remember that the tenancy + Specify the parent compartment's OCID as the compartment ID in the request object. Remember that the tenancy is simply the root compartment. For information about OCIDs, see `Resource Identifiers`__. @@ -1682,6 +1683,79 @@ def delete_auth_token(self, user_id, auth_token_id, **kwargs): path_params=path_params, header_params=header_params) + def delete_compartment(self, compartment_id, **kwargs): + """ + DeleteCompartment + Deletes the specified compartment. The compartment must be empty. + + + :param str compartment_id: (required) + The OCID of the compartment. + + :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 = "/compartments/{compartmentId}" + 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_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "compartmentId": compartment_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_customer_secret_key(self, user_id, customer_secret_key_id, **kwargs): """ DeleteCustomerSecretKey @@ -3081,6 +3155,71 @@ def get_user_group_membership(self, user_group_membership_id, **kwargs): header_params=header_params, response_type="UserGroupMembership") + def get_work_request(self, work_request_id, **kwargs): + """ + GetWorkRequest + Gets details on a specified work request. The workRequestID is returned in the opc-workrequest-id header + for any asynchronous operation in the Identity and Access Management service. + + + :param str work_request_id: (required) + The OCID of the work request. + + :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.identity.models.WorkRequest` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/workRequests/{workRequestId}" + 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_work_request got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('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="WorkRequest") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="WorkRequest") + def list_api_keys(self, user_id, **kwargs): """ ListApiKeys @@ -3226,7 +3365,7 @@ def list_availability_domains(self, compartment_id, **kwargs): :param str compartment_id: (required) - The OCID of the compartment (remember that the tenancy is simply the root compartment). + The OCID of the parent compartment (remember that the tenancy is simply the root 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. @@ -3281,15 +3420,30 @@ def list_availability_domains(self, compartment_id, **kwargs): def list_compartments(self, compartment_id, **kwargs): """ ListCompartments - Lists the compartments in your tenancy. You must specify your tenancy's OCID as the value - for the compartment ID (remember that the tenancy is simply the root compartment). + Lists the compartments in a specified compartment. The members of the list + returned depends on the values set for several parameters. + + With the exception of the tenancy (root compartment), the ListCompartments operation + returns only the first-level child compartments in the parent compartment specified in + `compartmentId`. The list does not include any subcompartments of the child + compartments (grandchildren). + + The parameter `accessLevel` specifies whether to return only those compartments for which the + requestor has INSPECT permissions on at least one resource directly + or indirectly (the resource can be in a subcompartment). + + The parameter `compartmentIdInSubtree` applies only when you perform ListCompartments on the + tenancy (root compartment). When set to true, the entire hierarchy of compartments can be returned. + To get a full list of all compartments and subcompartments in the tenancy (root compartment), + set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ANY. + See `Where to Get the Tenancy's OCID and User's OCID`__. __ https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five :param str compartment_id: (required) - The OCID of the compartment (remember that the tenancy is simply the root compartment). + The OCID of the parent compartment (remember that the tenancy is simply the root compartment). :param str page: (optional) The value of the `opc-next-page` response header from the previous \"List\" call. @@ -3297,6 +3451,24 @@ def list_compartments(self, compartment_id, **kwargs): :param int limit: (optional) The maximum number of items to return in a paginated \"List\" call. + :param str access_level: (optional) + Valid values are `ANY` and `ACCESSIBLE`. Default is `ANY`. + Setting this to `ACCESSIBLE` returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). For the compartments on which the user indirectly has + INSPECT permissions, a restricted set of fields is returned. + + When set to `ANY` permissions are not checked. + + Allowed values are: "ANY", "ACCESSIBLE" + + :param bool compartment_id_in_subtree: (optional) + Default is false. Can only be set to true when performing + ListCompartments on the tenancy (root compartment). + When set to true, the hierarchy of compartments is traversed + and all compartments and subcompartments in the tenancy are + returned depending on the the setting of `accessLevel`. + :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. @@ -3315,17 +3487,28 @@ def list_compartments(self, compartment_id, **kwargs): expected_kwargs = [ "retry_strategy", "page", - "limit" + "limit", + "access_level", + "compartment_id_in_subtree" ] extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] if extra_kwargs: raise ValueError( "list_compartments got unknown kwargs: {!r}".format(extra_kwargs)) + if 'access_level' in kwargs: + access_level_allowed_values = ["ANY", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + query_params = { "compartmentId": compartment_id, "page": kwargs.get("page", missing), - "limit": kwargs.get("limit", missing) + "limit": kwargs.get("limit", missing), + "accessLevel": kwargs.get("access_level", missing), + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -3354,6 +3537,81 @@ def list_compartments(self, compartment_id, **kwargs): header_params=header_params, response_type="list[Compartment]") + def list_cost_tracking_tags(self, compartment_id, **kwargs): + """ + ListCostTrackingTags + Lists all the tags enabled for cost-tracking in the specified tenancy. For information about + cost-tracking tags, see `Using Cost-tracking Tags`__. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#costs + + + :param str compartment_id: (required) + The OCID of the parent compartment (remember that the tenancy is simply the root compartment). + + :param str page: (optional) + The value of the `opc-next-page` response header from the previous \"List\" call. + + :param int limit: (optional) + The maximum number of items to return in a paginated \"List\" call. + + :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.identity.models.Tag` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/tagNamespaces/actions/listCostTrackingTags" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "page", + "limit" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_cost_tracking_tags got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { + "compartmentId": compartment_id, + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", 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[Tag]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[Tag]") + def list_customer_secret_keys(self, user_id, **kwargs): """ ListCustomerSecretKeys @@ -3430,7 +3688,7 @@ def list_dynamic_groups(self, compartment_id, **kwargs): :param str compartment_id: (required) - The OCID of the compartment (remember that the tenancy is simply the root compartment). + The OCID of the parent compartment (remember that the tenancy is simply the root compartment). :param str page: (optional) The value of the `opc-next-page` response header from the previous \"List\" call. @@ -3506,7 +3764,7 @@ def list_fault_domains(self, compartment_id, availability_domain, **kwargs): :param str compartment_id: (required) - The OCID of the compartment (remember that the tenancy is simply the root compartment). + The OCID of the parent compartment (remember that the tenancy is simply the root compartment). :param str availability_domain: (required) The name of the availibilityDomain. @@ -3573,7 +3831,7 @@ def list_groups(self, compartment_id, **kwargs): :param str compartment_id: (required) - The OCID of the compartment (remember that the tenancy is simply the root compartment). + The OCID of the parent compartment (remember that the tenancy is simply the root compartment). :param str page: (optional) The value of the `opc-next-page` response header from the previous \"List\" call. @@ -3655,7 +3913,7 @@ def list_identity_providers(self, protocol, compartment_id, **kwargs): Allowed values are: "SAML2" :param str compartment_id: (required) - The OCID of the compartment (remember that the tenancy is simply the root compartment). + The OCID of the parent compartment (remember that the tenancy is simply the root compartment). :param str page: (optional) The value of the `opc-next-page` response header from the previous \"List\" call. @@ -3817,7 +4075,7 @@ def list_policies(self, compartment_id, **kwargs): :param str compartment_id: (required) - The OCID of the compartment (remember that the tenancy is simply the root compartment). + The OCID of the parent compartment (remember that the tenancy is simply the root compartment). :param str page: (optional) The value of the `opc-next-page` response header from the previous \"List\" call. @@ -4134,7 +4392,7 @@ def list_tag_namespaces(self, compartment_id, **kwargs): :param str compartment_id: (required) - The OCID of the compartment (remember that the tenancy is simply the root compartment). + The OCID of the parent compartment (remember that the tenancy is simply the root compartment). :param str page: (optional) The value of the `opc-next-page` response header from the previous \"List\" call. @@ -4306,7 +4564,7 @@ def list_user_group_memberships(self, compartment_id, **kwargs): :param str compartment_id: (required) - The OCID of the compartment (remember that the tenancy is simply the root compartment). + The OCID of the parent compartment (remember that the tenancy is simply the root compartment). :param str user_id: (optional) The OCID of the user. @@ -4392,7 +4650,7 @@ def list_users(self, compartment_id, **kwargs): :param str compartment_id: (required) - The OCID of the compartment (remember that the tenancy is simply the root compartment). + The OCID of the parent compartment (remember that the tenancy is simply the root compartment). :param str page: (optional) The value of the `opc-next-page` response header from the previous \"List\" call. @@ -4457,6 +4715,83 @@ def list_users(self, compartment_id, **kwargs): header_params=header_params, response_type="list[User]") + def list_work_requests(self, compartment_id, **kwargs): + """ + ListWorkRequests + Lists the work requests in compartment. + + + :param str compartment_id: (required) + The OCID of the parent compartment (remember that the tenancy is simply the root compartment). + + :param str page: (optional) + The value of the `opc-next-page` response header from the previous \"List\" call. + + :param int limit: (optional) + The maximum number of items to return in a paginated \"List\" call. + + :param str resource_identifier: (optional) + The identifier of the resource the work request affects. + + :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.identity.models.WorkRequestSummary` + :rtype: :class:`~oci.response.Response` + """ + resource_path = "/workRequests/" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "retry_strategy", + "page", + "limit", + "resource_identifier" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_work_requests got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { + "compartmentId": compartment_id, + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing), + "resourceIdentifier": kwargs.get("resource_identifier", 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[WorkRequestSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[WorkRequestSummary]") + def remove_user_from_group(self, user_group_membership_id, **kwargs): """ RemoveUserFromGroup diff --git a/src/oci/identity/identity_client_composite_operations.py b/src/oci/identity/identity_client_composite_operations.py index a3cb91db4a..ee398fc800 100644 --- a/src/oci/identity/identity_client_composite_operations.py +++ b/src/oci/identity/identity_client_composite_operations.py @@ -328,6 +328,44 @@ def create_user_and_wait_for_state(self, create_user_details, wait_for_states=[] except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_compartment_and_wait_for_state(self, compartment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.identity.IdentityClient.delete_compartment` and waits for the :py:class:`~oci.identity.models.WorkRequest` + to enter the given state(s). + + :param str compartment_id: (required) + The OCID of the compartment. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.identity.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.identity.IdentityClient.delete_compartment` + + :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_compartment(compartment_id, **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_dynamic_group_and_wait_for_state(self, dynamic_group_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.identity.IdentityClient.delete_dynamic_group` and waits for the :py:class:`~oci.identity.models.DynamicGroup` acted upon diff --git a/src/oci/identity/models/__init__.py b/src/oci/identity/models/__init__.py index 3892944414..1698586c7a 100644 --- a/src/oci/identity/models/__init__.py +++ b/src/oci/identity/models/__init__.py @@ -61,6 +61,11 @@ from .update_user_details import UpdateUserDetails from .user import User from .user_group_membership import UserGroupMembership +from .work_request import WorkRequest +from .work_request_error import WorkRequestError +from .work_request_log_entry import WorkRequestLogEntry +from .work_request_resource import WorkRequestResource +from .work_request_summary import WorkRequestSummary # Maps type names to classes for identity services. identity_type_mapping = { @@ -121,5 +126,10 @@ "UpdateTagNamespaceDetails": UpdateTagNamespaceDetails, "UpdateUserDetails": UpdateUserDetails, "User": User, - "UserGroupMembership": UserGroupMembership + "UserGroupMembership": UserGroupMembership, + "WorkRequest": WorkRequest, + "WorkRequestError": WorkRequestError, + "WorkRequestLogEntry": WorkRequestLogEntry, + "WorkRequestResource": WorkRequestResource, + "WorkRequestSummary": WorkRequestSummary } diff --git a/src/oci/identity/models/compartment.py b/src/oci/identity/models/compartment.py index 35fcfcf4a3..4d53387524 100644 --- a/src/oci/identity/models/compartment.py +++ b/src/oci/identity/models/compartment.py @@ -86,6 +86,10 @@ def __init__(self, **kwargs): The value to assign to the inactive_status property of this Compartment. :type inactive_status: int + :param is_accessible: + The value to assign to the is_accessible property of this Compartment. + :type is_accessible: bool + :param freeform_tags: The value to assign to the freeform_tags property of this Compartment. :type freeform_tags: dict(str, str) @@ -103,6 +107,7 @@ def __init__(self, **kwargs): 'time_created': 'datetime', 'lifecycle_state': 'str', 'inactive_status': 'int', + 'is_accessible': 'bool', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -115,6 +120,7 @@ def __init__(self, **kwargs): 'time_created': 'timeCreated', 'lifecycle_state': 'lifecycleState', 'inactive_status': 'inactiveStatus', + 'is_accessible': 'isAccessible', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -126,6 +132,7 @@ def __init__(self, **kwargs): self._time_created = None self._lifecycle_state = None self._inactive_status = None + self._is_accessible = None self._freeform_tags = None self._defined_tags = None @@ -157,7 +164,7 @@ def id(self, id): def compartment_id(self): """ **[Required]** Gets the compartment_id of this Compartment. - The OCID of the tenancy containing the compartment. + The OCID of the parent compartment containing the compartment. :return: The compartment_id of this Compartment. @@ -169,7 +176,7 @@ def compartment_id(self): def compartment_id(self, compartment_id): """ Sets the compartment_id of this Compartment. - The OCID of the tenancy containing the compartment. + The OCID of the parent compartment containing the compartment. :param compartment_id: The compartment_id of this Compartment. @@ -182,7 +189,7 @@ def name(self): """ **[Required]** Gets the name of this Compartment. The name you assign to the compartment during creation. The name must be unique across all - compartments in the tenancy. Avoid entering confidential information. + compartments in the parent. Avoid entering confidential information. :return: The name of this Compartment. @@ -195,7 +202,7 @@ def name(self, name): """ Sets the name of this Compartment. The name you assign to the compartment during creation. The name must be unique across all - compartments in the tenancy. Avoid entering confidential information. + compartments in the parent. Avoid entering confidential information. :param name: The name of this Compartment. @@ -311,6 +318,34 @@ def inactive_status(self, inactive_status): """ self._inactive_status = inactive_status + @property + def is_accessible(self): + """ + Gets the is_accessible of this Compartment. + Indicates whether or not the compartment is accessible for the user making the request. + Returns true when the user has INSPECT permissions directly on a resource in the + compartment or indirectly (permissions can be on a resource in a subcompartment). + + + :return: The is_accessible of this Compartment. + :rtype: bool + """ + return self._is_accessible + + @is_accessible.setter + def is_accessible(self, is_accessible): + """ + Sets the is_accessible of this Compartment. + Indicates whether or not the compartment is accessible for the user making the request. + Returns true when the user has INSPECT permissions directly on a resource in the + compartment or indirectly (permissions can be on a resource in a subcompartment). + + + :param is_accessible: The is_accessible of this Compartment. + :type: bool + """ + self._is_accessible = is_accessible + @property def freeform_tags(self): """ diff --git a/src/oci/identity/models/create_compartment_details.py b/src/oci/identity/models/create_compartment_details.py index d78cfb0766..30a70e9185 100644 --- a/src/oci/identity/models/create_compartment_details.py +++ b/src/oci/identity/models/create_compartment_details.py @@ -64,7 +64,7 @@ def __init__(self, **kwargs): def compartment_id(self): """ **[Required]** Gets the compartment_id of this CreateCompartmentDetails. - The OCID of the tenancy containing the compartment. + The OCID of the parent compartment containing the compartment. :return: The compartment_id of this CreateCompartmentDetails. @@ -76,7 +76,7 @@ def compartment_id(self): def compartment_id(self, compartment_id): """ Sets the compartment_id of this CreateCompartmentDetails. - The OCID of the tenancy containing the compartment. + The OCID of the parent compartment containing the compartment. :param compartment_id: The compartment_id of this CreateCompartmentDetails. @@ -89,7 +89,7 @@ def name(self): """ **[Required]** Gets the name of this CreateCompartmentDetails. The name you assign to the compartment during creation. The name must be unique across all compartments - in the tenancy. Avoid entering confidential information. + in the parent compartment. Avoid entering confidential information. :return: The name of this CreateCompartmentDetails. @@ -102,7 +102,7 @@ def name(self, name): """ Sets the name of this CreateCompartmentDetails. The name you assign to the compartment during creation. The name must be unique across all compartments - in the tenancy. Avoid entering confidential information. + in the parent compartment. Avoid entering confidential information. :param name: The name of this CreateCompartmentDetails. diff --git a/src/oci/identity/models/create_tag_details.py b/src/oci/identity/models/create_tag_details.py index 86d3c64025..b821db27e3 100644 --- a/src/oci/identity/models/create_tag_details.py +++ b/src/oci/identity/models/create_tag_details.py @@ -33,25 +33,32 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this CreateTagDetails. :type defined_tags: dict(str, dict(str, object)) + :param is_cost_tracking: + The value to assign to the is_cost_tracking property of this CreateTagDetails. + :type is_cost_tracking: bool + """ self.swagger_types = { 'name': 'str', 'description': 'str', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'is_cost_tracking': 'bool' } self.attribute_map = { 'name': 'name', 'description': 'description', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'is_cost_tracking': 'isCostTracking' } self._name = None self._description = None self._freeform_tags = None self._defined_tags = None + self._is_cost_tracking = None @property def name(self): @@ -165,6 +172,30 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def is_cost_tracking(self): + """ + Gets the is_cost_tracking of this CreateTagDetails. + Indicates whether the tag is enabled for cost tracking. + + + :return: The is_cost_tracking of this CreateTagDetails. + :rtype: bool + """ + return self._is_cost_tracking + + @is_cost_tracking.setter + def is_cost_tracking(self, is_cost_tracking): + """ + Sets the is_cost_tracking of this CreateTagDetails. + Indicates whether the tag is enabled for cost tracking. + + + :param is_cost_tracking: The is_cost_tracking of this CreateTagDetails. + :type: bool + """ + self._is_cost_tracking = is_cost_tracking + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/identity/models/tag.py b/src/oci/identity/models/tag.py index 22174c9fbb..e9ea26f815 100644 --- a/src/oci/identity/models/tag.py +++ b/src/oci/identity/models/tag.py @@ -61,6 +61,10 @@ def __init__(self, **kwargs): The value to assign to the time_created property of this Tag. :type time_created: datetime + :param is_cost_tracking: + The value to assign to the is_cost_tracking property of this Tag. + :type is_cost_tracking: bool + """ self.swagger_types = { 'compartment_id': 'str', @@ -72,7 +76,8 @@ def __init__(self, **kwargs): 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'is_retired': 'bool', - 'time_created': 'datetime' + 'time_created': 'datetime', + 'is_cost_tracking': 'bool' } self.attribute_map = { @@ -85,7 +90,8 @@ def __init__(self, **kwargs): 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'is_retired': 'isRetired', - 'time_created': 'timeCreated' + 'time_created': 'timeCreated', + 'is_cost_tracking': 'isCostTracking' } self._compartment_id = None @@ -98,6 +104,7 @@ def __init__(self, **kwargs): self._defined_tags = None self._is_retired = None self._time_created = None + self._is_cost_tracking = None @property def compartment_id(self): @@ -363,6 +370,30 @@ def time_created(self, time_created): """ self._time_created = time_created + @property + def is_cost_tracking(self): + """ + Gets the is_cost_tracking of this Tag. + Indicates whether the tag is enabled for cost tracking. + + + :return: The is_cost_tracking of this Tag. + :rtype: bool + """ + return self._is_cost_tracking + + @is_cost_tracking.setter + def is_cost_tracking(self, is_cost_tracking): + """ + Sets the is_cost_tracking of this Tag. + Indicates whether the tag is enabled for cost tracking. + + + :param is_cost_tracking: The is_cost_tracking of this Tag. + :type: bool + """ + self._is_cost_tracking = is_cost_tracking + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/identity/models/tag_summary.py b/src/oci/identity/models/tag_summary.py index c76776d1a4..2e5bd6048a 100644 --- a/src/oci/identity/models/tag_summary.py +++ b/src/oci/identity/models/tag_summary.py @@ -49,6 +49,10 @@ def __init__(self, **kwargs): The value to assign to the time_created property of this TagSummary. :type time_created: datetime + :param is_cost_tracking: + The value to assign to the is_cost_tracking property of this TagSummary. + :type is_cost_tracking: bool + """ self.swagger_types = { 'compartment_id': 'str', @@ -58,7 +62,8 @@ def __init__(self, **kwargs): 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'is_retired': 'bool', - 'time_created': 'datetime' + 'time_created': 'datetime', + 'is_cost_tracking': 'bool' } self.attribute_map = { @@ -69,7 +74,8 @@ def __init__(self, **kwargs): 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'is_retired': 'isRetired', - 'time_created': 'timeCreated' + 'time_created': 'timeCreated', + 'is_cost_tracking': 'isCostTracking' } self._compartment_id = None @@ -80,6 +86,7 @@ def __init__(self, **kwargs): self._defined_tags = None self._is_retired = None self._time_created = None + self._is_cost_tracking = None @property def compartment_id(self): @@ -297,6 +304,30 @@ def time_created(self, time_created): """ self._time_created = time_created + @property + def is_cost_tracking(self): + """ + Gets the is_cost_tracking of this TagSummary. + Indicates whether the tag is enabled for cost tracking. + + + :return: The is_cost_tracking of this TagSummary. + :rtype: bool + """ + return self._is_cost_tracking + + @is_cost_tracking.setter + def is_cost_tracking(self, is_cost_tracking): + """ + Sets the is_cost_tracking of this TagSummary. + Indicates whether the tag is enabled for cost tracking. + + + :param is_cost_tracking: The is_cost_tracking of this TagSummary. + :type: bool + """ + self._is_cost_tracking = is_cost_tracking + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/identity/models/update_compartment_details.py b/src/oci/identity/models/update_compartment_details.py index 7691a47d05..73db78400b 100644 --- a/src/oci/identity/models/update_compartment_details.py +++ b/src/oci/identity/models/update_compartment_details.py @@ -81,7 +81,7 @@ def description(self, description): def name(self): """ Gets the name of this UpdateCompartmentDetails. - The new name you assign to the compartment. The name must be unique across all compartments in the tenancy. + The new name you assign to the compartment. The name must be unique across all compartments in the parent compartment. Avoid entering confidential information. @@ -94,7 +94,7 @@ def name(self): def name(self, name): """ Sets the name of this UpdateCompartmentDetails. - The new name you assign to the compartment. The name must be unique across all compartments in the tenancy. + The new name you assign to the compartment. The name must be unique across all compartments in the parent compartment. Avoid entering confidential information. diff --git a/src/oci/identity/models/update_tag_details.py b/src/oci/identity/models/update_tag_details.py index 666f191157..8956c2e59a 100644 --- a/src/oci/identity/models/update_tag_details.py +++ b/src/oci/identity/models/update_tag_details.py @@ -33,25 +33,32 @@ def __init__(self, **kwargs): The value to assign to the defined_tags property of this UpdateTagDetails. :type defined_tags: dict(str, dict(str, object)) + :param is_cost_tracking: + The value to assign to the is_cost_tracking property of this UpdateTagDetails. + :type is_cost_tracking: bool + """ self.swagger_types = { 'description': 'str', 'is_retired': 'bool', 'freeform_tags': 'dict(str, str)', - 'defined_tags': 'dict(str, dict(str, object))' + 'defined_tags': 'dict(str, dict(str, object))', + 'is_cost_tracking': 'bool' } self.attribute_map = { 'description': 'description', 'is_retired': 'isRetired', 'freeform_tags': 'freeformTags', - 'defined_tags': 'definedTags' + 'defined_tags': 'definedTags', + 'is_cost_tracking': 'isCostTracking' } self._description = None self._is_retired = None self._freeform_tags = None self._defined_tags = None + self._is_cost_tracking = None @property def description(self): @@ -171,6 +178,30 @@ def defined_tags(self, defined_tags): """ self._defined_tags = defined_tags + @property + def is_cost_tracking(self): + """ + Gets the is_cost_tracking of this UpdateTagDetails. + Indicates whether the tag is enabled for cost tracking. + + + :return: The is_cost_tracking of this UpdateTagDetails. + :rtype: bool + """ + return self._is_cost_tracking + + @is_cost_tracking.setter + def is_cost_tracking(self, is_cost_tracking): + """ + Sets the is_cost_tracking of this UpdateTagDetails. + Indicates whether the tag is enabled for cost tracking. + + + :param is_cost_tracking: The is_cost_tracking of this UpdateTagDetails. + :type: bool + """ + self._is_cost_tracking = is_cost_tracking + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/identity/models/work_request.py b/src/oci/identity/models/work_request.py new file mode 100644 index 0000000000..7ce1c0ab36 --- /dev/null +++ b/src/oci/identity/models/work_request.py @@ -0,0 +1,430 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 WorkRequest(object): + """ + The asynchronous API request does not take effect immediately. This request spawns an asynchronous + workflow to fulfill the request. WorkRequest objects provide visibility for in-progress workflows. + """ + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_COMPARTMENT" + OPERATION_TYPE_DELETE_COMPARTMENT = "DELETE_COMPARTMENT" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "ACCEPTED" + STATUS_ACCEPTED = "ACCEPTED" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "IN_PROGRESS" + STATUS_IN_PROGRESS = "IN_PROGRESS" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "FAILED" + STATUS_FAILED = "FAILED" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "SUCCEEDED" + STATUS_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "CANCELING" + STATUS_CANCELING = "CANCELING" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "CANCELED" + STATUS_CANCELED = "CANCELED" + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequest 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 WorkRequest. + :type id: str + + :param operation_type: + The value to assign to the operation_type property of this WorkRequest. + Allowed values for this property are: "DELETE_COMPARTMENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param compartment_id: + The value to assign to the compartment_id property of this WorkRequest. + :type compartment_id: str + + :param status: + The value to assign to the status property of this WorkRequest. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param resources: + The value to assign to the resources property of this WorkRequest. + :type resources: list[WorkRequestResource] + + :param errors: + The value to assign to the errors property of this WorkRequest. + :type errors: list[WorkRequestError] + + :param logs: + The value to assign to the logs property of this WorkRequest. + :type logs: list[WorkRequestLogEntry] + + :param time_accepted: + The value to assign to the time_accepted property of this WorkRequest. + :type time_accepted: datetime + + :param time_started: + The value to assign to the time_started property of this WorkRequest. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this WorkRequest. + :type time_finished: datetime + + :param percent_complete: + The value to assign to the percent_complete property of this WorkRequest. + :type percent_complete: float + + """ + self.swagger_types = { + 'id': 'str', + 'operation_type': 'str', + 'compartment_id': 'str', + 'status': 'str', + 'resources': 'list[WorkRequestResource]', + 'errors': 'list[WorkRequestError]', + 'logs': 'list[WorkRequestLogEntry]', + 'time_accepted': 'datetime', + 'time_started': 'datetime', + 'time_finished': 'datetime', + 'percent_complete': 'float' + } + + self.attribute_map = { + 'id': 'id', + 'operation_type': 'operationType', + 'compartment_id': 'compartmentId', + 'status': 'status', + 'resources': 'resources', + 'errors': 'errors', + 'logs': 'logs', + 'time_accepted': 'timeAccepted', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished', + 'percent_complete': 'percentComplete' + } + + self._id = None + self._operation_type = None + self._compartment_id = None + self._status = None + self._resources = None + self._errors = None + self._logs = None + self._time_accepted = None + self._time_started = None + self._time_finished = None + self._percent_complete = None + + @property + def id(self): + """ + **[Required]** Gets the id of this WorkRequest. + The OCID of the work request. + + + :return: The id of this WorkRequest. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this WorkRequest. + The OCID of the work request. + + + :param id: The id of this WorkRequest. + :type: str + """ + self._id = id + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this WorkRequest. + An enum-like description of the type of work the work request is doing. + + Allowed values for this property are: "DELETE_COMPARTMENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this WorkRequest. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this WorkRequest. + An enum-like description of the type of work the work request is doing. + + + :param operation_type: The operation_type of this WorkRequest. + :type: str + """ + allowed_values = ["DELETE_COMPARTMENT"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def compartment_id(self): + """ + Gets the compartment_id of this WorkRequest. + The OCID of the compartment that contains the work request. + + + :return: The compartment_id of this WorkRequest. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this WorkRequest. + The OCID of the compartment that contains the work request. + + + :param compartment_id: The compartment_id of this WorkRequest. + :type: str + """ + self._compartment_id = compartment_id + + @property + def status(self): + """ + **[Required]** Gets the status of this WorkRequest. + The current status of the work request. + + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this WorkRequest. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this WorkRequest. + The current status of the work request. + + + :param status: The status of this WorkRequest. + :type: str + """ + allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def resources(self): + """ + Gets the resources of this WorkRequest. + The resources this work request affects. + + + :return: The resources of this WorkRequest. + :rtype: list[WorkRequestResource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this WorkRequest. + The resources this work request affects. + + + :param resources: The resources of this WorkRequest. + :type: list[WorkRequestResource] + """ + self._resources = resources + + @property + def errors(self): + """ + Gets the errors of this WorkRequest. + The errors for work request. + + + :return: The errors of this WorkRequest. + :rtype: list[WorkRequestError] + """ + return self._errors + + @errors.setter + def errors(self, errors): + """ + Sets the errors of this WorkRequest. + The errors for work request. + + + :param errors: The errors of this WorkRequest. + :type: list[WorkRequestError] + """ + self._errors = errors + + @property + def logs(self): + """ + Gets the logs of this WorkRequest. + The logs for work request. + + + :return: The logs of this WorkRequest. + :rtype: list[WorkRequestLogEntry] + """ + return self._logs + + @logs.setter + def logs(self, logs): + """ + Sets the logs of this WorkRequest. + The logs for work request. + + + :param logs: The logs of this WorkRequest. + :type: list[WorkRequestLogEntry] + """ + self._logs = logs + + @property + def time_accepted(self): + """ + Gets the time_accepted of this WorkRequest. + Date and time the work was accepted, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_accepted of this WorkRequest. + :rtype: datetime + """ + return self._time_accepted + + @time_accepted.setter + def time_accepted(self, time_accepted): + """ + Sets the time_accepted of this WorkRequest. + Date and time the work was accepted, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :param time_accepted: The time_accepted of this WorkRequest. + :type: datetime + """ + self._time_accepted = time_accepted + + @property + def time_started(self): + """ + Gets the time_started of this WorkRequest. + Date and time the work started, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_started of this WorkRequest. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this WorkRequest. + Date and time the work started, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :param time_started: The time_started of this WorkRequest. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this WorkRequest. + Date and time the work completed, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_finished of this WorkRequest. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this WorkRequest. + Date and time the work completed, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :param time_finished: The time_finished of this WorkRequest. + :type: datetime + """ + self._time_finished = time_finished + + @property + def percent_complete(self): + """ + Gets the percent_complete of this WorkRequest. + How much progress the operation has made. + + + :return: The percent_complete of this WorkRequest. + :rtype: float + """ + return self._percent_complete + + @percent_complete.setter + def percent_complete(self, percent_complete): + """ + Sets the percent_complete of this WorkRequest. + How much progress the operation has made. + + + :param percent_complete: The percent_complete of this WorkRequest. + :type: float + """ + self._percent_complete = percent_complete + + 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/identity/models/work_request_error.py b/src/oci/identity/models/work_request_error.py new file mode 100644 index 0000000000..4e0ae8c2b1 --- /dev/null +++ b/src/oci/identity/models/work_request_error.py @@ -0,0 +1,133 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 WorkRequestError(object): + """ + The error entity. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestError object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param code: + The value to assign to the code property of this WorkRequestError. + :type code: str + + :param message: + The value to assign to the message property of this WorkRequestError. + :type message: str + + :param timestamp: + The value to assign to the timestamp property of this WorkRequestError. + :type timestamp: datetime + + """ + self.swagger_types = { + 'code': 'str', + 'message': 'str', + 'timestamp': 'datetime' + } + + self.attribute_map = { + 'code': 'code', + 'message': 'message', + 'timestamp': 'timestamp' + } + + self._code = None + self._message = None + self._timestamp = None + + @property + def code(self): + """ + **[Required]** Gets the code of this WorkRequestError. + A machine-usable code for the error that occured. + + + :return: The code of this WorkRequestError. + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """ + Sets the code of this WorkRequestError. + A machine-usable code for the error that occured. + + + :param code: The code of this WorkRequestError. + :type: str + """ + self._code = code + + @property + def message(self): + """ + **[Required]** Gets the message of this WorkRequestError. + A human-readable error string. + + + :return: The message of this WorkRequestError. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this WorkRequestError. + A human-readable error string. + + + :param message: The message of this WorkRequestError. + :type: str + """ + self._message = message + + @property + def timestamp(self): + """ + Gets the timestamp of this WorkRequestError. + Date and time the error happened, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :return: The timestamp of this WorkRequestError. + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """ + Sets the timestamp of this WorkRequestError. + Date and time the error happened, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :param timestamp: The timestamp of this WorkRequestError. + :type: datetime + """ + self._timestamp = timestamp + + 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/identity/models/work_request_log_entry.py b/src/oci/identity/models/work_request_log_entry.py new file mode 100644 index 0000000000..7d3b27bdfd --- /dev/null +++ b/src/oci/identity/models/work_request_log_entry.py @@ -0,0 +1,102 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 WorkRequestLogEntry(object): + """ + The log entity. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestLogEntry object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param message: + The value to assign to the message property of this WorkRequestLogEntry. + :type message: str + + :param timestamp: + The value to assign to the timestamp property of this WorkRequestLogEntry. + :type timestamp: datetime + + """ + self.swagger_types = { + 'message': 'str', + 'timestamp': 'datetime' + } + + self.attribute_map = { + 'message': 'message', + 'timestamp': 'timestamp' + } + + self._message = None + self._timestamp = None + + @property + def message(self): + """ + **[Required]** Gets the message of this WorkRequestLogEntry. + A human-readable error string. + + + :return: The message of this WorkRequestLogEntry. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this WorkRequestLogEntry. + A human-readable error string. + + + :param message: The message of this WorkRequestLogEntry. + :type: str + """ + self._message = message + + @property + def timestamp(self): + """ + Gets the timestamp of this WorkRequestLogEntry. + Date and time the log was written, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :return: The timestamp of this WorkRequestLogEntry. + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """ + Sets the timestamp of this WorkRequestLogEntry. + Date and time the log was written, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :param timestamp: The timestamp of this WorkRequestLogEntry. + :type: datetime + """ + self._timestamp = timestamp + + 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/identity/models/work_request_resource.py b/src/oci/identity/models/work_request_resource.py new file mode 100644 index 0000000000..503d531f20 --- /dev/null +++ b/src/oci/identity/models/work_request_resource.py @@ -0,0 +1,190 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 WorkRequestResource(object): + """ + The resource entity. + """ + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "CREATED" + ACTION_TYPE_CREATED = "CREATED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "UPDATED" + ACTION_TYPE_UPDATED = "UPDATED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "DELETED" + ACTION_TYPE_DELETED = "DELETED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "RELATED" + ACTION_TYPE_RELATED = "RELATED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "IN_PROGRESS" + ACTION_TYPE_IN_PROGRESS = "IN_PROGRESS" + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestResource object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param identifier: + The value to assign to the identifier property of this WorkRequestResource. + :type identifier: str + + :param entity_type: + The value to assign to the entity_type property of this WorkRequestResource. + :type entity_type: str + + :param action_type: + The value to assign to the action_type property of this WorkRequestResource. + Allowed values for this property are: "CREATED", "UPDATED", "DELETED", "RELATED", "IN_PROGRESS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type action_type: str + + :param entity_uri: + The value to assign to the entity_uri property of this WorkRequestResource. + :type entity_uri: str + + """ + self.swagger_types = { + 'identifier': 'str', + 'entity_type': 'str', + 'action_type': 'str', + 'entity_uri': 'str' + } + + self.attribute_map = { + 'identifier': 'identifier', + 'entity_type': 'entityType', + 'action_type': 'actionType', + 'entity_uri': 'entityUri' + } + + self._identifier = None + self._entity_type = None + self._action_type = None + self._entity_uri = None + + @property + def identifier(self): + """ + **[Required]** Gets the identifier of this WorkRequestResource. + The resource identifier the work request affects. + + + :return: The identifier of this WorkRequestResource. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this WorkRequestResource. + The resource identifier the work request affects. + + + :param identifier: The identifier of this WorkRequestResource. + :type: str + """ + self._identifier = identifier + + @property + def entity_type(self): + """ + **[Required]** Gets the entity_type of this WorkRequestResource. + The resource type the work request is affects. + + + :return: The entity_type of this WorkRequestResource. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this WorkRequestResource. + The resource type the work request is affects. + + + :param entity_type: The entity_type of this WorkRequestResource. + :type: str + """ + self._entity_type = entity_type + + @property + def action_type(self): + """ + **[Required]** Gets the action_type of this WorkRequestResource. + The way in which this resource was affected by the work tracked by the work request. + + Allowed values for this property are: "CREATED", "UPDATED", "DELETED", "RELATED", "IN_PROGRESS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The action_type of this WorkRequestResource. + :rtype: str + """ + return self._action_type + + @action_type.setter + def action_type(self, action_type): + """ + Sets the action_type of this WorkRequestResource. + The way in which this resource was affected by the work tracked by the work request. + + + :param action_type: The action_type of this WorkRequestResource. + :type: str + """ + allowed_values = ["CREATED", "UPDATED", "DELETED", "RELATED", "IN_PROGRESS"] + if not value_allowed_none_or_none_sentinel(action_type, allowed_values): + action_type = 'UNKNOWN_ENUM_VALUE' + self._action_type = action_type + + @property + def entity_uri(self): + """ + Gets the entity_uri of this WorkRequestResource. + The URI path that the user can do a GET on to access the resource metadata. + + + :return: The entity_uri of this WorkRequestResource. + :rtype: str + """ + return self._entity_uri + + @entity_uri.setter + def entity_uri(self, entity_uri): + """ + Sets the entity_uri of this WorkRequestResource. + The URI path that the user can do a GET on to access the resource metadata. + + + :param entity_uri: The entity_uri of this WorkRequestResource. + :type: str + """ + self._entity_uri = entity_uri + + 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/identity/models/work_request_summary.py b/src/oci/identity/models/work_request_summary.py new file mode 100644 index 0000000000..1fda08eb2c --- /dev/null +++ b/src/oci/identity/models/work_request_summary.py @@ -0,0 +1,398 @@ +# coding: utf-8 +# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + + +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 WorkRequestSummary(object): + """ + The work request summary. Tracks the status of the asynchronous operation. + """ + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_COMPARTMENT" + OPERATION_TYPE_DELETE_COMPARTMENT = "DELETE_COMPARTMENT" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "ACCEPTED" + STATUS_ACCEPTED = "ACCEPTED" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "IN_PROGRESS" + STATUS_IN_PROGRESS = "IN_PROGRESS" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "FAILED" + STATUS_FAILED = "FAILED" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "SUCCEEDED" + STATUS_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "CANCELING" + STATUS_CANCELING = "CANCELING" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "CANCELED" + STATUS_CANCELED = "CANCELED" + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestSummary 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 WorkRequestSummary. + :type id: str + + :param operation_type: + The value to assign to the operation_type property of this WorkRequestSummary. + Allowed values for this property are: "DELETE_COMPARTMENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param compartment_id: + The value to assign to the compartment_id property of this WorkRequestSummary. + :type compartment_id: str + + :param status: + The value to assign to the status property of this WorkRequestSummary. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param resources: + The value to assign to the resources property of this WorkRequestSummary. + :type resources: list[WorkRequestResource] + + :param errors: + The value to assign to the errors property of this WorkRequestSummary. + :type errors: list[WorkRequestError] + + :param time_accepted: + The value to assign to the time_accepted property of this WorkRequestSummary. + :type time_accepted: datetime + + :param time_started: + The value to assign to the time_started property of this WorkRequestSummary. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this WorkRequestSummary. + :type time_finished: datetime + + :param percent_complete: + The value to assign to the percent_complete property of this WorkRequestSummary. + :type percent_complete: float + + """ + self.swagger_types = { + 'id': 'str', + 'operation_type': 'str', + 'compartment_id': 'str', + 'status': 'str', + 'resources': 'list[WorkRequestResource]', + 'errors': 'list[WorkRequestError]', + 'time_accepted': 'datetime', + 'time_started': 'datetime', + 'time_finished': 'datetime', + 'percent_complete': 'float' + } + + self.attribute_map = { + 'id': 'id', + 'operation_type': 'operationType', + 'compartment_id': 'compartmentId', + 'status': 'status', + 'resources': 'resources', + 'errors': 'errors', + 'time_accepted': 'timeAccepted', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished', + 'percent_complete': 'percentComplete' + } + + self._id = None + self._operation_type = None + self._compartment_id = None + self._status = None + self._resources = None + self._errors = None + self._time_accepted = None + self._time_started = None + self._time_finished = None + self._percent_complete = None + + @property + def id(self): + """ + **[Required]** Gets the id of this WorkRequestSummary. + The OCID of the work request. + + + :return: The id of this WorkRequestSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this WorkRequestSummary. + The OCID of the work request. + + + :param id: The id of this WorkRequestSummary. + :type: str + """ + self._id = id + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this WorkRequestSummary. + An enum-like description of the type of work the work request is doing. + + Allowed values for this property are: "DELETE_COMPARTMENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this WorkRequestSummary. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this WorkRequestSummary. + An enum-like description of the type of work the work request is doing. + + + :param operation_type: The operation_type of this WorkRequestSummary. + :type: str + """ + allowed_values = ["DELETE_COMPARTMENT"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def compartment_id(self): + """ + Gets the compartment_id of this WorkRequestSummary. + The OCID of the compartment that contains the work request. + + + :return: The compartment_id of this WorkRequestSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this WorkRequestSummary. + The OCID of the compartment that contains the work request. + + + :param compartment_id: The compartment_id of this WorkRequestSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def status(self): + """ + **[Required]** Gets the status of this WorkRequestSummary. + The current status of the work request. + + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this WorkRequestSummary. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this WorkRequestSummary. + The current status of the work request. + + + :param status: The status of this WorkRequestSummary. + :type: str + """ + allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def resources(self): + """ + Gets the resources of this WorkRequestSummary. + The resources this work request affects. + + + :return: The resources of this WorkRequestSummary. + :rtype: list[WorkRequestResource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this WorkRequestSummary. + The resources this work request affects. + + + :param resources: The resources of this WorkRequestSummary. + :type: list[WorkRequestResource] + """ + self._resources = resources + + @property + def errors(self): + """ + Gets the errors of this WorkRequestSummary. + The errors for work request. + + + :return: The errors of this WorkRequestSummary. + :rtype: list[WorkRequestError] + """ + return self._errors + + @errors.setter + def errors(self, errors): + """ + Sets the errors of this WorkRequestSummary. + The errors for work request. + + + :param errors: The errors of this WorkRequestSummary. + :type: list[WorkRequestError] + """ + self._errors = errors + + @property + def time_accepted(self): + """ + Gets the time_accepted of this WorkRequestSummary. + Date and time the work was accepted, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_accepted of this WorkRequestSummary. + :rtype: datetime + """ + return self._time_accepted + + @time_accepted.setter + def time_accepted(self, time_accepted): + """ + Sets the time_accepted of this WorkRequestSummary. + Date and time the work was accepted, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :param time_accepted: The time_accepted of this WorkRequestSummary. + :type: datetime + """ + self._time_accepted = time_accepted + + @property + def time_started(self): + """ + Gets the time_started of this WorkRequestSummary. + Date and time the work started, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_started of this WorkRequestSummary. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this WorkRequestSummary. + Date and time the work started, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :param time_started: The time_started of this WorkRequestSummary. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this WorkRequestSummary. + Date and time the work completed, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_finished of this WorkRequestSummary. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this WorkRequestSummary. + Date and time the work completed, in the format defined by RFC3339. + Example: `2016-08-25T21:10:29.600Z` + + + :param time_finished: The time_finished of this WorkRequestSummary. + :type: datetime + """ + self._time_finished = time_finished + + @property + def percent_complete(self): + """ + Gets the percent_complete of this WorkRequestSummary. + How much progress the operation has made. + + + :return: The percent_complete of this WorkRequestSummary. + :rtype: float + """ + return self._percent_complete + + @percent_complete.setter + def percent_complete(self, percent_complete): + """ + Sets the percent_complete of this WorkRequestSummary. + How much progress the operation has made. + + + :param percent_complete: The percent_complete of this WorkRequestSummary. + :type: float + """ + self._percent_complete = percent_complete + + 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/key_management/kms_crypto_client.py b/src/oci/key_management/kms_crypto_client.py index 85e5c0e8bc..49404fbd51 100644 --- a/src/oci/key_management/kms_crypto_client.py +++ b/src/oci/key_management/kms_crypto_client.py @@ -73,7 +73,8 @@ def __init__(self, config, **kwargs): 'regional_client': False, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/20180608' + 'base_path': '/20180608', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("kms_crypto", config, signer, key_management_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') diff --git a/src/oci/key_management/kms_management_client.py b/src/oci/key_management/kms_management_client.py index 44eebcbe16..981b6513e9 100644 --- a/src/oci/key_management/kms_management_client.py +++ b/src/oci/key_management/kms_management_client.py @@ -73,7 +73,8 @@ def __init__(self, config, **kwargs): 'regional_client': False, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/20180608' + 'base_path': '/20180608', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("kms_management", config, signer, key_management_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') diff --git a/src/oci/key_management/kms_vault_client.py b/src/oci/key_management/kms_vault_client.py index e70acc9462..9938da2d02 100644 --- a/src/oci/key_management/kms_vault_client.py +++ b/src/oci/key_management/kms_vault_client.py @@ -73,7 +73,8 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/20180608' + 'base_path': '/20180608', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("kms_vault", config, signer, key_management_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') diff --git a/src/oci/load_balancer/load_balancer_client.py b/src/oci/load_balancer/load_balancer_client.py index 19d4d3c9f9..4071dbbb00 100644 --- a/src/oci/load_balancer/load_balancer_client.py +++ b/src/oci/load_balancer/load_balancer_client.py @@ -73,7 +73,8 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/20170115' + 'base_path': '/20170115', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("load_balancer", config, signer, load_balancer_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') diff --git a/src/oci/object_storage/object_storage_client.py b/src/oci/object_storage/object_storage_client.py index e09fbd9d0d..e61e57e09b 100644 --- a/src/oci/object_storage/object_storage_client.py +++ b/src/oci/object_storage/object_storage_client.py @@ -73,7 +73,8 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/' + 'base_path': '/', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("object_storage", config, signer, object_storage_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') diff --git a/src/oci/resource_search/resource_search_client.py b/src/oci/resource_search/resource_search_client.py index 262119154b..bc748f1032 100644 --- a/src/oci/resource_search/resource_search_client.py +++ b/src/oci/resource_search/resource_search_client.py @@ -73,7 +73,8 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'timeout': kwargs.get('timeout'), - 'base_path': '/20180409' + 'base_path': '/20180409', + 'skip_deserialization': kwargs.get('skip_deserialization', False) } self.base_client = BaseClient("resource_search", config, signer, resource_search_type_mapping, **base_client_init_kwargs) self.retry_strategy = kwargs.get('retry_strategy') diff --git a/src/oci/service_endpoints.py b/src/oci/service_endpoints.py index 477935bd5d..bf78b0f299 100644 --- a/src/oci/service_endpoints.py +++ b/src/oci/service_endpoints.py @@ -3,19 +3,20 @@ SERVICE_ENDPOINTS = { "audit": "https://audit.{domain}", - "container_engine": "https://containerengine.{domain}", "blockstorage": "https://iaas.{domain}", "compute": "https://iaas.{domain}", - "virtual_network": "https://iaas.{domain}", + "compute_management": "https://iaas.{domain}", + "container_engine": "https://containerengine.{domain}", "database": "https://database.{domain}", "dns": "https://dns.{domain}", "email": "https://email.{domain}", "file_storage": "https://filestorage.{domain}", "identity": "https://identity.{domain}", "kms_crypto": "https://kms.{domain}", - "kms_provisioning": "https://kms.{domain}", + "kms_management": "https://kms.{domain}", "kms_vault": "https://kms.{domain}", "load_balancer": "https://iaas.{domain}", "object_storage": "https://objectstorage.{domain}", - "resource_search": "https://query.{domain}" + "resource_search": "https://query.{domain}", + "virtual_network": "https://iaas.{domain}" } diff --git a/src/oci/version.py b/src/oci/version.py index 4f99df8a8a..acc86b3d9e 100644 --- a/src/oci/version.py +++ b/src/oci/version.py @@ -1,4 +1,4 @@ # coding: utf-8 # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -__version__ = "2.0.5" +__version__ = "2.0.6" diff --git a/tests/test_config_container.py b/tests/test_config_container.py index a1952d7f3c..dbdffe2b08 100644 --- a/tests/test_config_container.py +++ b/tests/test_config_container.py @@ -8,6 +8,7 @@ from . import vcr_mods # noqa: F401 import oci +import time import vcr vcr_mode = None @@ -37,3 +38,12 @@ def do_wait(client, *args, **kwargs): kwargs['max_interval_seconds'] = 0 return oci.wait_until(client, *args, **kwargs) + + +# If we are mocking responses, then we don't need to sleep while waiting +# for a service to get to a particular state +def vcr_sleep(duration): + if vcr_mode == 'none': + duration = 0 + + time.sleep(duration)