diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3e163a42d..c4929018c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,16 @@ Change Log All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.124.1 - 2024-03-12 +==================== + +Added +----- +* Support for new development license type on dedicated infrastructure in the Database service +* Support for placement parameters on Autonomous Container Database create operation in the Database service +* Support for autoscaling on model deployment in the Data Science service + ==================== 2.124.0 - 2024-03-05 ==================== diff --git a/docs/api/data_science.rst b/docs/api/data_science.rst index c939f64ae..f6fbe8955 100644 --- a/docs/api/data_science.rst +++ b/docs/api/data_science.rst @@ -22,6 +22,8 @@ Data Science oci.data_science.models.ArtifactExportDetailsObjectStorage oci.data_science.models.ArtifactImportDetails oci.data_science.models.ArtifactImportDetailsObjectStorage + oci.data_science.models.AutoScalingPolicy + oci.data_science.models.AutoScalingPolicyDetails oci.data_science.models.CategoryLogDetails oci.data_science.models.ChangeDataSciencePrivateEndpointCompartmentDetails oci.data_science.models.ChangeJobCompartmentDetails @@ -44,6 +46,8 @@ Data Science oci.data_science.models.CreatePipelineDetails oci.data_science.models.CreatePipelineRunDetails oci.data_science.models.CreateProjectDetails + oci.data_science.models.CustomExpressionQueryScalingConfiguration + oci.data_science.models.CustomMetricExpressionRule oci.data_science.models.DataSciencePrivateEndpoint oci.data_science.models.DataSciencePrivateEndpointSummary oci.data_science.models.DefaultJobConfigurationDetails @@ -54,6 +58,7 @@ Data Science oci.data_science.models.FixedSizeScalingPolicy oci.data_science.models.ImportModelArtifactDetails oci.data_science.models.InstanceConfiguration + oci.data_science.models.InstancePoolModelDeploymentSystemData oci.data_science.models.Job oci.data_science.models.JobConfigurationDetails oci.data_science.models.JobEnvironmentConfigurationDetails @@ -68,6 +73,7 @@ Data Science oci.data_science.models.LogDetails oci.data_science.models.ManagedEgressStandaloneJobInfrastructureConfigurationDetails oci.data_science.models.Metadata + oci.data_science.models.MetricExpressionRule oci.data_science.models.Model oci.data_science.models.ModelConfigurationDetails oci.data_science.models.ModelDeployment @@ -76,6 +82,7 @@ Data Science oci.data_science.models.ModelDeploymentInstanceShapeConfigDetails oci.data_science.models.ModelDeploymentShapeSummary oci.data_science.models.ModelDeploymentSummary + oci.data_science.models.ModelDeploymentSystemData oci.data_science.models.ModelProvenance oci.data_science.models.ModelSummary oci.data_science.models.ModelVersionSet @@ -113,12 +120,16 @@ Data Science oci.data_science.models.PipelineStepRun oci.data_science.models.PipelineStepUpdateDetails oci.data_science.models.PipelineSummary + oci.data_science.models.PredefinedExpressionThresholdScalingConfiguration + oci.data_science.models.PredefinedMetricExpressionRule oci.data_science.models.Project oci.data_science.models.ProjectSummary + oci.data_science.models.ScalingConfiguration oci.data_science.models.ScalingPolicy oci.data_science.models.SingleModelDeploymentConfigurationDetails oci.data_science.models.StandaloneJobInfrastructureConfigurationDetails oci.data_science.models.StorageMountConfigurationDetails + oci.data_science.models.ThresholdBasedAutoScalingPolicyDetails oci.data_science.models.UpdateCategoryLogDetails oci.data_science.models.UpdateDataSciencePrivateEndpointDetails oci.data_science.models.UpdateDefaultModelDeploymentEnvironmentConfigurationDetails diff --git a/docs/api/data_science/models/oci.data_science.models.AutoScalingPolicy.rst b/docs/api/data_science/models/oci.data_science.models.AutoScalingPolicy.rst new file mode 100644 index 000000000..ecf03fc75 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.AutoScalingPolicy.rst @@ -0,0 +1,11 @@ +AutoScalingPolicy +================= + +.. currentmodule:: oci.data_science.models + +.. autoclass:: AutoScalingPolicy + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.AutoScalingPolicyDetails.rst b/docs/api/data_science/models/oci.data_science.models.AutoScalingPolicyDetails.rst new file mode 100644 index 000000000..e659950dc --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.AutoScalingPolicyDetails.rst @@ -0,0 +1,11 @@ +AutoScalingPolicyDetails +======================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: AutoScalingPolicyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.CustomExpressionQueryScalingConfiguration.rst b/docs/api/data_science/models/oci.data_science.models.CustomExpressionQueryScalingConfiguration.rst new file mode 100644 index 000000000..c22e35b6f --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.CustomExpressionQueryScalingConfiguration.rst @@ -0,0 +1,11 @@ +CustomExpressionQueryScalingConfiguration +========================================= + +.. currentmodule:: oci.data_science.models + +.. autoclass:: CustomExpressionQueryScalingConfiguration + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.CustomMetricExpressionRule.rst b/docs/api/data_science/models/oci.data_science.models.CustomMetricExpressionRule.rst new file mode 100644 index 000000000..ff3bef9d4 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.CustomMetricExpressionRule.rst @@ -0,0 +1,11 @@ +CustomMetricExpressionRule +========================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: CustomMetricExpressionRule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.InstancePoolModelDeploymentSystemData.rst b/docs/api/data_science/models/oci.data_science.models.InstancePoolModelDeploymentSystemData.rst new file mode 100644 index 000000000..fddf46d15 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.InstancePoolModelDeploymentSystemData.rst @@ -0,0 +1,11 @@ +InstancePoolModelDeploymentSystemData +===================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: InstancePoolModelDeploymentSystemData + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.MetricExpressionRule.rst b/docs/api/data_science/models/oci.data_science.models.MetricExpressionRule.rst new file mode 100644 index 000000000..69df8188c --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.MetricExpressionRule.rst @@ -0,0 +1,11 @@ +MetricExpressionRule +==================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: MetricExpressionRule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ModelDeploymentSystemData.rst b/docs/api/data_science/models/oci.data_science.models.ModelDeploymentSystemData.rst new file mode 100644 index 000000000..d2abcb874 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ModelDeploymentSystemData.rst @@ -0,0 +1,11 @@ +ModelDeploymentSystemData +========================= + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ModelDeploymentSystemData + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.PredefinedExpressionThresholdScalingConfiguration.rst b/docs/api/data_science/models/oci.data_science.models.PredefinedExpressionThresholdScalingConfiguration.rst new file mode 100644 index 000000000..d9296c7ee --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.PredefinedExpressionThresholdScalingConfiguration.rst @@ -0,0 +1,11 @@ +PredefinedExpressionThresholdScalingConfiguration +================================================= + +.. currentmodule:: oci.data_science.models + +.. autoclass:: PredefinedExpressionThresholdScalingConfiguration + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.PredefinedMetricExpressionRule.rst b/docs/api/data_science/models/oci.data_science.models.PredefinedMetricExpressionRule.rst new file mode 100644 index 000000000..fb572131d --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.PredefinedMetricExpressionRule.rst @@ -0,0 +1,11 @@ +PredefinedMetricExpressionRule +============================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: PredefinedMetricExpressionRule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ScalingConfiguration.rst b/docs/api/data_science/models/oci.data_science.models.ScalingConfiguration.rst new file mode 100644 index 000000000..b96108802 --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ScalingConfiguration.rst @@ -0,0 +1,11 @@ +ScalingConfiguration +==================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ScalingConfiguration + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_science/models/oci.data_science.models.ThresholdBasedAutoScalingPolicyDetails.rst b/docs/api/data_science/models/oci.data_science.models.ThresholdBasedAutoScalingPolicyDetails.rst new file mode 100644 index 000000000..235065e5d --- /dev/null +++ b/docs/api/data_science/models/oci.data_science.models.ThresholdBasedAutoScalingPolicyDetails.rst @@ -0,0 +1,11 @@ +ThresholdBasedAutoScalingPolicyDetails +====================================== + +.. currentmodule:: oci.data_science.models + +.. autoclass:: ThresholdBasedAutoScalingPolicyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/examples/showoci/CHANGELOG.rst b/examples/showoci/CHANGELOG.rst index fbae6364e..77104648e 100644 --- a/examples/showoci/CHANGELOG.rst +++ b/examples/showoci/CHANGELOG.rst @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +===================== +24.03.12 - 24.03.12 +===================== +* Added exclude for GENAI and OCE +* Factor Client Creation for rest of services + ===================== 24.03.03 - 24.03.03 ===================== diff --git a/examples/showoci/showoci.py b/examples/showoci/showoci.py index b15103bfb..474b54492 100644 --- a/examples/showoci/showoci.py +++ b/examples/showoci/showoci.py @@ -128,7 +128,7 @@ import os import time -version = "24.03.03" +version = "24.03.12" ########################################################################## # check OCI version @@ -349,7 +349,7 @@ def set_parser_arguments(argsList=[]): parser.add_argument('-paas', '-dataai', action='store_true', default=False, dest='paas_native', help='Print Native, Data and AI.') parser.add_argument('-n', '-l', action='store_true', default=False, dest='network', help='Print Network.') - parser.add_argument('-exclude', default="", dest='exclude', help='Exclude Services, Currently support NETWORK, QUOTAS, LIMITS, DNSZONE, VCIRCUITS.') + parser.add_argument('-exclude', default="", dest='exclude', help='Exclude Services, Currently support NETWORK, QUOTAS, LIMITS, DNSZONE, VCIRCUITS, OCE, GENAI.') parser.add_argument('-noparallel', action='store_true', default=False, dest='skip_threads', help='Do not run in parallel processing (Threads).') parser.add_argument('-threads', default=8, dest='threads', type=int, help='Threads Processes when running with Threads (default=8).') parser.add_argument('-nobackups', action='store_true', default=False, dest='skip_backups', help='Do not process backups.') diff --git a/examples/showoci/showoci_data.py b/examples/showoci/showoci_data.py index 1f182008b..a350f891b 100644 --- a/examples/showoci/showoci_data.py +++ b/examples/showoci/showoci_data.py @@ -20,7 +20,7 @@ class ShowOCIData(object): - version = "24.03.03" + version = "24.03.12" ############################################ # ShowOCIService - Service object to query diff --git a/examples/showoci/showoci_output.py b/examples/showoci/showoci_output.py index b921edd98..29aa4332b 100644 --- a/examples/showoci/showoci_output.py +++ b/examples/showoci/showoci_output.py @@ -22,7 +22,7 @@ class ShowOCIOutput(object): - version = "24.03.03" + version = "24.03.12" ########################################################################## # spaces for align diff --git a/examples/showoci/showoci_service.py b/examples/showoci/showoci_service.py index 065b4fcc6..ed7528b94 100644 --- a/examples/showoci/showoci_service.py +++ b/examples/showoci/showoci_service.py @@ -39,7 +39,7 @@ # class ShowOCIService ########################################################################## class ShowOCIService(object): - version = "24.03.03" + version = "24.03.12" oci_compatible_version = "2.119.1" thread_lock = threading.Lock() @@ -269,6 +269,8 @@ class ShowOCIService(object): ########################################################################## EXCLUDE_NETWORK = 'NETWORK' EXCLUDE_LIMITS = 'LIMITS' + EXCLUDE_OCE = 'OCE' + EXCLUDE_GENAI = 'GENAI' EXCLUDE_QUOTAS = 'QUOTAS' EXCLUDE_DNSZONE = 'DNSZONE' EXCLUDE_VCIRCUITS = 'VCIRCUITS' @@ -1101,10 +1103,14 @@ def search_multi_items(self, module, section, p1, v1, p2=None, v2=None, p3=None, ########################################################################## # Create client ########################################################################## - def __create_client(self, client, service_endpoint=None): + def __create_client(self, client, service_endpoint=None, key=None): c = None + # if key exists for exclude + if key and key in self.flags.exclude: + return c + # If client has service endpoint: if service_endpoint: c = client(self.config, signer=self.signer, service_endpoint=service_endpoint, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) @@ -1304,6 +1310,20 @@ def __check_request_error(self, e, compartment=[], info=""): def __if_managed_paas_compartment(self, name): return name == "ManagedCompartmentForPaaS" + ########################################################################## + # print excluded + ########################################################################## + def __load_print_thread_exclude(self, header): + + str_cnt = str("(-)").ljust(7) + + if self.flags.skip_threads: + print(" " + str_cnt + " - excluded") + else: + # lock for printing + with self.thread_lock: + print("--> " + header.ljust(32) + "<-- excluded") + ########################################################################## # print count result for Thread ########################################################################## @@ -14439,44 +14459,24 @@ def __load_section_native_data_ai_main(self): print("Native, Data and AI ...") # For Native - oic_client = oci.integration.IntegrationInstanceClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - oac_client = oci.analytics.AnalyticsClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - oce_client = oci.oce.OceInstanceClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - ocvs_client = oci.ocvp.SddcClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - esxi_client = oci.ocvp.EsxiHostClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - cluster_client = oci.ocvp.ClusterClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - vb_client = oci.visual_builder.VbInstanceClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - opensearch_client = oci.opensearch.OpensearchClusterClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - virtual_network = oci.core.VirtualNetworkClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - devops_client = oci.devops.DevopsClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - - ds_client = oci.data_science.DataScienceClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - dc_client = oci.data_catalog.DataCatalogClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - df_client = oci.data_flow.DataFlowClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - oda_client = oci.oda.OdaClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - bds_client = oci.bds.BdsClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - di_client = oci.data_integration.DataIntegrationClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - genai_client = oci.generative_ai.GenerativeAiClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout)) - - if self.flags.proxy: - oic_client.base_client.session.proxies = {'https': self.flags.proxy} - oac_client.base_client.session.proxies = {'https': self.flags.proxy} - oce_client.base_client.session.proxies = {'https': self.flags.proxy} - ocvs_client.base_client.session.proxies = {'https': self.flags.proxy} - vb_client.base_client.session.proxies = {'https': self.flags.proxy} - esxi_client.base_client.session.proxies = {'https': self.flags.proxy} - cluster_client.base_client.session.proxies = {'https': self.flags.proxy} - virtual_network.base_client.session.proxies = {'https': self.flags.proxy} - opensearch_client.base_client.session.proxies = {'https': self.flags.proxy} - devops_client.base_client.session.proxies = {'https': self.flags.proxy} - - ds_client.base_client.session.proxies = {'https': self.flags.proxy} - dc_client.base_client.session.proxies = {'https': self.flags.proxy} - df_client.base_client.session.proxies = {'https': self.flags.proxy} - oda_client.base_client.session.proxies = {'https': self.flags.proxy} - bds_client.base_client.session.proxies = {'https': self.flags.proxy} - di_client.base_client.session.proxies = {'https': self.flags.proxy} - genai_client.base_client.session.proxies = {'https': self.flags.proxy} + oic_client = self.__create_client(oci.integration.IntegrationInstanceClient) + oac_client = self.__create_client(oci.analytics.AnalyticsClient) + ocvs_client = self.__create_client(oci.ocvp.SddcClient) + esxi_client = self.__create_client(oci.ocvp.EsxiHostClient) + cluster_client = self.__create_client(oci.integration.IntegrationInstanceClient) + vb_client = self.__create_client(oci.visual_builder.VbInstanceClient) + opensearch_client = self.__create_client(oci.opensearch.OpensearchClusterClient) + virtual_network = self.__create_client(oci.core.VirtualNetworkClient) + devops_client = self.__create_client(oci.devops.DevopsClient) + oce_client = self.__create_client(oci.oce.OceInstanceClient, key=self.EXCLUDE_OCE) + + ds_client = self.__create_client(oci.data_science.DataScienceClient) + dc_client = self.__create_client(oci.data_catalog.DataCatalogClient) + df_client = self.__create_client(oci.data_flow.DataFlowClient) + oda_client = self.__create_client(oci.oda.OdaClient) + bds_client = self.__create_client(oci.bds.BdsClient) + di_client = self.__create_client(oci.data_integration.DataIntegrationClient) + genai_client = self.__create_client(oci.generative_ai.GenerativeAiClient, key=self.EXCLUDE_GENAI) # reference to compartments compartments = self.get_compartments() @@ -15251,10 +15251,15 @@ def __load_data_ai_data_genai(self, ai_client, compartments): start_time = time.time() try: + errstr = "" header = "Generative AI" self.__load_print_status_with_threads(header) + if self.EXCLUDE_GENAI in self.flags.exclude: + self.__load_print_thread_exclude(header) + return data + # loop on all compartments for compartment in compartments: @@ -15877,10 +15882,15 @@ def __load_paas_oce(self, oce_client, compartments): start_time = time.time() try: + errstr = "" header = "OCE Native" self.__load_print_status_with_threads(header) + if self.EXCLUDE_OCE in self.flags.exclude: + self.__load_print_thread_exclude(header) + return data + # loop on all compartments for compartment in compartments: @@ -16317,14 +16327,15 @@ def __load_limits(self, limits_client, tenancy_id, compartments): cnt = 0 start_time = time.time() - if self.EXCLUDE_LIMITS in self.flags.exclude: - return data - try: errstr = "" header = "Limits" self.__load_print_status_with_threads(header) + if self.EXCLUDE_LIMITS in self.flags.exclude: + self.__load_print_thread_exclude(header) + return data + services = [] try: services = oci.pagination.list_call_get_all_results( @@ -17787,7 +17798,6 @@ def __get_o_auth2_client_credentials(self, identity_domain_client, ocid, ext_cre search_request = oci.identity_domains.models.OAuth2ClientCredentialSearchRequest(filter='user.ocid eq "' + self.get_value(ocid) + '"', schemas=["urn:ietf:params:scim:api:messages:2.0:SearchRequest"]) result = identity_domain_client.search_o_auth2_client_credentials(o_auth2_client_credential_search_request=search_request) for r in result.data.resources: - print(">> " + str(r)) k = { "ocid": r.ocid, "description": r.description, diff --git a/examples/showsubscription/README.md b/examples/showsubscription/README.md new file mode 100644 index 000000000..9aaf0d100 --- /dev/null +++ b/examples/showsubscription/README.md @@ -0,0 +1,165 @@ +## SHOWSUBSCRIPTION - Oracle Cloud Infrastructure subscruption reporting + +SHOWSUBSCRIPTION is a subscription reporting tool which uses the Python SDK to extract tenant subscription and commit. +Authentication by User or Compute using instance principals, + +**DISCLAIMER – This is not an official Oracle application, It does not supported by Oracle Support. + +**Developed by Adi Zohar, 2021-2024** + +## Modules Included: +- oci.osub_organization_subscription.OrganizationSubscriptionClient +- oci.osub_subscription.CommitmentClient +- oci.onesubscription.SubscribedServiceClient + +## Executing using Cloud Shell: +``` +1. install oci sdk package + pip3 install --user oci + +2. clone the oci sdk repo + git clone https://github.com/oracle/oci-python-sdk + +3. run showsubscription.py with delegation token + cd oci-python-sdk/examples/showsubscription + python3 showsubscription.py -dt +``` + +## Installation of Python 3 incase you don't have Python3 installed: +Please follow [Python Documentation](https://docs.python.org/3/using/index.html) + +## Install OCI SDK Packages: +Please follow [Oracle Python SDK Documentation](https://github.com/oracle/oci-python-sdk) + +## Setup connectivity using Instance Principals + +``` +1. Login to your OCI Cloud console + +2. Create new Dynamic Group : DynShowSubscriptionGroup + Obtain Compute OCID and add rule - any {ALL {instance.id = 'ocid1.instance.oc1.xxxxxxxxxx'}} + +3. Create new Policy: DynShowSubscriptionGroupPolicy with Statements: + Allow dynamic group DynShowSubscriptionGroup to inspect tenancies in tenancy + Allow dynamic group DynShowSubscriptionGroup to inspect subscribed-services in tenancy + Allow dynamic group DynShowSubscriptionGroup to inspect organizations-subscription in tenancy +``` + +## Setup connectivity using User + +``` +1. Login to your OCI Cloud console + +2. Create new group : ShowSubscriptionGroup + +3. Create new Policy: ShowSubscriptionGroupPolicy with Statements: + Allow group ShowSubscriptionGroup to inspect tenancies in tenancy + Allow group ShowSubscriptionGroup to inspect subscribed-services in tenancy + Allow group ShowSubscriptionGroup to inspect organizations-subscription in tenancy + +4. Create new User : showsubscription.user -> Add to ShowSubscriptionGroup group + +5. Config OCI config file - ~/.oci/config + Please follow SDK config documentation - https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm +``` + +## Copy the Software +Download the showsubscription.py from this project + +Execute + +``` +$ python3 showsubscription.py + +optional arguments: + -h, --help show this help message and exit + -c CONFIG_FILE OCI CLI Config file + -t CONFIG_PROFILE Config Profile inside the config file + -p PROXY Set Proxy (i.e. www-proxy-server.com:80) + -ip Use Instance Principals for Authentication + -dt Use Delegation Token for Authentication + -all_services All Services (Default Universal Credit) + -all_statuses All Subscription Statuses (Default ACTIVE) + -f FILE Output to file (as json) +``` + +## Below example of reports from demo tenancy (random info generated) + +######################################################################################################################## +# Running Show Subscription # +######################################################################################################################## +Author : Adi Zohar +Disclaimer : This is not an official Oracle application, It does not supported by Oracle ! +Machine : temp-mac (arm64) +App Version : 2024.03.01 +OCI SDK Version : 2.123.0 +Python Version : 3.10.6 +Authentication : Config File +Date/Time : 2024-03-01 22:17:15 +Command Line : -t DEFAULT +Service Filter : UCC +Status Filter : ACTIVE + +######################################################################################################################## +# Fetching data # +######################################################################################################################## + +Connecting to Identity Service... + +Tenant Name : test_tenant +Tenant Id : ocid1.tenancy.oc1..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +Home Region : us-ashburn-1 + +#################################################################################################### +# Universal Credits # +#################################################################################################### + +Id : 12345678 +Service Name : Universal Credits +Currency : USD +Time Start : 2023-01-01 00:00 +Time End : 2025-12-31 23:59 +Status : ACTIVE +Total Value : 100 + +##################################################################################### +# B88206 - Oracle PaaS and IaaS Universal Credits # +##################################################################################### +status : ACTIVE +subscription_id : 12345678 +id : 12345678 +time_start : 2023-01-01 00:00 +time_end : 2025-12-31 23:59 +term_value : 3 +admin_email : abc@test.com +buyer_email : abc@test.com +agreement_id : 100000000000 +agreement_name : US-CSA-12345678 +time_agreement_end : 2025-01-01 23:59 +bill_to_customer : The Company +end_user_customer : The Company +service_to_customer : The Company +billing_frequency : Annual in Advance / Monthly Usage +csi : 12345678 +operation_type : REPLENISH +order_type : CLOUD SERVICES +order_number : 12345678 +payment_method : PO Number +payment_number : 12345678 +pricing_model : Annual +product_number : B88206 +product_name : Oracle PaaS and IaaS Universal Credits +is_payg : +is_having_usage : True +is_variable_commitment : True +original_promo_amount : +funded_allocation_value : +line_net_amount : 1000 +total_value : 1000 +used_amount : 100 +available_amount : 900 +--> Commit : 2023-01-01 - 2023-12-31, Total: 1000 Used: 1000 Available: 0 Funded: +--> Commit : 2024-01-01 - 2024-12-31, Total: 1000 Used: 900 Available: 100 Funded: +--> Commit : 2025-01-01 - 2025-12-31, Total: 1000 Used: 0 Available: 1000 Funded: + +``` diff --git a/examples/showsubscription/showsubscription.py b/examples/showsubscription/showsubscription.py new file mode 100644 index 000000000..a3242e4ec --- /dev/null +++ b/examples/showsubscription/showsubscription.py @@ -0,0 +1,409 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +#################################################################################################################### +# showsubscription.py +# +# @author: Adi Zohar, Mar 01 2024 +# +# Supports Python 3 +#################################################################################################################### +# Application Command line parameters +# +# -c config - OCI CLI Config +# -t profile - profile inside the config file +# -p proxy - Set Proxy (i.e. www-proxy-server.com:80) +# -ip - Use Instance Principals for Authentication +# -dt - Use Instance Principals with delegation token for cloud shell +# -all_services - Show all services (default Universal Credit only) +# -all_statuses - Show all Statuses (default ACTIVE only) +# -f FILE_NAME - Write to JSON file +# +#################################################################################################################### +# Modules Included: +# - oci.osub_organization_subscription.OrganizationSubscriptionClient +# - oci.osub_subscription.CommitmentClient +# - oci.onesubscription.SubscribedServiceClient +# +# APIs Used: +# - IdentityClient.get_tenancy - Policy TENANCY_INSPECT +# - IdentityClient.list_region_subscriptions - Policy TENANCY_INSPECT +# - OrganizationSubscriptionClient.list_organization_subscriptions - Policy ORGANIZATIONS_SUBSCRIPTION_INSPECT +# - SubscribedServiceClient.list_subscribed_services - Policy SUBSCRIBED_SERVICE_INSPECT +# - CommitmentClient.list_commitments - Policy SUBSCRIBED_SERVICE_INSPECT +# +# Policies: +# Allow group ShowSubscriptionGroup to inspect tenancies in tenancy +# Allow group ShowSubscriptionGroup to inspect subscribed-services in tenancy +# Allow group ShowSubscriptionGroup to inspect organizations-subscription in tenancy +#################################################################################################################### +import sys +import argparse +import datetime +import oci +import os +import platform +import json + +version = "2024.03.01" + + +########################################################################## +# Print header centered +########################################################################## +def print_header(name, category): + options = {0: 120, 1: 100, 2: 90, 3: 85} + chars = int(options[category]) + print("") + print('#' * chars) + print("#" + name.center(chars - 2, " ") + "#") + print('#' * chars) + + +########################################################################## +# number_format +########################################################################## +def number_format(var): + if str(var).replace(".", "").isnumeric(): + return str("{:,.0f}".format(float(var))).rjust(12) + return var + + +########################################################################## +# Create signer for Authentication +# Input - config_profile and is_instance_principals and is_delegation_token +# Output - config and signer objects +########################################################################## +def create_signer(config_file, config_profile, is_instance_principals, is_delegation_token): + + # if instance principals authentications + if is_instance_principals: + try: + signer = oci.auth.signers.InstancePrincipalsSecurityTokenSigner() + config = {'region': signer.region, 'tenancy': signer.tenancy_id} + return config, signer + + except Exception: + print_header("Error obtaining instance principals certificate, aborting", 0) + raise SystemExit + + # ----------------------------- + # Delegation Token + # ----------------------------- + elif is_delegation_token: + + try: + # check if env variables OCI_CONFIG_FILE, OCI_CONFIG_PROFILE exist and use them + env_config_file = os.environ.get('OCI_CONFIG_FILE') + env_config_section = os.environ.get('OCI_CONFIG_PROFILE') + + # check if file exist + if env_config_file is None or env_config_section is None: + print("*** OCI_CONFIG_FILE and OCI_CONFIG_PROFILE env variables not found, abort. ***") + print("") + raise SystemExit + + config = oci.config.from_file(env_config_file, env_config_section) + delegation_token_location = config["delegation_token_file"] + + with open(delegation_token_location, 'r') as delegation_token_file: + delegation_token = delegation_token_file.read().strip() + # get signer from delegation token + signer = oci.auth.signers.InstancePrincipalsDelegationTokenSigner(delegation_token=delegation_token) + + return config, signer + + except KeyError: + print("* Key Error obtaining delegation_token_file") + raise SystemExit + + except Exception: + raise + + # ----------------------------- + # config file authentication + # ----------------------------- + else: + config = oci.config.from_file( + (config_file if config_file else oci.config.DEFAULT_LOCATION), + (config_profile if config_profile else oci.config.DEFAULT_PROFILE) + ) + signer = oci.signer.Signer( + tenancy=config["tenancy"], + user=config["user"], + fingerprint=config["fingerprint"], + private_key_file_location=config.get("key_file"), + pass_phrase=oci.config.get_config_value_or_default(config, "pass_phrase"), + private_key_content=config.get("key_content") + ) + return config, signer + + +########################################################################## +# Subscription Report +########################################################################## +def subscription_report(cmd, config, signer, tenancy): + + data = { + 'tenant_id': tenancy.id, + 'tenant_name': tenancy.name, + 'subscriptions': [] + } + + try: + osub_org_client = oci.osub_organization_subscription.OrganizationSubscriptionClient(config, signer=signer) + one_sub_client = oci.onesubscription.SubscribedServiceClient(config, signer=signer) + osub_commit_client = oci.osub_subscription.CommitmentClient(config, signer=signer) + + if cmd.proxy: + osub_org_client.base_client.session.proxies = {'https': cmd.proxy} + one_sub_client.base_client.session.proxies = {'https': cmd.proxy} + osub_commit_client.base_client.session.proxies = {'https': cmd.proxy} + + ############################ + # Get Subscription list + ############################ + subscription_list = osub_org_client.list_organization_subscriptions(tenancy.id, "0") + ucc_sub = [x for x in subscription_list.data if cmd.all_services or 'Universal' in x.service_name] + + for sub in ucc_sub: + + sub_info = { + 'id': sub.id, + 'service_name': str(sub.service_name), + 'currency': sub.currency.iso_code if sub.currency else "", + 'time_start': str(sub.time_start)[0:16], + 'time_end': str(sub.time_end)[0:16], + 'status': str(sub.status), + 'total_value': str(sub.total_value), + 'services': [] + } + + print_header(sub.service_name, 1) + print("") + print(f"Id : {sub_info['id']}") + print(f"Service Name : {sub_info['service_name']}") + print(f"Currency : {sub_info['currency']}") + print(f"Time Start : {sub_info['time_start']}") + print(f"Time End : {sub_info['time_end']}") + print(f"Status : {sub_info['status']}") + print(f"Total Value : {number_format(sub_info['total_value'])}") + + ############################ + # Get Subscribed Service + ############################ + subscribed_services = one_sub_client.list_subscribed_services(tenancy.id, sub.id).data + for ss in subscribed_services: + if not cmd.all_statuses and ss.status != 'ACTIVE': + continue + + small_sub = { + 'status': ss.status, + 'subscription_id': ss.subscription_id, + 'id': ss.id, + 'time_start': str(ss.time_start)[0:16], + 'time_end': str(ss.time_end)[0:16], + 'term_value': str(ss.term_value), + 'admin_email': ss.admin_email, + 'buyer_email': ss.buyer_email, + 'agreement_id': ss.agreement_id, + 'agreement_name': ss.agreement_name, + 'time_agreement_end': str(ss.time_agreement_end)[0:16], + 'bill_to_customer': ss.bill_to_customer.name if ss.bill_to_customer else "", + 'end_user_customer': ss.end_user_customer.name if ss.end_user_customer else "", + 'service_to_customer': ss.service_to_customer.name if ss.service_to_customer else "", + 'billing_frequency': ss.billing_frequency, + 'csi': ss.csi, + 'operation_type': ss.operation_type, + 'order_type': ss.order_type, + 'order_number': ss.order_number, + 'payment_method': ss.payment_method, + 'payment_number': ss.payment_number, + 'pricing_model': ss.pricing_model, + 'product_number': ss.product.part_number if ss.product else "", + 'product_name': ss.product.name if ss.product else "", + 'is_payg': str(ss.is_payg) if ss.is_payg else "", + 'is_having_usage': str(ss.is_having_usage), + 'is_variable_commitment': str(ss.is_variable_commitment), + 'original_promo_amount': "" if str(ss.original_promo_amount) == "null" else ss.original_promo_amount, + 'funded_allocation_value': "" if str(ss.funded_allocation_value) == "null" else ss.funded_allocation_value, + 'line_net_amount': ss.line_net_amount, + 'total_value': ss.total_value, + 'used_amount': ss.used_amount, + 'available_amount': ss.available_amount, + 'commits': [] + } + + print_header(small_sub['product_number'] + " - " + small_sub['product_name'], 3) + print("") + print(f"status : {small_sub['status']}") + print(f"subscription_id : {small_sub['subscription_id']}") + print(f"id : {small_sub['id']}") + print(f"time_start : {small_sub['time_start']}") + print(f"time_end : {small_sub['time_end']}") + print(f"term_value : {small_sub['term_value']}") + print(f"admin_email : {small_sub['admin_email']}") + print(f"buyer_email : {small_sub['buyer_email']}") + print(f"agreement_id : {small_sub['agreement_id']}") + print(f"agreement_name : {small_sub['agreement_name']}") + print(f"time_agreement_end : {small_sub['time_agreement_end']}") + print(f"bill_to_customer : {small_sub['bill_to_customer']}") + print(f"end_user_customer : {small_sub['end_user_customer']}") + print(f"service_to_customer : {small_sub['service_to_customer']}") + print(f"billing_frequency : {small_sub['billing_frequency']}") + print(f"csi : {small_sub['csi']}") + print(f"operation_type : {small_sub['operation_type']}") + print(f"order_type : {small_sub['order_type']}") + print(f"order_number : {small_sub['order_number']}") + print(f"payment_method : {small_sub['payment_method']}") + print(f"payment_number : {small_sub['payment_number']}") + print(f"pricing_model : {small_sub['pricing_model']}") + print(f"product_number : {small_sub['product_number']}") + print(f"product_name : {small_sub['product_name']}") + print(f"is_payg : {small_sub['is_payg']}") + print(f"is_having_usage : {small_sub['is_having_usage']}") + print(f"is_variable_commitment : {small_sub['is_variable_commitment']}") + print(f"original_promo_amount : {small_sub['original_promo_amount']}") + print(f"funded_allocation_value : {small_sub['funded_allocation_value']}") + print(f"line_net_amount : {number_format(small_sub['line_net_amount'])}") + print(f"total_value : {number_format(small_sub['total_value'])}") + print(f"used_amount : {number_format(small_sub['used_amount'])}") + print(f"available_amount : {number_format(small_sub['available_amount'])}") + + # Add the commits + try: + commits = osub_commit_client.list_commitments(ss.id, compartment_id=tenancy.id).data + for commit in commits: + carr = { + 'funded_allocation_value': "" if commit.funded_allocation_value == "null" else commit.funded_allocation_value, + 'time_start': str(commit.time_start)[0:16], + 'time_end': str(commit.time_end)[0:16], + 'quantity': str(commit.quantity), + 'used_amount': str(commit.used_amount), + 'available_amount': str(commit.available_amount) + } + small_sub['commits'].append(carr) + + print( + f"--> Commit : {carr['time_start'][0:10]} - {carr['time_end'][0:10]}, " + f"Total: {number_format(carr['quantity'])} " + f"Used: {number_format(carr['used_amount'])} " + f"Available: {number_format(carr['available_amount'])} " + f"Funded: {number_format(carr['funded_allocation_value'])}") + + except oci.exceptions.ServiceError as e: + small_sub['commits_error'] = e.code + + sub_info['services'].append(small_sub) + + # add to data + data['subscriptions'].append(sub_info) + + # return the data + return data + + except oci.exceptions.ServiceError as e: + print("\nService Error at 'subscription_report' - " + str(e)) + return data + + except Exception as e: + print("\nException Error at 'subscription_report' - " + str(e)) + return data + + +########################################################################## +# Main Process +########################################################################## +def main(): + + # Get Command Line Parser + parser = argparse.ArgumentParser(usage=argparse.SUPPRESS, formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=80, width=130)) + parser.add_argument('-c', default="", dest='config_file', help='OCI CLI Config file') + parser.add_argument('-t', default="", dest='config_profile', help='Config Profile inside the config file') + parser.add_argument('-p', default="", dest='proxy', help='Set Proxy (i.e. www-proxy-server.com:80) ') + parser.add_argument('-ip', action='store_true', default=False, dest='is_instance_principals', help='Use Instance Principals for Authentication') + parser.add_argument('-dt', action='store_true', default=False, dest='is_delegation_token', help='Use Delegation Token for Authentication') + parser.add_argument('-all_services', action='store_true', default=False, dest='all_services', help='All Services (Default Universal Credit)') + parser.add_argument('-all_statuses', action='store_true', default=False, dest='all_statuses', help='All Subscription Statuses (Default ACTIVE)') + parser.add_argument('-f', type=argparse.FileType('w'), dest='file', help="Output to file (as json)") + cmd = parser.parse_args() + + if len(sys.argv) < 2: + parser.print_help() + return + + # Start print time info + print_header("Running Show Subscription", 0) + + print("Author : Adi Zohar") + print("Disclaimer : This is not an official Oracle application, It does not supported by Oracle !") + print("Machine : " + platform.node() + " (" + platform.machine() + ")") + print("App Version : " + version) + print("OCI SDK Version : " + oci.version.__version__) + print("Python Version : " + platform.python_version()) + if cmd.is_instance_principals: + print("Authentication : Instance Principals") + elif cmd.is_delegation_token: + print("Authentication : Instance Principals With Delegation Token") + else: + print("Authentication : Config File") + print("Date/Time : " + str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))) + print("Command Line : " + ' '.join(x for x in sys.argv[1:])) + print("Service Filter : " + ("ALL" if cmd.all_services else "UCC")) + print("Status Filter : " + ("ALL" if cmd.all_statuses else "ACTIVE")) + if cmd.file: + print("Writing to file..." + cmd.file.name) + + ############################################ + # create signer + ############################################ + config, signer = create_signer(cmd.config_file, cmd.config_profile, cmd.is_instance_principals, cmd.is_delegation_token) + + print_header("Fetching data", 0) + tenancy = None + try: + print("\nConnecting to Identity Service...\n") + identity = oci.identity.IdentityClient(config, signer=signer) + if cmd.proxy: + identity.base_client.session.proxies = {'https': cmd.proxy} + + tenancy = identity.get_tenancy(config["tenancy"]).data + regions = identity.list_region_subscriptions(tenancy.id).data + + # Set home region for connection + for reg in regions: + if reg.is_home_region: + tenancy_home_region = str(reg.region_name) + + config['region'] = tenancy_home_region + signer.region = tenancy_home_region + + print("Tenant Name : " + str(tenancy.name)) + print("Tenant Id : " + tenancy.id) + print("Home Region : " + tenancy_home_region) + + except Exception as e: + raise RuntimeError("\nError fetching tenant information - " + str(e)) + + ############################################ + # Connection to UsageAPI + ############################################ + try: + data = subscription_report(cmd, config, signer, tenancy) + + # If print to json file + if cmd.file and data: + with open(cmd.file.name, 'w') as outfile: + json.dump(data, outfile, indent=4, sort_keys=False) + print("") + print("Exported to file " + cmd.file.name) + + except Exception as e: + raise RuntimeError("\nError at main function - " + str(e)) + + +########################################################################## +# Main Process +########################################################################## +main() diff --git a/src/oci/data_science/models/__init__.py b/src/oci/data_science/models/__init__.py index 59ab3e100..035290af2 100644 --- a/src/oci/data_science/models/__init__.py +++ b/src/oci/data_science/models/__init__.py @@ -10,6 +10,8 @@ from .artifact_export_details_object_storage import ArtifactExportDetailsObjectStorage from .artifact_import_details import ArtifactImportDetails from .artifact_import_details_object_storage import ArtifactImportDetailsObjectStorage +from .auto_scaling_policy import AutoScalingPolicy +from .auto_scaling_policy_details import AutoScalingPolicyDetails from .category_log_details import CategoryLogDetails from .change_data_science_private_endpoint_compartment_details import ChangeDataSciencePrivateEndpointCompartmentDetails from .change_job_compartment_details import ChangeJobCompartmentDetails @@ -32,6 +34,8 @@ from .create_pipeline_details import CreatePipelineDetails from .create_pipeline_run_details import CreatePipelineRunDetails from .create_project_details import CreateProjectDetails +from .custom_expression_query_scaling_configuration import CustomExpressionQueryScalingConfiguration +from .custom_metric_expression_rule import CustomMetricExpressionRule from .data_science_private_endpoint import DataSciencePrivateEndpoint from .data_science_private_endpoint_summary import DataSciencePrivateEndpointSummary from .default_job_configuration_details import DefaultJobConfigurationDetails @@ -42,6 +46,7 @@ from .fixed_size_scaling_policy import FixedSizeScalingPolicy from .import_model_artifact_details import ImportModelArtifactDetails from .instance_configuration import InstanceConfiguration +from .instance_pool_model_deployment_system_data import InstancePoolModelDeploymentSystemData from .job import Job from .job_configuration_details import JobConfigurationDetails from .job_environment_configuration_details import JobEnvironmentConfigurationDetails @@ -56,6 +61,7 @@ from .log_details import LogDetails from .managed_egress_standalone_job_infrastructure_configuration_details import ManagedEgressStandaloneJobInfrastructureConfigurationDetails from .metadata import Metadata +from .metric_expression_rule import MetricExpressionRule from .model import Model from .model_configuration_details import ModelConfigurationDetails from .model_deployment import ModelDeployment @@ -64,6 +70,7 @@ from .model_deployment_instance_shape_config_details import ModelDeploymentInstanceShapeConfigDetails from .model_deployment_shape_summary import ModelDeploymentShapeSummary from .model_deployment_summary import ModelDeploymentSummary +from .model_deployment_system_data import ModelDeploymentSystemData from .model_provenance import ModelProvenance from .model_summary import ModelSummary from .model_version_set import ModelVersionSet @@ -101,12 +108,16 @@ from .pipeline_step_run import PipelineStepRun from .pipeline_step_update_details import PipelineStepUpdateDetails from .pipeline_summary import PipelineSummary +from .predefined_expression_threshold_scaling_configuration import PredefinedExpressionThresholdScalingConfiguration +from .predefined_metric_expression_rule import PredefinedMetricExpressionRule from .project import Project from .project_summary import ProjectSummary +from .scaling_configuration import ScalingConfiguration from .scaling_policy import ScalingPolicy from .single_model_deployment_configuration_details import SingleModelDeploymentConfigurationDetails from .standalone_job_infrastructure_configuration_details import StandaloneJobInfrastructureConfigurationDetails from .storage_mount_configuration_details import StorageMountConfigurationDetails +from .threshold_based_auto_scaling_policy_details import ThresholdBasedAutoScalingPolicyDetails from .update_category_log_details import UpdateCategoryLogDetails from .update_data_science_private_endpoint_details import UpdateDataSciencePrivateEndpointDetails from .update_default_model_deployment_environment_configuration_details import UpdateDefaultModelDeploymentEnvironmentConfigurationDetails @@ -137,6 +148,8 @@ "ArtifactExportDetailsObjectStorage": ArtifactExportDetailsObjectStorage, "ArtifactImportDetails": ArtifactImportDetails, "ArtifactImportDetailsObjectStorage": ArtifactImportDetailsObjectStorage, + "AutoScalingPolicy": AutoScalingPolicy, + "AutoScalingPolicyDetails": AutoScalingPolicyDetails, "CategoryLogDetails": CategoryLogDetails, "ChangeDataSciencePrivateEndpointCompartmentDetails": ChangeDataSciencePrivateEndpointCompartmentDetails, "ChangeJobCompartmentDetails": ChangeJobCompartmentDetails, @@ -159,6 +172,8 @@ "CreatePipelineDetails": CreatePipelineDetails, "CreatePipelineRunDetails": CreatePipelineRunDetails, "CreateProjectDetails": CreateProjectDetails, + "CustomExpressionQueryScalingConfiguration": CustomExpressionQueryScalingConfiguration, + "CustomMetricExpressionRule": CustomMetricExpressionRule, "DataSciencePrivateEndpoint": DataSciencePrivateEndpoint, "DataSciencePrivateEndpointSummary": DataSciencePrivateEndpointSummary, "DefaultJobConfigurationDetails": DefaultJobConfigurationDetails, @@ -169,6 +184,7 @@ "FixedSizeScalingPolicy": FixedSizeScalingPolicy, "ImportModelArtifactDetails": ImportModelArtifactDetails, "InstanceConfiguration": InstanceConfiguration, + "InstancePoolModelDeploymentSystemData": InstancePoolModelDeploymentSystemData, "Job": Job, "JobConfigurationDetails": JobConfigurationDetails, "JobEnvironmentConfigurationDetails": JobEnvironmentConfigurationDetails, @@ -183,6 +199,7 @@ "LogDetails": LogDetails, "ManagedEgressStandaloneJobInfrastructureConfigurationDetails": ManagedEgressStandaloneJobInfrastructureConfigurationDetails, "Metadata": Metadata, + "MetricExpressionRule": MetricExpressionRule, "Model": Model, "ModelConfigurationDetails": ModelConfigurationDetails, "ModelDeployment": ModelDeployment, @@ -191,6 +208,7 @@ "ModelDeploymentInstanceShapeConfigDetails": ModelDeploymentInstanceShapeConfigDetails, "ModelDeploymentShapeSummary": ModelDeploymentShapeSummary, "ModelDeploymentSummary": ModelDeploymentSummary, + "ModelDeploymentSystemData": ModelDeploymentSystemData, "ModelProvenance": ModelProvenance, "ModelSummary": ModelSummary, "ModelVersionSet": ModelVersionSet, @@ -228,12 +246,16 @@ "PipelineStepRun": PipelineStepRun, "PipelineStepUpdateDetails": PipelineStepUpdateDetails, "PipelineSummary": PipelineSummary, + "PredefinedExpressionThresholdScalingConfiguration": PredefinedExpressionThresholdScalingConfiguration, + "PredefinedMetricExpressionRule": PredefinedMetricExpressionRule, "Project": Project, "ProjectSummary": ProjectSummary, + "ScalingConfiguration": ScalingConfiguration, "ScalingPolicy": ScalingPolicy, "SingleModelDeploymentConfigurationDetails": SingleModelDeploymentConfigurationDetails, "StandaloneJobInfrastructureConfigurationDetails": StandaloneJobInfrastructureConfigurationDetails, "StorageMountConfigurationDetails": StorageMountConfigurationDetails, + "ThresholdBasedAutoScalingPolicyDetails": ThresholdBasedAutoScalingPolicyDetails, "UpdateCategoryLogDetails": UpdateCategoryLogDetails, "UpdateDataSciencePrivateEndpointDetails": UpdateDataSciencePrivateEndpointDetails, "UpdateDefaultModelDeploymentEnvironmentConfigurationDetails": UpdateDefaultModelDeploymentEnvironmentConfigurationDetails, diff --git a/src/oci/data_science/models/auto_scaling_policy.py b/src/oci/data_science/models/auto_scaling_policy.py new file mode 100644 index 000000000..02c472673 --- /dev/null +++ b/src/oci/data_science/models/auto_scaling_policy.py @@ -0,0 +1,148 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .scaling_policy import ScalingPolicy +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 AutoScalingPolicy(ScalingPolicy): + """ + The scaling policy to enable autoscaling on the model deployment. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AutoScalingPolicy object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.AutoScalingPolicy.policy_type` attribute + of this class is ``AUTOSCALING`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param policy_type: + The value to assign to the policy_type property of this AutoScalingPolicy. + Allowed values for this property are: "FIXED_SIZE", "AUTOSCALING" + :type policy_type: str + + :param cool_down_in_seconds: + The value to assign to the cool_down_in_seconds property of this AutoScalingPolicy. + :type cool_down_in_seconds: int + + :param is_enabled: + The value to assign to the is_enabled property of this AutoScalingPolicy. + :type is_enabled: bool + + :param auto_scaling_policies: + The value to assign to the auto_scaling_policies property of this AutoScalingPolicy. + :type auto_scaling_policies: list[oci.data_science.models.AutoScalingPolicyDetails] + + """ + self.swagger_types = { + 'policy_type': 'str', + 'cool_down_in_seconds': 'int', + 'is_enabled': 'bool', + 'auto_scaling_policies': 'list[AutoScalingPolicyDetails]' + } + + self.attribute_map = { + 'policy_type': 'policyType', + 'cool_down_in_seconds': 'coolDownInSeconds', + 'is_enabled': 'isEnabled', + 'auto_scaling_policies': 'autoScalingPolicies' + } + + self._policy_type = None + self._cool_down_in_seconds = None + self._is_enabled = None + self._auto_scaling_policies = None + self._policy_type = 'AUTOSCALING' + + @property + def cool_down_in_seconds(self): + """ + Gets the cool_down_in_seconds of this AutoScalingPolicy. + For threshold-based autoscaling policies, this value is the minimum period of time to wait between scaling actions. + The cooldown period gives the system time to stabilize before rescaling. The minimum value is 600 seconds, which + is also the default. The cooldown period starts when the model deployment becomes ACTIVE after the scaling operation. + + + :return: The cool_down_in_seconds of this AutoScalingPolicy. + :rtype: int + """ + return self._cool_down_in_seconds + + @cool_down_in_seconds.setter + def cool_down_in_seconds(self, cool_down_in_seconds): + """ + Sets the cool_down_in_seconds of this AutoScalingPolicy. + For threshold-based autoscaling policies, this value is the minimum period of time to wait between scaling actions. + The cooldown period gives the system time to stabilize before rescaling. The minimum value is 600 seconds, which + is also the default. The cooldown period starts when the model deployment becomes ACTIVE after the scaling operation. + + + :param cool_down_in_seconds: The cool_down_in_seconds of this AutoScalingPolicy. + :type: int + """ + self._cool_down_in_seconds = cool_down_in_seconds + + @property + def is_enabled(self): + """ + Gets the is_enabled of this AutoScalingPolicy. + Whether the autoscaling policy is enabled. + + + :return: The is_enabled of this AutoScalingPolicy. + :rtype: bool + """ + return self._is_enabled + + @is_enabled.setter + def is_enabled(self, is_enabled): + """ + Sets the is_enabled of this AutoScalingPolicy. + Whether the autoscaling policy is enabled. + + + :param is_enabled: The is_enabled of this AutoScalingPolicy. + :type: bool + """ + self._is_enabled = is_enabled + + @property + def auto_scaling_policies(self): + """ + **[Required]** Gets the auto_scaling_policies of this AutoScalingPolicy. + The list of autoscaling policy details. + + + :return: The auto_scaling_policies of this AutoScalingPolicy. + :rtype: list[oci.data_science.models.AutoScalingPolicyDetails] + """ + return self._auto_scaling_policies + + @auto_scaling_policies.setter + def auto_scaling_policies(self, auto_scaling_policies): + """ + Sets the auto_scaling_policies of this AutoScalingPolicy. + The list of autoscaling policy details. + + + :param auto_scaling_policies: The auto_scaling_policies of this AutoScalingPolicy. + :type: list[oci.data_science.models.AutoScalingPolicyDetails] + """ + self._auto_scaling_policies = auto_scaling_policies + + 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/data_science/models/auto_scaling_policy_details.py b/src/oci/data_science/models/auto_scaling_policy_details.py new file mode 100644 index 000000000..fce039fdb --- /dev/null +++ b/src/oci/data_science/models/auto_scaling_policy_details.py @@ -0,0 +1,104 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 AutoScalingPolicyDetails(object): + """ + Details for an autoscaling policy to enable on the model deployment. + Each autoscaling configuration can have one autoscaling policy. + In a threshold-based autoscaling policy, an autoscaling action is triggered when a performance metric meets + or exceeds a threshold. + """ + + #: A constant which can be used with the auto_scaling_policy_type property of a AutoScalingPolicyDetails. + #: This constant has a value of "THRESHOLD" + AUTO_SCALING_POLICY_TYPE_THRESHOLD = "THRESHOLD" + + def __init__(self, **kwargs): + """ + Initializes a new AutoScalingPolicyDetails 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.data_science.models.ThresholdBasedAutoScalingPolicyDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param auto_scaling_policy_type: + The value to assign to the auto_scaling_policy_type property of this AutoScalingPolicyDetails. + Allowed values for this property are: "THRESHOLD", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type auto_scaling_policy_type: str + + """ + self.swagger_types = { + 'auto_scaling_policy_type': 'str' + } + + self.attribute_map = { + 'auto_scaling_policy_type': 'autoScalingPolicyType' + } + + self._auto_scaling_policy_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['autoScalingPolicyType'] + + if type == 'THRESHOLD': + return 'ThresholdBasedAutoScalingPolicyDetails' + else: + return 'AutoScalingPolicyDetails' + + @property + def auto_scaling_policy_type(self): + """ + **[Required]** Gets the auto_scaling_policy_type of this AutoScalingPolicyDetails. + The type of autoscaling policy. + + Allowed values for this property are: "THRESHOLD", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The auto_scaling_policy_type of this AutoScalingPolicyDetails. + :rtype: str + """ + return self._auto_scaling_policy_type + + @auto_scaling_policy_type.setter + def auto_scaling_policy_type(self, auto_scaling_policy_type): + """ + Sets the auto_scaling_policy_type of this AutoScalingPolicyDetails. + The type of autoscaling policy. + + + :param auto_scaling_policy_type: The auto_scaling_policy_type of this AutoScalingPolicyDetails. + :type: str + """ + allowed_values = ["THRESHOLD"] + if not value_allowed_none_or_none_sentinel(auto_scaling_policy_type, allowed_values): + auto_scaling_policy_type = 'UNKNOWN_ENUM_VALUE' + self._auto_scaling_policy_type = auto_scaling_policy_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/data_science/models/custom_expression_query_scaling_configuration.py b/src/oci/data_science/models/custom_expression_query_scaling_configuration.py new file mode 100644 index 000000000..ec8477d4c --- /dev/null +++ b/src/oci/data_science/models/custom_expression_query_scaling_configuration.py @@ -0,0 +1,124 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .scaling_configuration import ScalingConfiguration +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 CustomExpressionQueryScalingConfiguration(ScalingConfiguration): + """ + The scaling configuration for the custom metric expression rule. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CustomExpressionQueryScalingConfiguration object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.CustomExpressionQueryScalingConfiguration.scaling_configuration_type` attribute + of this class is ``QUERY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param scaling_configuration_type: + The value to assign to the scaling_configuration_type property of this CustomExpressionQueryScalingConfiguration. + Allowed values for this property are: "THRESHOLD", "QUERY" + :type scaling_configuration_type: str + + :param pending_duration: + The value to assign to the pending_duration property of this CustomExpressionQueryScalingConfiguration. + :type pending_duration: str + + :param instance_count_adjustment: + The value to assign to the instance_count_adjustment property of this CustomExpressionQueryScalingConfiguration. + :type instance_count_adjustment: int + + :param query: + The value to assign to the query property of this CustomExpressionQueryScalingConfiguration. + :type query: str + + """ + self.swagger_types = { + 'scaling_configuration_type': 'str', + 'pending_duration': 'str', + 'instance_count_adjustment': 'int', + 'query': 'str' + } + + self.attribute_map = { + 'scaling_configuration_type': 'scalingConfigurationType', + 'pending_duration': 'pendingDuration', + 'instance_count_adjustment': 'instanceCountAdjustment', + 'query': 'query' + } + + self._scaling_configuration_type = None + self._pending_duration = None + self._instance_count_adjustment = None + self._query = None + self._scaling_configuration_type = 'QUERY' + + @property + def query(self): + """ + **[Required]** Gets the query of this CustomExpressionQueryScalingConfiguration. + The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of + the Monitoring service interprets results for each returned time series as Boolean values, + where zero represents false and a non-zero value represents true. A true value means that the trigger + rule condition has been met. The query must specify a metric, statistic, interval, and trigger + rule (threshold or absence). Supported values for interval: `1m`-`60m` (also `1h`). You can optionally + specify dimensions and grouping functions. Supported grouping functions: `grouping()`, `groupBy()`. + + Example of threshold alarm: + + ----- + + CPUUtilization[1m]{resourceId = \"MODEL_DEPLOYMENT_OCID\"}.grouping().mean() < 25 + CPUUtilization[1m]{resourceId = \"MODEL_DEPLOYMENT_OCID\"}.grouping().mean() > 75 + + ----- + + + :return: The query of this CustomExpressionQueryScalingConfiguration. + :rtype: str + """ + return self._query + + @query.setter + def query(self, query): + """ + Sets the query of this CustomExpressionQueryScalingConfiguration. + The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of + the Monitoring service interprets results for each returned time series as Boolean values, + where zero represents false and a non-zero value represents true. A true value means that the trigger + rule condition has been met. The query must specify a metric, statistic, interval, and trigger + rule (threshold or absence). Supported values for interval: `1m`-`60m` (also `1h`). You can optionally + specify dimensions and grouping functions. Supported grouping functions: `grouping()`, `groupBy()`. + + Example of threshold alarm: + + ----- + + CPUUtilization[1m]{resourceId = \"MODEL_DEPLOYMENT_OCID\"}.grouping().mean() < 25 + CPUUtilization[1m]{resourceId = \"MODEL_DEPLOYMENT_OCID\"}.grouping().mean() > 75 + + ----- + + + :param query: The query of this CustomExpressionQueryScalingConfiguration. + :type: str + """ + self._query = query + + 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/data_science/models/custom_metric_expression_rule.py b/src/oci/data_science/models/custom_metric_expression_rule.py new file mode 100644 index 000000000..bcfaa8615 --- /dev/null +++ b/src/oci/data_science/models/custom_metric_expression_rule.py @@ -0,0 +1,105 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .metric_expression_rule import MetricExpressionRule +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 CustomMetricExpressionRule(MetricExpressionRule): + """ + A custom Monitoring Query Language (MQL) expression for triggering an autoscaling action on the model deployment. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CustomMetricExpressionRule object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.CustomMetricExpressionRule.metric_expression_rule_type` attribute + of this class is ``CUSTOM_EXPRESSION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param metric_expression_rule_type: + The value to assign to the metric_expression_rule_type property of this CustomMetricExpressionRule. + Allowed values for this property are: "PREDEFINED_EXPRESSION", "CUSTOM_EXPRESSION" + :type metric_expression_rule_type: str + + :param scale_in_configuration: + The value to assign to the scale_in_configuration property of this CustomMetricExpressionRule. + :type scale_in_configuration: oci.data_science.models.CustomExpressionQueryScalingConfiguration + + :param scale_out_configuration: + The value to assign to the scale_out_configuration property of this CustomMetricExpressionRule. + :type scale_out_configuration: oci.data_science.models.CustomExpressionQueryScalingConfiguration + + """ + self.swagger_types = { + 'metric_expression_rule_type': 'str', + 'scale_in_configuration': 'CustomExpressionQueryScalingConfiguration', + 'scale_out_configuration': 'CustomExpressionQueryScalingConfiguration' + } + + self.attribute_map = { + 'metric_expression_rule_type': 'metricExpressionRuleType', + 'scale_in_configuration': 'scaleInConfiguration', + 'scale_out_configuration': 'scaleOutConfiguration' + } + + self._metric_expression_rule_type = None + self._scale_in_configuration = None + self._scale_out_configuration = None + self._metric_expression_rule_type = 'CUSTOM_EXPRESSION' + + @property + def scale_in_configuration(self): + """ + **[Required]** Gets the scale_in_configuration of this CustomMetricExpressionRule. + + :return: The scale_in_configuration of this CustomMetricExpressionRule. + :rtype: oci.data_science.models.CustomExpressionQueryScalingConfiguration + """ + return self._scale_in_configuration + + @scale_in_configuration.setter + def scale_in_configuration(self, scale_in_configuration): + """ + Sets the scale_in_configuration of this CustomMetricExpressionRule. + + :param scale_in_configuration: The scale_in_configuration of this CustomMetricExpressionRule. + :type: oci.data_science.models.CustomExpressionQueryScalingConfiguration + """ + self._scale_in_configuration = scale_in_configuration + + @property + def scale_out_configuration(self): + """ + **[Required]** Gets the scale_out_configuration of this CustomMetricExpressionRule. + + :return: The scale_out_configuration of this CustomMetricExpressionRule. + :rtype: oci.data_science.models.CustomExpressionQueryScalingConfiguration + """ + return self._scale_out_configuration + + @scale_out_configuration.setter + def scale_out_configuration(self, scale_out_configuration): + """ + Sets the scale_out_configuration of this CustomMetricExpressionRule. + + :param scale_out_configuration: The scale_out_configuration of this CustomMetricExpressionRule. + :type: oci.data_science.models.CustomExpressionQueryScalingConfiguration + """ + self._scale_out_configuration = scale_out_configuration + + 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/data_science/models/fixed_size_scaling_policy.py b/src/oci/data_science/models/fixed_size_scaling_policy.py index 0ec1076d8..38767c995 100644 --- a/src/oci/data_science/models/fixed_size_scaling_policy.py +++ b/src/oci/data_science/models/fixed_size_scaling_policy.py @@ -23,7 +23,7 @@ def __init__(self, **kwargs): :param policy_type: The value to assign to the policy_type property of this FixedSizeScalingPolicy. - Allowed values for this property are: "FIXED_SIZE" + Allowed values for this property are: "FIXED_SIZE", "AUTOSCALING" :type policy_type: str :param instance_count: diff --git a/src/oci/data_science/models/instance_pool_model_deployment_system_data.py b/src/oci/data_science/models/instance_pool_model_deployment_system_data.py new file mode 100644 index 000000000..da00c6066 --- /dev/null +++ b/src/oci/data_science/models/instance_pool_model_deployment_system_data.py @@ -0,0 +1,82 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .model_deployment_system_data import ModelDeploymentSystemData +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 InstancePoolModelDeploymentSystemData(ModelDeploymentSystemData): + """ + Instance pool based model deployment system data. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InstancePoolModelDeploymentSystemData object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.InstancePoolModelDeploymentSystemData.system_infra_type` attribute + of this class is ``INSTANCE_POOL`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param system_infra_type: + The value to assign to the system_infra_type property of this InstancePoolModelDeploymentSystemData. + Allowed values for this property are: "INSTANCE_POOL" + :type system_infra_type: str + + :param current_instance_count: + The value to assign to the current_instance_count property of this InstancePoolModelDeploymentSystemData. + :type current_instance_count: int + + """ + self.swagger_types = { + 'system_infra_type': 'str', + 'current_instance_count': 'int' + } + + self.attribute_map = { + 'system_infra_type': 'systemInfraType', + 'current_instance_count': 'currentInstanceCount' + } + + self._system_infra_type = None + self._current_instance_count = None + self._system_infra_type = 'INSTANCE_POOL' + + @property + def current_instance_count(self): + """ + Gets the current_instance_count of this InstancePoolModelDeploymentSystemData. + This value is the current count of the model deployment instances. + + + :return: The current_instance_count of this InstancePoolModelDeploymentSystemData. + :rtype: int + """ + return self._current_instance_count + + @current_instance_count.setter + def current_instance_count(self, current_instance_count): + """ + Sets the current_instance_count of this InstancePoolModelDeploymentSystemData. + This value is the current count of the model deployment instances. + + + :param current_instance_count: The current_instance_count of this InstancePoolModelDeploymentSystemData. + :type: int + """ + self._current_instance_count = current_instance_count + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/metric_expression_rule.py b/src/oci/data_science/models/metric_expression_rule.py new file mode 100644 index 000000000..c43192de4 --- /dev/null +++ b/src/oci/data_science/models/metric_expression_rule.py @@ -0,0 +1,121 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 MetricExpressionRule(object): + """ + The metric expression rule base. + """ + + #: A constant which can be used with the metric_expression_rule_type property of a MetricExpressionRule. + #: This constant has a value of "PREDEFINED_EXPRESSION" + METRIC_EXPRESSION_RULE_TYPE_PREDEFINED_EXPRESSION = "PREDEFINED_EXPRESSION" + + #: A constant which can be used with the metric_expression_rule_type property of a MetricExpressionRule. + #: This constant has a value of "CUSTOM_EXPRESSION" + METRIC_EXPRESSION_RULE_TYPE_CUSTOM_EXPRESSION = "CUSTOM_EXPRESSION" + + def __init__(self, **kwargs): + """ + Initializes a new MetricExpressionRule 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.data_science.models.PredefinedMetricExpressionRule` + * :class:`~oci.data_science.models.CustomMetricExpressionRule` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param metric_expression_rule_type: + The value to assign to the metric_expression_rule_type property of this MetricExpressionRule. + Allowed values for this property are: "PREDEFINED_EXPRESSION", "CUSTOM_EXPRESSION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type metric_expression_rule_type: str + + """ + self.swagger_types = { + 'metric_expression_rule_type': 'str' + } + + self.attribute_map = { + 'metric_expression_rule_type': 'metricExpressionRuleType' + } + + self._metric_expression_rule_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['metricExpressionRuleType'] + + if type == 'PREDEFINED_EXPRESSION': + return 'PredefinedMetricExpressionRule' + + if type == 'CUSTOM_EXPRESSION': + return 'CustomMetricExpressionRule' + else: + return 'MetricExpressionRule' + + @property + def metric_expression_rule_type(self): + """ + **[Required]** Gets the metric_expression_rule_type of this MetricExpressionRule. + The metric expression for creating the alarm used to trigger autoscaling actions on the model deployment. + + The following values are supported: + + * `PREDEFINED_EXPRESSION`: An expression built using CPU or Memory metrics emitted by the Model Deployment Monitoring. + + * `CUSTOM_EXPRESSION`: A custom Monitoring Query Language (MQL) expression. + + Allowed values for this property are: "PREDEFINED_EXPRESSION", "CUSTOM_EXPRESSION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The metric_expression_rule_type of this MetricExpressionRule. + :rtype: str + """ + return self._metric_expression_rule_type + + @metric_expression_rule_type.setter + def metric_expression_rule_type(self, metric_expression_rule_type): + """ + Sets the metric_expression_rule_type of this MetricExpressionRule. + The metric expression for creating the alarm used to trigger autoscaling actions on the model deployment. + + The following values are supported: + + * `PREDEFINED_EXPRESSION`: An expression built using CPU or Memory metrics emitted by the Model Deployment Monitoring. + + * `CUSTOM_EXPRESSION`: A custom Monitoring Query Language (MQL) expression. + + + :param metric_expression_rule_type: The metric_expression_rule_type of this MetricExpressionRule. + :type: str + """ + allowed_values = ["PREDEFINED_EXPRESSION", "CUSTOM_EXPRESSION"] + if not value_allowed_none_or_none_sentinel(metric_expression_rule_type, allowed_values): + metric_expression_rule_type = 'UNKNOWN_ENUM_VALUE' + self._metric_expression_rule_type = metric_expression_rule_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/data_science/models/model_configuration_details.py b/src/oci/data_science/models/model_configuration_details.py index 7e1b505af..a25f7d09d 100644 --- a/src/oci/data_science/models/model_configuration_details.py +++ b/src/oci/data_science/models/model_configuration_details.py @@ -36,25 +36,32 @@ def __init__(self, **kwargs): The value to assign to the bandwidth_mbps property of this ModelConfigurationDetails. :type bandwidth_mbps: int + :param maximum_bandwidth_mbps: + The value to assign to the maximum_bandwidth_mbps property of this ModelConfigurationDetails. + :type maximum_bandwidth_mbps: int + """ self.swagger_types = { 'model_id': 'str', 'instance_configuration': 'InstanceConfiguration', 'scaling_policy': 'ScalingPolicy', - 'bandwidth_mbps': 'int' + 'bandwidth_mbps': 'int', + 'maximum_bandwidth_mbps': 'int' } self.attribute_map = { 'model_id': 'modelId', 'instance_configuration': 'instanceConfiguration', 'scaling_policy': 'scalingPolicy', - 'bandwidth_mbps': 'bandwidthMbps' + 'bandwidth_mbps': 'bandwidthMbps', + 'maximum_bandwidth_mbps': 'maximumBandwidthMbps' } self._model_id = None self._instance_configuration = None self._scaling_policy = None self._bandwidth_mbps = None + self._maximum_bandwidth_mbps = None @property def model_id(self): @@ -144,6 +151,30 @@ def bandwidth_mbps(self, bandwidth_mbps): """ self._bandwidth_mbps = bandwidth_mbps + @property + def maximum_bandwidth_mbps(self): + """ + Gets the maximum_bandwidth_mbps of this ModelConfigurationDetails. + The maximum network bandwidth for the model deployment. + + + :return: The maximum_bandwidth_mbps of this ModelConfigurationDetails. + :rtype: int + """ + return self._maximum_bandwidth_mbps + + @maximum_bandwidth_mbps.setter + def maximum_bandwidth_mbps(self, maximum_bandwidth_mbps): + """ + Sets the maximum_bandwidth_mbps of this ModelConfigurationDetails. + The maximum network bandwidth for the model deployment. + + + :param maximum_bandwidth_mbps: The maximum_bandwidth_mbps of this ModelConfigurationDetails. + :type: int + """ + self._maximum_bandwidth_mbps = maximum_bandwidth_mbps + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_science/models/model_deployment.py b/src/oci/data_science/models/model_deployment.py index c914be3b1..c7424d766 100644 --- a/src/oci/data_science/models/model_deployment.py +++ b/src/oci/data_science/models/model_deployment.py @@ -92,6 +92,10 @@ def __init__(self, **kwargs): The value to assign to the model_deployment_url property of this ModelDeployment. :type model_deployment_url: str + :param model_deployment_system_data: + The value to assign to the model_deployment_system_data property of this ModelDeployment. + :type model_deployment_system_data: oci.data_science.models.ModelDeploymentSystemData + :param lifecycle_state: The value to assign to the lifecycle_state property of this ModelDeployment. Allowed values for this property are: "CREATING", "ACTIVE", "DELETING", "FAILED", "INACTIVE", "UPDATING", "DELETED", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. @@ -122,6 +126,7 @@ def __init__(self, **kwargs): 'model_deployment_configuration_details': 'ModelDeploymentConfigurationDetails', 'category_log_details': 'CategoryLogDetails', 'model_deployment_url': 'str', + 'model_deployment_system_data': 'ModelDeploymentSystemData', 'lifecycle_state': 'str', 'lifecycle_details': 'str', 'freeform_tags': 'dict(str, str)', @@ -139,6 +144,7 @@ def __init__(self, **kwargs): 'model_deployment_configuration_details': 'modelDeploymentConfigurationDetails', 'category_log_details': 'categoryLogDetails', 'model_deployment_url': 'modelDeploymentUrl', + 'model_deployment_system_data': 'modelDeploymentSystemData', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', 'freeform_tags': 'freeformTags', @@ -155,6 +161,7 @@ def __init__(self, **kwargs): self._model_deployment_configuration_details = None self._category_log_details = None self._model_deployment_url = None + self._model_deployment_system_data = None self._lifecycle_state = None self._lifecycle_details = None self._freeform_tags = None @@ -416,6 +423,26 @@ def model_deployment_url(self, model_deployment_url): """ self._model_deployment_url = model_deployment_url + @property + def model_deployment_system_data(self): + """ + Gets the model_deployment_system_data of this ModelDeployment. + + :return: The model_deployment_system_data of this ModelDeployment. + :rtype: oci.data_science.models.ModelDeploymentSystemData + """ + return self._model_deployment_system_data + + @model_deployment_system_data.setter + def model_deployment_system_data(self, model_deployment_system_data): + """ + Sets the model_deployment_system_data of this ModelDeployment. + + :param model_deployment_system_data: The model_deployment_system_data of this ModelDeployment. + :type: oci.data_science.models.ModelDeploymentSystemData + """ + self._model_deployment_system_data = model_deployment_system_data + @property def lifecycle_state(self): """ diff --git a/src/oci/data_science/models/model_deployment_instance_shape_config_details.py b/src/oci/data_science/models/model_deployment_instance_shape_config_details.py index 8f347a818..889333ed8 100644 --- a/src/oci/data_science/models/model_deployment_instance_shape_config_details.py +++ b/src/oci/data_science/models/model_deployment_instance_shape_config_details.py @@ -15,6 +15,18 @@ class ModelDeploymentInstanceShapeConfigDetails(object): Details for the model-deployment instance shape configuration. """ + #: A constant which can be used with the cpu_baseline property of a ModelDeploymentInstanceShapeConfigDetails. + #: This constant has a value of "BASELINE_1_8" + CPU_BASELINE_BASELINE_1_8 = "BASELINE_1_8" + + #: A constant which can be used with the cpu_baseline property of a ModelDeploymentInstanceShapeConfigDetails. + #: This constant has a value of "BASELINE_1_2" + CPU_BASELINE_BASELINE_1_2 = "BASELINE_1_2" + + #: A constant which can be used with the cpu_baseline property of a ModelDeploymentInstanceShapeConfigDetails. + #: This constant has a value of "BASELINE_1_1" + CPU_BASELINE_BASELINE_1_1 = "BASELINE_1_1" + def __init__(self, **kwargs): """ Initializes a new ModelDeploymentInstanceShapeConfigDetails object with values from keyword arguments. @@ -28,19 +40,28 @@ def __init__(self, **kwargs): The value to assign to the memory_in_gbs property of this ModelDeploymentInstanceShapeConfigDetails. :type memory_in_gbs: float + :param cpu_baseline: + The value to assign to the cpu_baseline property of this ModelDeploymentInstanceShapeConfigDetails. + Allowed values for this property are: "BASELINE_1_8", "BASELINE_1_2", "BASELINE_1_1", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type cpu_baseline: str + """ self.swagger_types = { 'ocpus': 'float', - 'memory_in_gbs': 'float' + 'memory_in_gbs': 'float', + 'cpu_baseline': 'str' } self.attribute_map = { 'ocpus': 'ocpus', - 'memory_in_gbs': 'memoryInGBs' + 'memory_in_gbs': 'memoryInGBs', + 'cpu_baseline': 'cpuBaseline' } self._ocpus = None self._memory_in_gbs = None + self._cpu_baseline = None @property def ocpus(self): @@ -90,6 +111,44 @@ def memory_in_gbs(self, memory_in_gbs): """ self._memory_in_gbs = memory_in_gbs + @property + def cpu_baseline(self): + """ + Gets the cpu_baseline of this ModelDeploymentInstanceShapeConfigDetails. + The baseline OCPU utilization for a subcore burstable VM instance. If this attribute is left blank, it will default to `BASELINE_1_1`. + The following values are supported: + BASELINE_1_8 - baseline usage is 1/8 of an OCPU. + BASELINE_1_2 - baseline usage is 1/2 of an OCPU. + BASELINE_1_1 - baseline usage is an entire OCPU. This represents a non-burstable instance. + + Allowed values for this property are: "BASELINE_1_8", "BASELINE_1_2", "BASELINE_1_1", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The cpu_baseline of this ModelDeploymentInstanceShapeConfigDetails. + :rtype: str + """ + return self._cpu_baseline + + @cpu_baseline.setter + def cpu_baseline(self, cpu_baseline): + """ + Sets the cpu_baseline of this ModelDeploymentInstanceShapeConfigDetails. + The baseline OCPU utilization for a subcore burstable VM instance. If this attribute is left blank, it will default to `BASELINE_1_1`. + The following values are supported: + BASELINE_1_8 - baseline usage is 1/8 of an OCPU. + BASELINE_1_2 - baseline usage is 1/2 of an OCPU. + BASELINE_1_1 - baseline usage is an entire OCPU. This represents a non-burstable instance. + + + :param cpu_baseline: The cpu_baseline of this ModelDeploymentInstanceShapeConfigDetails. + :type: str + """ + allowed_values = ["BASELINE_1_8", "BASELINE_1_2", "BASELINE_1_1"] + if not value_allowed_none_or_none_sentinel(cpu_baseline, allowed_values): + cpu_baseline = 'UNKNOWN_ENUM_VALUE' + self._cpu_baseline = cpu_baseline + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_science/models/model_deployment_system_data.py b/src/oci/data_science/models/model_deployment_system_data.py new file mode 100644 index 000000000..8d6f30480 --- /dev/null +++ b/src/oci/data_science/models/model_deployment_system_data.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 ModelDeploymentSystemData(object): + """ + Model deployment system data. + """ + + #: A constant which can be used with the system_infra_type property of a ModelDeploymentSystemData. + #: This constant has a value of "INSTANCE_POOL" + SYSTEM_INFRA_TYPE_INSTANCE_POOL = "INSTANCE_POOL" + + def __init__(self, **kwargs): + """ + Initializes a new ModelDeploymentSystemData 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.data_science.models.InstancePoolModelDeploymentSystemData` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param system_infra_type: + The value to assign to the system_infra_type property of this ModelDeploymentSystemData. + Allowed values for this property are: "INSTANCE_POOL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type system_infra_type: str + + """ + self.swagger_types = { + 'system_infra_type': 'str' + } + + self.attribute_map = { + 'system_infra_type': 'systemInfraType' + } + + self._system_infra_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['systemInfraType'] + + if type == 'INSTANCE_POOL': + return 'InstancePoolModelDeploymentSystemData' + else: + return 'ModelDeploymentSystemData' + + @property + def system_infra_type(self): + """ + Gets the system_infra_type of this ModelDeploymentSystemData. + The infrastructure type of the model deployment. + + Allowed values for this property are: "INSTANCE_POOL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The system_infra_type of this ModelDeploymentSystemData. + :rtype: str + """ + return self._system_infra_type + + @system_infra_type.setter + def system_infra_type(self, system_infra_type): + """ + Sets the system_infra_type of this ModelDeploymentSystemData. + The infrastructure type of the model deployment. + + + :param system_infra_type: The system_infra_type of this ModelDeploymentSystemData. + :type: str + """ + allowed_values = ["INSTANCE_POOL"] + if not value_allowed_none_or_none_sentinel(system_infra_type, allowed_values): + system_infra_type = 'UNKNOWN_ENUM_VALUE' + self._system_infra_type = system_infra_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/data_science/models/predefined_expression_threshold_scaling_configuration.py b/src/oci/data_science/models/predefined_expression_threshold_scaling_configuration.py new file mode 100644 index 000000000..685a2e614 --- /dev/null +++ b/src/oci/data_science/models/predefined_expression_threshold_scaling_configuration.py @@ -0,0 +1,97 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .scaling_configuration import ScalingConfiguration +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 PredefinedExpressionThresholdScalingConfiguration(ScalingConfiguration): + """ + The scaling configuration for the predefined metric expression rule. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PredefinedExpressionThresholdScalingConfiguration object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.PredefinedExpressionThresholdScalingConfiguration.scaling_configuration_type` attribute + of this class is ``THRESHOLD`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param scaling_configuration_type: + The value to assign to the scaling_configuration_type property of this PredefinedExpressionThresholdScalingConfiguration. + Allowed values for this property are: "THRESHOLD", "QUERY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type scaling_configuration_type: str + + :param pending_duration: + The value to assign to the pending_duration property of this PredefinedExpressionThresholdScalingConfiguration. + :type pending_duration: str + + :param instance_count_adjustment: + The value to assign to the instance_count_adjustment property of this PredefinedExpressionThresholdScalingConfiguration. + :type instance_count_adjustment: int + + :param threshold: + The value to assign to the threshold property of this PredefinedExpressionThresholdScalingConfiguration. + :type threshold: int + + """ + self.swagger_types = { + 'scaling_configuration_type': 'str', + 'pending_duration': 'str', + 'instance_count_adjustment': 'int', + 'threshold': 'int' + } + + self.attribute_map = { + 'scaling_configuration_type': 'scalingConfigurationType', + 'pending_duration': 'pendingDuration', + 'instance_count_adjustment': 'instanceCountAdjustment', + 'threshold': 'threshold' + } + + self._scaling_configuration_type = None + self._pending_duration = None + self._instance_count_adjustment = None + self._threshold = None + self._scaling_configuration_type = 'THRESHOLD' + + @property + def threshold(self): + """ + **[Required]** Gets the threshold of this PredefinedExpressionThresholdScalingConfiguration. + A metric value at which the scaling operation will be triggered. + + + :return: The threshold of this PredefinedExpressionThresholdScalingConfiguration. + :rtype: int + """ + return self._threshold + + @threshold.setter + def threshold(self, threshold): + """ + Sets the threshold of this PredefinedExpressionThresholdScalingConfiguration. + A metric value at which the scaling operation will be triggered. + + + :param threshold: The threshold of this PredefinedExpressionThresholdScalingConfiguration. + :type: int + """ + self._threshold = threshold + + 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/data_science/models/predefined_metric_expression_rule.py b/src/oci/data_science/models/predefined_metric_expression_rule.py new file mode 100644 index 000000000..e17bd4f86 --- /dev/null +++ b/src/oci/data_science/models/predefined_metric_expression_rule.py @@ -0,0 +1,153 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .metric_expression_rule import MetricExpressionRule +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 PredefinedMetricExpressionRule(MetricExpressionRule): + """ + An expression built using CPU or Memory metrics for triggering an autoscaling action on the model deployment. + """ + + #: A constant which can be used with the metric_type property of a PredefinedMetricExpressionRule. + #: This constant has a value of "CPU_UTILIZATION" + METRIC_TYPE_CPU_UTILIZATION = "CPU_UTILIZATION" + + #: A constant which can be used with the metric_type property of a PredefinedMetricExpressionRule. + #: This constant has a value of "MEMORY_UTILIZATION" + METRIC_TYPE_MEMORY_UTILIZATION = "MEMORY_UTILIZATION" + + def __init__(self, **kwargs): + """ + Initializes a new PredefinedMetricExpressionRule object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.PredefinedMetricExpressionRule.metric_expression_rule_type` attribute + of this class is ``PREDEFINED_EXPRESSION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param metric_expression_rule_type: + The value to assign to the metric_expression_rule_type property of this PredefinedMetricExpressionRule. + Allowed values for this property are: "PREDEFINED_EXPRESSION", "CUSTOM_EXPRESSION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type metric_expression_rule_type: str + + :param metric_type: + The value to assign to the metric_type property of this PredefinedMetricExpressionRule. + Allowed values for this property are: "CPU_UTILIZATION", "MEMORY_UTILIZATION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type metric_type: str + + :param scale_in_configuration: + The value to assign to the scale_in_configuration property of this PredefinedMetricExpressionRule. + :type scale_in_configuration: oci.data_science.models.PredefinedExpressionThresholdScalingConfiguration + + :param scale_out_configuration: + The value to assign to the scale_out_configuration property of this PredefinedMetricExpressionRule. + :type scale_out_configuration: oci.data_science.models.PredefinedExpressionThresholdScalingConfiguration + + """ + self.swagger_types = { + 'metric_expression_rule_type': 'str', + 'metric_type': 'str', + 'scale_in_configuration': 'PredefinedExpressionThresholdScalingConfiguration', + 'scale_out_configuration': 'PredefinedExpressionThresholdScalingConfiguration' + } + + self.attribute_map = { + 'metric_expression_rule_type': 'metricExpressionRuleType', + 'metric_type': 'metricType', + 'scale_in_configuration': 'scaleInConfiguration', + 'scale_out_configuration': 'scaleOutConfiguration' + } + + self._metric_expression_rule_type = None + self._metric_type = None + self._scale_in_configuration = None + self._scale_out_configuration = None + self._metric_expression_rule_type = 'PREDEFINED_EXPRESSION' + + @property + def metric_type(self): + """ + **[Required]** Gets the metric_type of this PredefinedMetricExpressionRule. + Metric type + + Allowed values for this property are: "CPU_UTILIZATION", "MEMORY_UTILIZATION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The metric_type of this PredefinedMetricExpressionRule. + :rtype: str + """ + return self._metric_type + + @metric_type.setter + def metric_type(self, metric_type): + """ + Sets the metric_type of this PredefinedMetricExpressionRule. + Metric type + + + :param metric_type: The metric_type of this PredefinedMetricExpressionRule. + :type: str + """ + allowed_values = ["CPU_UTILIZATION", "MEMORY_UTILIZATION"] + if not value_allowed_none_or_none_sentinel(metric_type, allowed_values): + metric_type = 'UNKNOWN_ENUM_VALUE' + self._metric_type = metric_type + + @property + def scale_in_configuration(self): + """ + **[Required]** Gets the scale_in_configuration of this PredefinedMetricExpressionRule. + + :return: The scale_in_configuration of this PredefinedMetricExpressionRule. + :rtype: oci.data_science.models.PredefinedExpressionThresholdScalingConfiguration + """ + return self._scale_in_configuration + + @scale_in_configuration.setter + def scale_in_configuration(self, scale_in_configuration): + """ + Sets the scale_in_configuration of this PredefinedMetricExpressionRule. + + :param scale_in_configuration: The scale_in_configuration of this PredefinedMetricExpressionRule. + :type: oci.data_science.models.PredefinedExpressionThresholdScalingConfiguration + """ + self._scale_in_configuration = scale_in_configuration + + @property + def scale_out_configuration(self): + """ + **[Required]** Gets the scale_out_configuration of this PredefinedMetricExpressionRule. + + :return: The scale_out_configuration of this PredefinedMetricExpressionRule. + :rtype: oci.data_science.models.PredefinedExpressionThresholdScalingConfiguration + """ + return self._scale_out_configuration + + @scale_out_configuration.setter + def scale_out_configuration(self, scale_out_configuration): + """ + Sets the scale_out_configuration of this PredefinedMetricExpressionRule. + + :param scale_out_configuration: The scale_out_configuration of this PredefinedMetricExpressionRule. + :type: oci.data_science.models.PredefinedExpressionThresholdScalingConfiguration + """ + self._scale_out_configuration = scale_out_configuration + + 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/data_science/models/scaling_configuration.py b/src/oci/data_science/models/scaling_configuration.py new file mode 100644 index 000000000..05f00227b --- /dev/null +++ b/src/oci/data_science/models/scaling_configuration.py @@ -0,0 +1,185 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + + +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 ScalingConfiguration(object): + """ + Scaling configuration for the metric expression rule. + """ + + #: A constant which can be used with the scaling_configuration_type property of a ScalingConfiguration. + #: This constant has a value of "THRESHOLD" + SCALING_CONFIGURATION_TYPE_THRESHOLD = "THRESHOLD" + + #: A constant which can be used with the scaling_configuration_type property of a ScalingConfiguration. + #: This constant has a value of "QUERY" + SCALING_CONFIGURATION_TYPE_QUERY = "QUERY" + + def __init__(self, **kwargs): + """ + Initializes a new ScalingConfiguration 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.data_science.models.CustomExpressionQueryScalingConfiguration` + * :class:`~oci.data_science.models.PredefinedExpressionThresholdScalingConfiguration` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param scaling_configuration_type: + The value to assign to the scaling_configuration_type property of this ScalingConfiguration. + Allowed values for this property are: "THRESHOLD", "QUERY" + :type scaling_configuration_type: str + + :param pending_duration: + The value to assign to the pending_duration property of this ScalingConfiguration. + :type pending_duration: str + + :param instance_count_adjustment: + The value to assign to the instance_count_adjustment property of this ScalingConfiguration. + :type instance_count_adjustment: int + + """ + self.swagger_types = { + 'scaling_configuration_type': 'str', + 'pending_duration': 'str', + 'instance_count_adjustment': 'int' + } + + self.attribute_map = { + 'scaling_configuration_type': 'scalingConfigurationType', + 'pending_duration': 'pendingDuration', + 'instance_count_adjustment': 'instanceCountAdjustment' + } + + self._scaling_configuration_type = None + self._pending_duration = None + self._instance_count_adjustment = 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['scalingConfigurationType'] + + if type == 'QUERY': + return 'CustomExpressionQueryScalingConfiguration' + + if type == 'THRESHOLD': + return 'PredefinedExpressionThresholdScalingConfiguration' + else: + return 'ScalingConfiguration' + + @property + def scaling_configuration_type(self): + """ + **[Required]** Gets the scaling_configuration_type of this ScalingConfiguration. + The type of scaling configuration. + + Allowed values for this property are: "THRESHOLD", "QUERY" + + + :return: The scaling_configuration_type of this ScalingConfiguration. + :rtype: str + """ + return self._scaling_configuration_type + + @scaling_configuration_type.setter + def scaling_configuration_type(self, scaling_configuration_type): + """ + Sets the scaling_configuration_type of this ScalingConfiguration. + The type of scaling configuration. + + + :param scaling_configuration_type: The scaling_configuration_type of this ScalingConfiguration. + :type: str + """ + allowed_values = ["THRESHOLD", "QUERY"] + if not value_allowed_none_or_none_sentinel(scaling_configuration_type, allowed_values): + raise ValueError( + f"Invalid value for `scaling_configuration_type`, must be None or one of {allowed_values}" + ) + self._scaling_configuration_type = scaling_configuration_type + + @property + def pending_duration(self): + """ + Gets the pending_duration of this ScalingConfiguration. + The period of time that the condition defined in the alarm must persist before the alarm state + changes from \"OK\" to \"FIRING\" or vice versa. For example, a value of 5 minutes means that the + alarm must persist in breaching the condition for five minutes before the alarm updates its + state to \"FIRING\"; likewise, the alarm must persist in not breaching the condition for five + minutes before the alarm updates its state to \"OK.\" + + The duration is specified as a string in ISO 8601 format (`PT10M` for ten minutes or `PT1H` + for one hour). Minimum: PT3M. Maximum: PT1H. Default: PT3M. + + + :return: The pending_duration of this ScalingConfiguration. + :rtype: str + """ + return self._pending_duration + + @pending_duration.setter + def pending_duration(self, pending_duration): + """ + Sets the pending_duration of this ScalingConfiguration. + The period of time that the condition defined in the alarm must persist before the alarm state + changes from \"OK\" to \"FIRING\" or vice versa. For example, a value of 5 minutes means that the + alarm must persist in breaching the condition for five minutes before the alarm updates its + state to \"FIRING\"; likewise, the alarm must persist in not breaching the condition for five + minutes before the alarm updates its state to \"OK.\" + + The duration is specified as a string in ISO 8601 format (`PT10M` for ten minutes or `PT1H` + for one hour). Minimum: PT3M. Maximum: PT1H. Default: PT3M. + + + :param pending_duration: The pending_duration of this ScalingConfiguration. + :type: str + """ + self._pending_duration = pending_duration + + @property + def instance_count_adjustment(self): + """ + Gets the instance_count_adjustment of this ScalingConfiguration. + The value is used for adjusting the count of instances by. + + + :return: The instance_count_adjustment of this ScalingConfiguration. + :rtype: int + """ + return self._instance_count_adjustment + + @instance_count_adjustment.setter + def instance_count_adjustment(self, instance_count_adjustment): + """ + Sets the instance_count_adjustment of this ScalingConfiguration. + The value is used for adjusting the count of instances by. + + + :param instance_count_adjustment: The instance_count_adjustment of this ScalingConfiguration. + :type: int + """ + self._instance_count_adjustment = instance_count_adjustment + + 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/data_science/models/scaling_policy.py b/src/oci/data_science/models/scaling_policy.py index 5baac9262..6a801cf5c 100644 --- a/src/oci/data_science/models/scaling_policy.py +++ b/src/oci/data_science/models/scaling_policy.py @@ -19,18 +19,23 @@ class ScalingPolicy(object): #: This constant has a value of "FIXED_SIZE" POLICY_TYPE_FIXED_SIZE = "FIXED_SIZE" + #: A constant which can be used with the policy_type property of a ScalingPolicy. + #: This constant has a value of "AUTOSCALING" + POLICY_TYPE_AUTOSCALING = "AUTOSCALING" + def __init__(self, **kwargs): """ Initializes a new ScalingPolicy 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.data_science.models.AutoScalingPolicy` * :class:`~oci.data_science.models.FixedSizeScalingPolicy` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param policy_type: The value to assign to the policy_type property of this ScalingPolicy. - Allowed values for this property are: "FIXED_SIZE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "FIXED_SIZE", "AUTOSCALING", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type policy_type: str @@ -53,6 +58,9 @@ def get_subtype(object_dictionary): """ type = object_dictionary['policyType'] + if type == 'AUTOSCALING': + return 'AutoScalingPolicy' + if type == 'FIXED_SIZE': return 'FixedSizeScalingPolicy' else: @@ -64,7 +72,7 @@ def policy_type(self): **[Required]** Gets the policy_type of this ScalingPolicy. The type of scaling policy. - Allowed values for this property are: "FIXED_SIZE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "FIXED_SIZE", "AUTOSCALING", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -83,7 +91,7 @@ def policy_type(self, policy_type): :param policy_type: The policy_type of this ScalingPolicy. :type: str """ - allowed_values = ["FIXED_SIZE"] + allowed_values = ["FIXED_SIZE", "AUTOSCALING"] if not value_allowed_none_or_none_sentinel(policy_type, allowed_values): policy_type = 'UNKNOWN_ENUM_VALUE' self._policy_type = policy_type diff --git a/src/oci/data_science/models/threshold_based_auto_scaling_policy_details.py b/src/oci/data_science/models/threshold_based_auto_scaling_policy_details.py new file mode 100644 index 000000000..f02c5b5ff --- /dev/null +++ b/src/oci/data_science/models/threshold_based_auto_scaling_policy_details.py @@ -0,0 +1,187 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20190101 + +from .auto_scaling_policy_details import AutoScalingPolicyDetails +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 ThresholdBasedAutoScalingPolicyDetails(AutoScalingPolicyDetails): + """ + Details for a threshold-based autoscaling policy to enable on the model deployment. + In a threshold-based autoscaling policy, an autoscaling action is triggered when a performance metric meets + or exceeds a threshold. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ThresholdBasedAutoScalingPolicyDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_science.models.ThresholdBasedAutoScalingPolicyDetails.auto_scaling_policy_type` attribute + of this class is ``THRESHOLD`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param auto_scaling_policy_type: + The value to assign to the auto_scaling_policy_type property of this ThresholdBasedAutoScalingPolicyDetails. + Allowed values for this property are: "THRESHOLD" + :type auto_scaling_policy_type: str + + :param rules: + The value to assign to the rules property of this ThresholdBasedAutoScalingPolicyDetails. + :type rules: list[oci.data_science.models.MetricExpressionRule] + + :param maximum_instance_count: + The value to assign to the maximum_instance_count property of this ThresholdBasedAutoScalingPolicyDetails. + :type maximum_instance_count: int + + :param minimum_instance_count: + The value to assign to the minimum_instance_count property of this ThresholdBasedAutoScalingPolicyDetails. + :type minimum_instance_count: int + + :param initial_instance_count: + The value to assign to the initial_instance_count property of this ThresholdBasedAutoScalingPolicyDetails. + :type initial_instance_count: int + + """ + self.swagger_types = { + 'auto_scaling_policy_type': 'str', + 'rules': 'list[MetricExpressionRule]', + 'maximum_instance_count': 'int', + 'minimum_instance_count': 'int', + 'initial_instance_count': 'int' + } + + self.attribute_map = { + 'auto_scaling_policy_type': 'autoScalingPolicyType', + 'rules': 'rules', + 'maximum_instance_count': 'maximumInstanceCount', + 'minimum_instance_count': 'minimumInstanceCount', + 'initial_instance_count': 'initialInstanceCount' + } + + self._auto_scaling_policy_type = None + self._rules = None + self._maximum_instance_count = None + self._minimum_instance_count = None + self._initial_instance_count = None + self._auto_scaling_policy_type = 'THRESHOLD' + + @property + def rules(self): + """ + **[Required]** Gets the rules of this ThresholdBasedAutoScalingPolicyDetails. + The list of autoscaling policy rules. + + + :return: The rules of this ThresholdBasedAutoScalingPolicyDetails. + :rtype: list[oci.data_science.models.MetricExpressionRule] + """ + return self._rules + + @rules.setter + def rules(self, rules): + """ + Sets the rules of this ThresholdBasedAutoScalingPolicyDetails. + The list of autoscaling policy rules. + + + :param rules: The rules of this ThresholdBasedAutoScalingPolicyDetails. + :type: list[oci.data_science.models.MetricExpressionRule] + """ + self._rules = rules + + @property + def maximum_instance_count(self): + """ + **[Required]** Gets the maximum_instance_count of this ThresholdBasedAutoScalingPolicyDetails. + For a threshold-based autoscaling policy, this value is the maximum number of instances the model deployment is allowed + to increase to (scale out). + + + :return: The maximum_instance_count of this ThresholdBasedAutoScalingPolicyDetails. + :rtype: int + """ + return self._maximum_instance_count + + @maximum_instance_count.setter + def maximum_instance_count(self, maximum_instance_count): + """ + Sets the maximum_instance_count of this ThresholdBasedAutoScalingPolicyDetails. + For a threshold-based autoscaling policy, this value is the maximum number of instances the model deployment is allowed + to increase to (scale out). + + + :param maximum_instance_count: The maximum_instance_count of this ThresholdBasedAutoScalingPolicyDetails. + :type: int + """ + self._maximum_instance_count = maximum_instance_count + + @property + def minimum_instance_count(self): + """ + **[Required]** Gets the minimum_instance_count of this ThresholdBasedAutoScalingPolicyDetails. + For a threshold-based autoscaling policy, this value is the minimum number of instances the model deployment is allowed + to decrease to (scale in). + + + :return: The minimum_instance_count of this ThresholdBasedAutoScalingPolicyDetails. + :rtype: int + """ + return self._minimum_instance_count + + @minimum_instance_count.setter + def minimum_instance_count(self, minimum_instance_count): + """ + Sets the minimum_instance_count of this ThresholdBasedAutoScalingPolicyDetails. + For a threshold-based autoscaling policy, this value is the minimum number of instances the model deployment is allowed + to decrease to (scale in). + + + :param minimum_instance_count: The minimum_instance_count of this ThresholdBasedAutoScalingPolicyDetails. + :type: int + """ + self._minimum_instance_count = minimum_instance_count + + @property + def initial_instance_count(self): + """ + **[Required]** Gets the initial_instance_count of this ThresholdBasedAutoScalingPolicyDetails. + For a threshold-based autoscaling policy, this value is the initial number of instances to launch in the model deployment + immediately after autoscaling is enabled. Note that anytime this value is updated, the number of instances will be reset + to this value. After autoscaling retrieves performance metrics, the number of instances is automatically adjusted from + this initial number to a number that is based on the limits that you set. + + + :return: The initial_instance_count of this ThresholdBasedAutoScalingPolicyDetails. + :rtype: int + """ + return self._initial_instance_count + + @initial_instance_count.setter + def initial_instance_count(self, initial_instance_count): + """ + Sets the initial_instance_count of this ThresholdBasedAutoScalingPolicyDetails. + For a threshold-based autoscaling policy, this value is the initial number of instances to launch in the model deployment + immediately after autoscaling is enabled. Note that anytime this value is updated, the number of instances will be reset + to this value. After autoscaling retrieves performance metrics, the number of instances is automatically adjusted from + this initial number to a number that is based on the limits that you set. + + + :param initial_instance_count: The initial_instance_count of this ThresholdBasedAutoScalingPolicyDetails. + :type: int + """ + self._initial_instance_count = initial_instance_count + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_science/models/update_model_configuration_details.py b/src/oci/data_science/models/update_model_configuration_details.py index 209dee650..e828bd391 100644 --- a/src/oci/data_science/models/update_model_configuration_details.py +++ b/src/oci/data_science/models/update_model_configuration_details.py @@ -36,25 +36,32 @@ def __init__(self, **kwargs): The value to assign to the bandwidth_mbps property of this UpdateModelConfigurationDetails. :type bandwidth_mbps: int + :param maximum_bandwidth_mbps: + The value to assign to the maximum_bandwidth_mbps property of this UpdateModelConfigurationDetails. + :type maximum_bandwidth_mbps: int + """ self.swagger_types = { 'model_id': 'str', 'instance_configuration': 'InstanceConfiguration', 'scaling_policy': 'ScalingPolicy', - 'bandwidth_mbps': 'int' + 'bandwidth_mbps': 'int', + 'maximum_bandwidth_mbps': 'int' } self.attribute_map = { 'model_id': 'modelId', 'instance_configuration': 'instanceConfiguration', 'scaling_policy': 'scalingPolicy', - 'bandwidth_mbps': 'bandwidthMbps' + 'bandwidth_mbps': 'bandwidthMbps', + 'maximum_bandwidth_mbps': 'maximumBandwidthMbps' } self._model_id = None self._instance_configuration = None self._scaling_policy = None self._bandwidth_mbps = None + self._maximum_bandwidth_mbps = None @property def model_id(self): @@ -144,6 +151,30 @@ def bandwidth_mbps(self, bandwidth_mbps): """ self._bandwidth_mbps = bandwidth_mbps + @property + def maximum_bandwidth_mbps(self): + """ + Gets the maximum_bandwidth_mbps of this UpdateModelConfigurationDetails. + The maximum network bandwidth for the model deployment. + + + :return: The maximum_bandwidth_mbps of this UpdateModelConfigurationDetails. + :rtype: int + """ + return self._maximum_bandwidth_mbps + + @maximum_bandwidth_mbps.setter + def maximum_bandwidth_mbps(self, maximum_bandwidth_mbps): + """ + Sets the maximum_bandwidth_mbps of this UpdateModelConfigurationDetails. + The maximum network bandwidth for the model deployment. + + + :param maximum_bandwidth_mbps: The maximum_bandwidth_mbps of this UpdateModelConfigurationDetails. + :type: int + """ + self._maximum_bandwidth_mbps = maximum_bandwidth_mbps + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/database/models/autonomous_container_database.py b/src/oci/database/models/autonomous_container_database.py index c440d5b13..1e81669d1 100644 --- a/src/oci/database/models/autonomous_container_database.py +++ b/src/oci/database/models/autonomous_container_database.py @@ -135,6 +135,22 @@ class AutonomousContainerDatabase(object): #: This constant has a value of "OCPU" COMPUTE_MODEL_OCPU = "OCPU" + #: A constant which can be used with the distribution_affinity property of a AutonomousContainerDatabase. + #: This constant has a value of "MINIMUM_DISTRIBUTION" + DISTRIBUTION_AFFINITY_MINIMUM_DISTRIBUTION = "MINIMUM_DISTRIBUTION" + + #: A constant which can be used with the distribution_affinity property of a AutonomousContainerDatabase. + #: This constant has a value of "MAXIMUM_DISTRIBUTION" + DISTRIBUTION_AFFINITY_MAXIMUM_DISTRIBUTION = "MAXIMUM_DISTRIBUTION" + + #: A constant which can be used with the net_services_architecture property of a AutonomousContainerDatabase. + #: This constant has a value of "DEDICATED" + NET_SERVICES_ARCHITECTURE_DEDICATED = "DEDICATED" + + #: A constant which can be used with the net_services_architecture property of a AutonomousContainerDatabase. + #: This constant has a value of "SHARED" + NET_SERVICES_ARCHITECTURE_SHARED = "SHARED" + def __init__(self, **kwargs): """ Initializes a new AutonomousContainerDatabase object with values from keyword arguments. @@ -334,6 +350,26 @@ def __init__(self, **kwargs): The value to assign to the time_of_last_backup property of this AutonomousContainerDatabase. :type time_of_last_backup: datetime + :param db_split_threshold: + The value to assign to the db_split_threshold property of this AutonomousContainerDatabase. + :type db_split_threshold: int + + :param vm_failover_reservation: + The value to assign to the vm_failover_reservation property of this AutonomousContainerDatabase. + :type vm_failover_reservation: int + + :param distribution_affinity: + The value to assign to the distribution_affinity property of this AutonomousContainerDatabase. + Allowed values for this property are: "MINIMUM_DISTRIBUTION", "MAXIMUM_DISTRIBUTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type distribution_affinity: str + + :param net_services_architecture: + The value to assign to the net_services_architecture property of this AutonomousContainerDatabase. + Allowed values for this property are: "DEDICATED", "SHARED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type net_services_architecture: str + """ self.swagger_types = { 'id': 'str', @@ -380,7 +416,11 @@ def __init__(self, **kwargs): 'provisioned_cpus': 'float', 'reserved_cpus': 'float', 'largest_provisionable_autonomous_database_in_cpus': 'float', - 'time_of_last_backup': 'datetime' + 'time_of_last_backup': 'datetime', + 'db_split_threshold': 'int', + 'vm_failover_reservation': 'int', + 'distribution_affinity': 'str', + 'net_services_architecture': 'str' } self.attribute_map = { @@ -428,7 +468,11 @@ def __init__(self, **kwargs): 'provisioned_cpus': 'provisionedCpus', 'reserved_cpus': 'reservedCpus', 'largest_provisionable_autonomous_database_in_cpus': 'largestProvisionableAutonomousDatabaseInCpus', - 'time_of_last_backup': 'timeOfLastBackup' + 'time_of_last_backup': 'timeOfLastBackup', + 'db_split_threshold': 'dbSplitThreshold', + 'vm_failover_reservation': 'vmFailoverReservation', + 'distribution_affinity': 'distributionAffinity', + 'net_services_architecture': 'netServicesArchitecture' } self._id = None @@ -476,6 +520,10 @@ def __init__(self, **kwargs): self._reserved_cpus = None self._largest_provisionable_autonomous_database_in_cpus = None self._time_of_last_backup = None + self._db_split_threshold = None + self._vm_failover_reservation = None + self._distribution_affinity = None + self._net_services_architecture = None @property def id(self): @@ -1639,6 +1687,114 @@ def time_of_last_backup(self, time_of_last_backup): """ self._time_of_last_backup = time_of_last_backup + @property + def db_split_threshold(self): + """ + Gets the db_split_threshold of this AutonomousContainerDatabase. + The value above which an Autonomous Database will be split across multiple nodes. This value defaults to 16 when the \"CPU per VM\" value on the Autonomous VM Cluster is greater than 16. Otherwise, it defaults to the \"CPU per VM\" value. + + + :return: The db_split_threshold of this AutonomousContainerDatabase. + :rtype: int + """ + return self._db_split_threshold + + @db_split_threshold.setter + def db_split_threshold(self, db_split_threshold): + """ + Sets the db_split_threshold of this AutonomousContainerDatabase. + The value above which an Autonomous Database will be split across multiple nodes. This value defaults to 16 when the \"CPU per VM\" value on the Autonomous VM Cluster is greater than 16. Otherwise, it defaults to the \"CPU per VM\" value. + + + :param db_split_threshold: The db_split_threshold of this AutonomousContainerDatabase. + :type: int + """ + self._db_split_threshold = db_split_threshold + + @property + def vm_failover_reservation(self): + """ + Gets the vm_failover_reservation of this AutonomousContainerDatabase. + The percentage of CPUs to reserve for a single node Autonomous Database, in increments of 25. + + + :return: The vm_failover_reservation of this AutonomousContainerDatabase. + :rtype: int + """ + return self._vm_failover_reservation + + @vm_failover_reservation.setter + def vm_failover_reservation(self, vm_failover_reservation): + """ + Sets the vm_failover_reservation of this AutonomousContainerDatabase. + The percentage of CPUs to reserve for a single node Autonomous Database, in increments of 25. + + + :param vm_failover_reservation: The vm_failover_reservation of this AutonomousContainerDatabase. + :type: int + """ + self._vm_failover_reservation = vm_failover_reservation + + @property + def distribution_affinity(self): + """ + Gets the distribution_affinity of this AutonomousContainerDatabase. + This option determines whether to open an Autonomous Database across the maximum number of nodes or the least number of nodes. The default will be for the minimum number of VMs. + + Allowed values for this property are: "MINIMUM_DISTRIBUTION", "MAXIMUM_DISTRIBUTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The distribution_affinity of this AutonomousContainerDatabase. + :rtype: str + """ + return self._distribution_affinity + + @distribution_affinity.setter + def distribution_affinity(self, distribution_affinity): + """ + Sets the distribution_affinity of this AutonomousContainerDatabase. + This option determines whether to open an Autonomous Database across the maximum number of nodes or the least number of nodes. The default will be for the minimum number of VMs. + + + :param distribution_affinity: The distribution_affinity of this AutonomousContainerDatabase. + :type: str + """ + allowed_values = ["MINIMUM_DISTRIBUTION", "MAXIMUM_DISTRIBUTION"] + if not value_allowed_none_or_none_sentinel(distribution_affinity, allowed_values): + distribution_affinity = 'UNKNOWN_ENUM_VALUE' + self._distribution_affinity = distribution_affinity + + @property + def net_services_architecture(self): + """ + Gets the net_services_architecture of this AutonomousContainerDatabase. + Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + + Allowed values for this property are: "DEDICATED", "SHARED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The net_services_architecture of this AutonomousContainerDatabase. + :rtype: str + """ + return self._net_services_architecture + + @net_services_architecture.setter + def net_services_architecture(self, net_services_architecture): + """ + Sets the net_services_architecture of this AutonomousContainerDatabase. + Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + + + :param net_services_architecture: The net_services_architecture of this AutonomousContainerDatabase. + :type: str + """ + allowed_values = ["DEDICATED", "SHARED"] + if not value_allowed_none_or_none_sentinel(net_services_architecture, allowed_values): + net_services_architecture = 'UNKNOWN_ENUM_VALUE' + self._net_services_architecture = net_services_architecture + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/database/models/autonomous_container_database_summary.py b/src/oci/database/models/autonomous_container_database_summary.py index 1dda594d7..4ba20c3a8 100644 --- a/src/oci/database/models/autonomous_container_database_summary.py +++ b/src/oci/database/models/autonomous_container_database_summary.py @@ -135,6 +135,22 @@ class AutonomousContainerDatabaseSummary(object): #: This constant has a value of "OCPU" COMPUTE_MODEL_OCPU = "OCPU" + #: A constant which can be used with the distribution_affinity property of a AutonomousContainerDatabaseSummary. + #: This constant has a value of "MINIMUM_DISTRIBUTION" + DISTRIBUTION_AFFINITY_MINIMUM_DISTRIBUTION = "MINIMUM_DISTRIBUTION" + + #: A constant which can be used with the distribution_affinity property of a AutonomousContainerDatabaseSummary. + #: This constant has a value of "MAXIMUM_DISTRIBUTION" + DISTRIBUTION_AFFINITY_MAXIMUM_DISTRIBUTION = "MAXIMUM_DISTRIBUTION" + + #: A constant which can be used with the net_services_architecture property of a AutonomousContainerDatabaseSummary. + #: This constant has a value of "DEDICATED" + NET_SERVICES_ARCHITECTURE_DEDICATED = "DEDICATED" + + #: A constant which can be used with the net_services_architecture property of a AutonomousContainerDatabaseSummary. + #: This constant has a value of "SHARED" + NET_SERVICES_ARCHITECTURE_SHARED = "SHARED" + def __init__(self, **kwargs): """ Initializes a new AutonomousContainerDatabaseSummary object with values from keyword arguments. @@ -334,6 +350,26 @@ def __init__(self, **kwargs): The value to assign to the time_of_last_backup property of this AutonomousContainerDatabaseSummary. :type time_of_last_backup: datetime + :param db_split_threshold: + The value to assign to the db_split_threshold property of this AutonomousContainerDatabaseSummary. + :type db_split_threshold: int + + :param vm_failover_reservation: + The value to assign to the vm_failover_reservation property of this AutonomousContainerDatabaseSummary. + :type vm_failover_reservation: int + + :param distribution_affinity: + The value to assign to the distribution_affinity property of this AutonomousContainerDatabaseSummary. + Allowed values for this property are: "MINIMUM_DISTRIBUTION", "MAXIMUM_DISTRIBUTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type distribution_affinity: str + + :param net_services_architecture: + The value to assign to the net_services_architecture property of this AutonomousContainerDatabaseSummary. + Allowed values for this property are: "DEDICATED", "SHARED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type net_services_architecture: str + """ self.swagger_types = { 'id': 'str', @@ -380,7 +416,11 @@ def __init__(self, **kwargs): 'provisioned_cpus': 'float', 'reserved_cpus': 'float', 'largest_provisionable_autonomous_database_in_cpus': 'float', - 'time_of_last_backup': 'datetime' + 'time_of_last_backup': 'datetime', + 'db_split_threshold': 'int', + 'vm_failover_reservation': 'int', + 'distribution_affinity': 'str', + 'net_services_architecture': 'str' } self.attribute_map = { @@ -428,7 +468,11 @@ def __init__(self, **kwargs): 'provisioned_cpus': 'provisionedCpus', 'reserved_cpus': 'reservedCpus', 'largest_provisionable_autonomous_database_in_cpus': 'largestProvisionableAutonomousDatabaseInCpus', - 'time_of_last_backup': 'timeOfLastBackup' + 'time_of_last_backup': 'timeOfLastBackup', + 'db_split_threshold': 'dbSplitThreshold', + 'vm_failover_reservation': 'vmFailoverReservation', + 'distribution_affinity': 'distributionAffinity', + 'net_services_architecture': 'netServicesArchitecture' } self._id = None @@ -476,6 +520,10 @@ def __init__(self, **kwargs): self._reserved_cpus = None self._largest_provisionable_autonomous_database_in_cpus = None self._time_of_last_backup = None + self._db_split_threshold = None + self._vm_failover_reservation = None + self._distribution_affinity = None + self._net_services_architecture = None @property def id(self): @@ -1639,6 +1687,114 @@ def time_of_last_backup(self, time_of_last_backup): """ self._time_of_last_backup = time_of_last_backup + @property + def db_split_threshold(self): + """ + Gets the db_split_threshold of this AutonomousContainerDatabaseSummary. + The value above which an Autonomous Database will be split across multiple nodes. This value defaults to 16 when the \"CPU per VM\" value on the Autonomous VM Cluster is greater than 16. Otherwise, it defaults to the \"CPU per VM\" value. + + + :return: The db_split_threshold of this AutonomousContainerDatabaseSummary. + :rtype: int + """ + return self._db_split_threshold + + @db_split_threshold.setter + def db_split_threshold(self, db_split_threshold): + """ + Sets the db_split_threshold of this AutonomousContainerDatabaseSummary. + The value above which an Autonomous Database will be split across multiple nodes. This value defaults to 16 when the \"CPU per VM\" value on the Autonomous VM Cluster is greater than 16. Otherwise, it defaults to the \"CPU per VM\" value. + + + :param db_split_threshold: The db_split_threshold of this AutonomousContainerDatabaseSummary. + :type: int + """ + self._db_split_threshold = db_split_threshold + + @property + def vm_failover_reservation(self): + """ + Gets the vm_failover_reservation of this AutonomousContainerDatabaseSummary. + The percentage of CPUs to reserve for a single node Autonomous Database, in increments of 25. + + + :return: The vm_failover_reservation of this AutonomousContainerDatabaseSummary. + :rtype: int + """ + return self._vm_failover_reservation + + @vm_failover_reservation.setter + def vm_failover_reservation(self, vm_failover_reservation): + """ + Sets the vm_failover_reservation of this AutonomousContainerDatabaseSummary. + The percentage of CPUs to reserve for a single node Autonomous Database, in increments of 25. + + + :param vm_failover_reservation: The vm_failover_reservation of this AutonomousContainerDatabaseSummary. + :type: int + """ + self._vm_failover_reservation = vm_failover_reservation + + @property + def distribution_affinity(self): + """ + Gets the distribution_affinity of this AutonomousContainerDatabaseSummary. + This option determines whether to open an Autonomous Database across the maximum number of nodes or the least number of nodes. The default will be for the minimum number of VMs. + + Allowed values for this property are: "MINIMUM_DISTRIBUTION", "MAXIMUM_DISTRIBUTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The distribution_affinity of this AutonomousContainerDatabaseSummary. + :rtype: str + """ + return self._distribution_affinity + + @distribution_affinity.setter + def distribution_affinity(self, distribution_affinity): + """ + Sets the distribution_affinity of this AutonomousContainerDatabaseSummary. + This option determines whether to open an Autonomous Database across the maximum number of nodes or the least number of nodes. The default will be for the minimum number of VMs. + + + :param distribution_affinity: The distribution_affinity of this AutonomousContainerDatabaseSummary. + :type: str + """ + allowed_values = ["MINIMUM_DISTRIBUTION", "MAXIMUM_DISTRIBUTION"] + if not value_allowed_none_or_none_sentinel(distribution_affinity, allowed_values): + distribution_affinity = 'UNKNOWN_ENUM_VALUE' + self._distribution_affinity = distribution_affinity + + @property + def net_services_architecture(self): + """ + Gets the net_services_architecture of this AutonomousContainerDatabaseSummary. + Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + + Allowed values for this property are: "DEDICATED", "SHARED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The net_services_architecture of this AutonomousContainerDatabaseSummary. + :rtype: str + """ + return self._net_services_architecture + + @net_services_architecture.setter + def net_services_architecture(self, net_services_architecture): + """ + Sets the net_services_architecture of this AutonomousContainerDatabaseSummary. + Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + + + :param net_services_architecture: The net_services_architecture of this AutonomousContainerDatabaseSummary. + :type: str + """ + allowed_values = ["DEDICATED", "SHARED"] + if not value_allowed_none_or_none_sentinel(net_services_architecture, allowed_values): + net_services_architecture = 'UNKNOWN_ENUM_VALUE' + self._net_services_architecture = net_services_architecture + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/database/models/autonomous_database.py b/src/oci/database/models/autonomous_database.py index 7e3f326c5..213f667b2 100644 --- a/src/oci/database/models/autonomous_database.py +++ b/src/oci/database/models/autonomous_database.py @@ -291,6 +291,14 @@ class AutonomousDatabase(object): #: This constant has a value of "REMOTE" DISASTER_RECOVERY_REGION_TYPE_REMOTE = "REMOTE" + #: A constant which can be used with the net_services_architecture property of a AutonomousDatabase. + #: This constant has a value of "DEDICATED" + NET_SERVICES_ARCHITECTURE_DEDICATED = "DEDICATED" + + #: A constant which can be used with the net_services_architecture property of a AutonomousDatabase. + #: This constant has a value of "SHARED" + NET_SERVICES_ARCHITECTURE_SHARED = "SHARED" + def __init__(self, **kwargs): """ Initializes a new AutonomousDatabase object with values from keyword arguments. @@ -518,6 +526,10 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type db_workload: str + :param is_dev_tier: + The value to assign to the is_dev_tier property of this AutonomousDatabase. + :type is_dev_tier: bool + :param is_access_control_enabled: The value to assign to the is_access_control_enabled property of this AutonomousDatabase. :type is_access_control_enabled: bool @@ -762,6 +774,12 @@ def __init__(self, **kwargs): The value to assign to the remote_disaster_recovery_configuration property of this AutonomousDatabase. :type remote_disaster_recovery_configuration: oci.database.models.DisasterRecoveryConfiguration + :param net_services_architecture: + The value to assign to the net_services_architecture property of this AutonomousDatabase. + Allowed values for this property are: "DEDICATED", "SHARED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type net_services_architecture: str + """ self.swagger_types = { 'id': 'str', @@ -817,6 +835,7 @@ def __init__(self, **kwargs): 'db_version': 'str', 'is_preview': 'bool', 'db_workload': 'str', + 'is_dev_tier': 'bool', 'is_access_control_enabled': 'bool', 'whitelisted_ips': 'list[str]', 'are_primary_whitelisted_ips_used': 'bool', @@ -871,7 +890,8 @@ def __init__(self, **kwargs): 'local_disaster_recovery_type': 'str', 'disaster_recovery_region_type': 'str', 'time_disaster_recovery_role_changed': 'datetime', - 'remote_disaster_recovery_configuration': 'DisasterRecoveryConfiguration' + 'remote_disaster_recovery_configuration': 'DisasterRecoveryConfiguration', + 'net_services_architecture': 'str' } self.attribute_map = { @@ -928,6 +948,7 @@ def __init__(self, **kwargs): 'db_version': 'dbVersion', 'is_preview': 'isPreview', 'db_workload': 'dbWorkload', + 'is_dev_tier': 'isDevTier', 'is_access_control_enabled': 'isAccessControlEnabled', 'whitelisted_ips': 'whitelistedIps', 'are_primary_whitelisted_ips_used': 'arePrimaryWhitelistedIpsUsed', @@ -982,7 +1003,8 @@ def __init__(self, **kwargs): 'local_disaster_recovery_type': 'localDisasterRecoveryType', 'disaster_recovery_region_type': 'disasterRecoveryRegionType', 'time_disaster_recovery_role_changed': 'timeDisasterRecoveryRoleChanged', - 'remote_disaster_recovery_configuration': 'remoteDisasterRecoveryConfiguration' + 'remote_disaster_recovery_configuration': 'remoteDisasterRecoveryConfiguration', + 'net_services_architecture': 'netServicesArchitecture' } self._id = None @@ -1038,6 +1060,7 @@ def __init__(self, **kwargs): self._db_version = None self._is_preview = None self._db_workload = None + self._is_dev_tier = None self._is_access_control_enabled = None self._whitelisted_ips = None self._are_primary_whitelisted_ips_used = None @@ -1093,6 +1116,7 @@ def __init__(self, **kwargs): self._disaster_recovery_region_type = None self._time_disaster_recovery_role_changed = None self._remote_disaster_recovery_configuration = None + self._net_services_architecture = None @property def id(self): @@ -2542,6 +2566,30 @@ def db_workload(self, db_workload): db_workload = 'UNKNOWN_ENUM_VALUE' self._db_workload = db_workload + @property + def is_dev_tier(self): + """ + Gets the is_dev_tier of this AutonomousDatabase. + This project introduces Autonomous Database for Developers (ADB-Dev), a free tier on dedicated infrastructure, and Cloud@Customer for database development purposes. ADB-Dev enables ExaDB customers to experiment with ADB for free and incentivizes enterprises to use ADB for new development projects.Note that ADB-Dev have 4 CPU and 20GB of memory. For ADB-Dev , memory and CPU cannot be scaled + + + :return: The is_dev_tier of this AutonomousDatabase. + :rtype: bool + """ + return self._is_dev_tier + + @is_dev_tier.setter + def is_dev_tier(self, is_dev_tier): + """ + Sets the is_dev_tier of this AutonomousDatabase. + This project introduces Autonomous Database for Developers (ADB-Dev), a free tier on dedicated infrastructure, and Cloud@Customer for database development purposes. ADB-Dev enables ExaDB customers to experiment with ADB for free and incentivizes enterprises to use ADB for new development projects.Note that ADB-Dev have 4 CPU and 20GB of memory. For ADB-Dev , memory and CPU cannot be scaled + + + :param is_dev_tier: The is_dev_tier of this AutonomousDatabase. + :type: bool + """ + self._is_dev_tier = is_dev_tier + @property def is_access_control_enabled(self): """ @@ -4060,6 +4108,36 @@ def remote_disaster_recovery_configuration(self, remote_disaster_recovery_config """ self._remote_disaster_recovery_configuration = remote_disaster_recovery_configuration + @property + def net_services_architecture(self): + """ + Gets the net_services_architecture of this AutonomousDatabase. + Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + + Allowed values for this property are: "DEDICATED", "SHARED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The net_services_architecture of this AutonomousDatabase. + :rtype: str + """ + return self._net_services_architecture + + @net_services_architecture.setter + def net_services_architecture(self, net_services_architecture): + """ + Sets the net_services_architecture of this AutonomousDatabase. + Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + + + :param net_services_architecture: The net_services_architecture of this AutonomousDatabase. + :type: str + """ + allowed_values = ["DEDICATED", "SHARED"] + if not value_allowed_none_or_none_sentinel(net_services_architecture, allowed_values): + net_services_architecture = 'UNKNOWN_ENUM_VALUE' + self._net_services_architecture = net_services_architecture + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/database/models/autonomous_database_summary.py b/src/oci/database/models/autonomous_database_summary.py index 94b7e996f..c64135e77 100644 --- a/src/oci/database/models/autonomous_database_summary.py +++ b/src/oci/database/models/autonomous_database_summary.py @@ -293,6 +293,14 @@ class AutonomousDatabaseSummary(object): #: This constant has a value of "REMOTE" DISASTER_RECOVERY_REGION_TYPE_REMOTE = "REMOTE" + #: A constant which can be used with the net_services_architecture property of a AutonomousDatabaseSummary. + #: This constant has a value of "DEDICATED" + NET_SERVICES_ARCHITECTURE_DEDICATED = "DEDICATED" + + #: A constant which can be used with the net_services_architecture property of a AutonomousDatabaseSummary. + #: This constant has a value of "SHARED" + NET_SERVICES_ARCHITECTURE_SHARED = "SHARED" + def __init__(self, **kwargs): """ Initializes a new AutonomousDatabaseSummary object with values from keyword arguments. @@ -520,6 +528,10 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type db_workload: str + :param is_dev_tier: + The value to assign to the is_dev_tier property of this AutonomousDatabaseSummary. + :type is_dev_tier: bool + :param is_access_control_enabled: The value to assign to the is_access_control_enabled property of this AutonomousDatabaseSummary. :type is_access_control_enabled: bool @@ -764,6 +776,12 @@ def __init__(self, **kwargs): The value to assign to the remote_disaster_recovery_configuration property of this AutonomousDatabaseSummary. :type remote_disaster_recovery_configuration: oci.database.models.DisasterRecoveryConfiguration + :param net_services_architecture: + The value to assign to the net_services_architecture property of this AutonomousDatabaseSummary. + Allowed values for this property are: "DEDICATED", "SHARED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type net_services_architecture: str + """ self.swagger_types = { 'id': 'str', @@ -819,6 +837,7 @@ def __init__(self, **kwargs): 'db_version': 'str', 'is_preview': 'bool', 'db_workload': 'str', + 'is_dev_tier': 'bool', 'is_access_control_enabled': 'bool', 'whitelisted_ips': 'list[str]', 'are_primary_whitelisted_ips_used': 'bool', @@ -873,7 +892,8 @@ def __init__(self, **kwargs): 'local_disaster_recovery_type': 'str', 'disaster_recovery_region_type': 'str', 'time_disaster_recovery_role_changed': 'datetime', - 'remote_disaster_recovery_configuration': 'DisasterRecoveryConfiguration' + 'remote_disaster_recovery_configuration': 'DisasterRecoveryConfiguration', + 'net_services_architecture': 'str' } self.attribute_map = { @@ -930,6 +950,7 @@ def __init__(self, **kwargs): 'db_version': 'dbVersion', 'is_preview': 'isPreview', 'db_workload': 'dbWorkload', + 'is_dev_tier': 'isDevTier', 'is_access_control_enabled': 'isAccessControlEnabled', 'whitelisted_ips': 'whitelistedIps', 'are_primary_whitelisted_ips_used': 'arePrimaryWhitelistedIpsUsed', @@ -984,7 +1005,8 @@ def __init__(self, **kwargs): 'local_disaster_recovery_type': 'localDisasterRecoveryType', 'disaster_recovery_region_type': 'disasterRecoveryRegionType', 'time_disaster_recovery_role_changed': 'timeDisasterRecoveryRoleChanged', - 'remote_disaster_recovery_configuration': 'remoteDisasterRecoveryConfiguration' + 'remote_disaster_recovery_configuration': 'remoteDisasterRecoveryConfiguration', + 'net_services_architecture': 'netServicesArchitecture' } self._id = None @@ -1040,6 +1062,7 @@ def __init__(self, **kwargs): self._db_version = None self._is_preview = None self._db_workload = None + self._is_dev_tier = None self._is_access_control_enabled = None self._whitelisted_ips = None self._are_primary_whitelisted_ips_used = None @@ -1095,6 +1118,7 @@ def __init__(self, **kwargs): self._disaster_recovery_region_type = None self._time_disaster_recovery_role_changed = None self._remote_disaster_recovery_configuration = None + self._net_services_architecture = None @property def id(self): @@ -2544,6 +2568,30 @@ def db_workload(self, db_workload): db_workload = 'UNKNOWN_ENUM_VALUE' self._db_workload = db_workload + @property + def is_dev_tier(self): + """ + Gets the is_dev_tier of this AutonomousDatabaseSummary. + This project introduces Autonomous Database for Developers (ADB-Dev), a free tier on dedicated infrastructure, and Cloud@Customer for database development purposes. ADB-Dev enables ExaDB customers to experiment with ADB for free and incentivizes enterprises to use ADB for new development projects.Note that ADB-Dev have 4 CPU and 20GB of memory. For ADB-Dev , memory and CPU cannot be scaled + + + :return: The is_dev_tier of this AutonomousDatabaseSummary. + :rtype: bool + """ + return self._is_dev_tier + + @is_dev_tier.setter + def is_dev_tier(self, is_dev_tier): + """ + Sets the is_dev_tier of this AutonomousDatabaseSummary. + This project introduces Autonomous Database for Developers (ADB-Dev), a free tier on dedicated infrastructure, and Cloud@Customer for database development purposes. ADB-Dev enables ExaDB customers to experiment with ADB for free and incentivizes enterprises to use ADB for new development projects.Note that ADB-Dev have 4 CPU and 20GB of memory. For ADB-Dev , memory and CPU cannot be scaled + + + :param is_dev_tier: The is_dev_tier of this AutonomousDatabaseSummary. + :type: bool + """ + self._is_dev_tier = is_dev_tier + @property def is_access_control_enabled(self): """ @@ -4062,6 +4110,36 @@ def remote_disaster_recovery_configuration(self, remote_disaster_recovery_config """ self._remote_disaster_recovery_configuration = remote_disaster_recovery_configuration + @property + def net_services_architecture(self): + """ + Gets the net_services_architecture of this AutonomousDatabaseSummary. + Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + + Allowed values for this property are: "DEDICATED", "SHARED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The net_services_architecture of this AutonomousDatabaseSummary. + :rtype: str + """ + return self._net_services_architecture + + @net_services_architecture.setter + def net_services_architecture(self, net_services_architecture): + """ + Sets the net_services_architecture of this AutonomousDatabaseSummary. + Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + + + :param net_services_architecture: The net_services_architecture of this AutonomousDatabaseSummary. + :type: str + """ + allowed_values = ["DEDICATED", "SHARED"] + if not value_allowed_none_or_none_sentinel(net_services_architecture, allowed_values): + net_services_architecture = 'UNKNOWN_ENUM_VALUE' + self._net_services_architecture = net_services_architecture + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/database/models/create_autonomous_container_database_details.py b/src/oci/database/models/create_autonomous_container_database_details.py index f1e2ede88..2ad3e470c 100644 --- a/src/oci/database/models/create_autonomous_container_database_details.py +++ b/src/oci/database/models/create_autonomous_container_database_details.py @@ -47,6 +47,22 @@ class CreateAutonomousContainerDatabaseDetails(object): #: This constant has a value of "LATEST_RELEASE_UPDATE" VERSION_PREFERENCE_LATEST_RELEASE_UPDATE = "LATEST_RELEASE_UPDATE" + #: A constant which can be used with the distribution_affinity property of a CreateAutonomousContainerDatabaseDetails. + #: This constant has a value of "MINIMUM_DISTRIBUTION" + DISTRIBUTION_AFFINITY_MINIMUM_DISTRIBUTION = "MINIMUM_DISTRIBUTION" + + #: A constant which can be used with the distribution_affinity property of a CreateAutonomousContainerDatabaseDetails. + #: This constant has a value of "MAXIMUM_DISTRIBUTION" + DISTRIBUTION_AFFINITY_MAXIMUM_DISTRIBUTION = "MAXIMUM_DISTRIBUTION" + + #: A constant which can be used with the net_services_architecture property of a CreateAutonomousContainerDatabaseDetails. + #: This constant has a value of "DEDICATED" + NET_SERVICES_ARCHITECTURE_DEDICATED = "DEDICATED" + + #: A constant which can be used with the net_services_architecture property of a CreateAutonomousContainerDatabaseDetails. + #: This constant has a value of "SHARED" + NET_SERVICES_ARCHITECTURE_SHARED = "SHARED" + def __init__(self, **kwargs): """ Initializes a new CreateAutonomousContainerDatabaseDetails object with values from keyword arguments. @@ -180,6 +196,24 @@ def __init__(self, **kwargs): The value to assign to the key_store_id property of this CreateAutonomousContainerDatabaseDetails. :type key_store_id: str + :param db_split_threshold: + The value to assign to the db_split_threshold property of this CreateAutonomousContainerDatabaseDetails. + :type db_split_threshold: int + + :param vm_failover_reservation: + The value to assign to the vm_failover_reservation property of this CreateAutonomousContainerDatabaseDetails. + :type vm_failover_reservation: int + + :param distribution_affinity: + The value to assign to the distribution_affinity property of this CreateAutonomousContainerDatabaseDetails. + Allowed values for this property are: "MINIMUM_DISTRIBUTION", "MAXIMUM_DISTRIBUTION" + :type distribution_affinity: str + + :param net_services_architecture: + The value to assign to the net_services_architecture property of this CreateAutonomousContainerDatabaseDetails. + Allowed values for this property are: "DEDICATED", "SHARED" + :type net_services_architecture: str + """ self.swagger_types = { 'display_name': 'str', @@ -212,7 +246,11 @@ def __init__(self, **kwargs): 'kms_key_id': 'str', 'kms_key_version_id': 'str', 'vault_id': 'str', - 'key_store_id': 'str' + 'key_store_id': 'str', + 'db_split_threshold': 'int', + 'vm_failover_reservation': 'int', + 'distribution_affinity': 'str', + 'net_services_architecture': 'str' } self.attribute_map = { @@ -246,7 +284,11 @@ def __init__(self, **kwargs): 'kms_key_id': 'kmsKeyId', 'kms_key_version_id': 'kmsKeyVersionId', 'vault_id': 'vaultId', - 'key_store_id': 'keyStoreId' + 'key_store_id': 'keyStoreId', + 'db_split_threshold': 'dbSplitThreshold', + 'vm_failover_reservation': 'vmFailoverReservation', + 'distribution_affinity': 'distributionAffinity', + 'net_services_architecture': 'netServicesArchitecture' } self._display_name = None @@ -280,6 +322,10 @@ def __init__(self, **kwargs): self._kms_key_version_id = None self._vault_id = None self._key_store_id = None + self._db_split_threshold = None + self._vm_failover_reservation = None + self._distribution_affinity = None + self._net_services_architecture = None @property def display_name(self): @@ -1099,6 +1145,116 @@ def key_store_id(self, key_store_id): """ self._key_store_id = key_store_id + @property + def db_split_threshold(self): + """ + Gets the db_split_threshold of this CreateAutonomousContainerDatabaseDetails. + The value above which an Autonomous Database will be split across multiple nodes. This value defaults to 16 when the \"CPU per VM\" value on the Autonomous VM Cluster is greater than 16. Otherwise, it defaults to the \"CPU per VM\" value. + + + :return: The db_split_threshold of this CreateAutonomousContainerDatabaseDetails. + :rtype: int + """ + return self._db_split_threshold + + @db_split_threshold.setter + def db_split_threshold(self, db_split_threshold): + """ + Sets the db_split_threshold of this CreateAutonomousContainerDatabaseDetails. + The value above which an Autonomous Database will be split across multiple nodes. This value defaults to 16 when the \"CPU per VM\" value on the Autonomous VM Cluster is greater than 16. Otherwise, it defaults to the \"CPU per VM\" value. + + + :param db_split_threshold: The db_split_threshold of this CreateAutonomousContainerDatabaseDetails. + :type: int + """ + self._db_split_threshold = db_split_threshold + + @property + def vm_failover_reservation(self): + """ + Gets the vm_failover_reservation of this CreateAutonomousContainerDatabaseDetails. + The percentage of CPUs to reserve for a single node Autonomous Database, in increments of 25. + + + :return: The vm_failover_reservation of this CreateAutonomousContainerDatabaseDetails. + :rtype: int + """ + return self._vm_failover_reservation + + @vm_failover_reservation.setter + def vm_failover_reservation(self, vm_failover_reservation): + """ + Sets the vm_failover_reservation of this CreateAutonomousContainerDatabaseDetails. + The percentage of CPUs to reserve for a single node Autonomous Database, in increments of 25. + + + :param vm_failover_reservation: The vm_failover_reservation of this CreateAutonomousContainerDatabaseDetails. + :type: int + """ + self._vm_failover_reservation = vm_failover_reservation + + @property + def distribution_affinity(self): + """ + Gets the distribution_affinity of this CreateAutonomousContainerDatabaseDetails. + This option determines whether to open an Autonomous Database across the maximum number of nodes or the least number of nodes. The default will be for the minimum number of VMs. + + Allowed values for this property are: "MINIMUM_DISTRIBUTION", "MAXIMUM_DISTRIBUTION" + + + :return: The distribution_affinity of this CreateAutonomousContainerDatabaseDetails. + :rtype: str + """ + return self._distribution_affinity + + @distribution_affinity.setter + def distribution_affinity(self, distribution_affinity): + """ + Sets the distribution_affinity of this CreateAutonomousContainerDatabaseDetails. + This option determines whether to open an Autonomous Database across the maximum number of nodes or the least number of nodes. The default will be for the minimum number of VMs. + + + :param distribution_affinity: The distribution_affinity of this CreateAutonomousContainerDatabaseDetails. + :type: str + """ + allowed_values = ["MINIMUM_DISTRIBUTION", "MAXIMUM_DISTRIBUTION"] + if not value_allowed_none_or_none_sentinel(distribution_affinity, allowed_values): + raise ValueError( + f"Invalid value for `distribution_affinity`, must be None or one of {allowed_values}" + ) + self._distribution_affinity = distribution_affinity + + @property + def net_services_architecture(self): + """ + Gets the net_services_architecture of this CreateAutonomousContainerDatabaseDetails. + Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + + Allowed values for this property are: "DEDICATED", "SHARED" + + + :return: The net_services_architecture of this CreateAutonomousContainerDatabaseDetails. + :rtype: str + """ + return self._net_services_architecture + + @net_services_architecture.setter + def net_services_architecture(self, net_services_architecture): + """ + Sets the net_services_architecture of this CreateAutonomousContainerDatabaseDetails. + Enabling SHARED server architecture enables a database server to allow many client processes to share very few server processes, thereby increasing the number of supported users. + + + :param net_services_architecture: The net_services_architecture of this CreateAutonomousContainerDatabaseDetails. + :type: str + """ + allowed_values = ["DEDICATED", "SHARED"] + if not value_allowed_none_or_none_sentinel(net_services_architecture, allowed_values): + raise ValueError( + f"Invalid value for `net_services_architecture`, must be None or one of {allowed_values}" + ) + self._net_services_architecture = net_services_architecture + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/database/models/create_autonomous_database_base.py b/src/oci/database/models/create_autonomous_database_base.py index f08173576..ed99b5c32 100644 --- a/src/oci/database/models/create_autonomous_database_base.py +++ b/src/oci/database/models/create_autonomous_database_base.py @@ -188,6 +188,10 @@ def __init__(self, **kwargs): The value to assign to the is_auto_scaling_enabled property of this CreateAutonomousDatabaseBase. :type is_auto_scaling_enabled: bool + :param is_dev_tier: + The value to assign to the is_dev_tier property of this CreateAutonomousDatabaseBase. + :type is_dev_tier: bool + :param is_dedicated: The value to assign to the is_dedicated property of this CreateAutonomousDatabaseBase. :type is_dedicated: bool @@ -324,6 +328,7 @@ def __init__(self, **kwargs): 'license_model': 'str', 'is_preview_version_with_service_terms_accepted': 'bool', 'is_auto_scaling_enabled': 'bool', + 'is_dev_tier': 'bool', 'is_dedicated': 'bool', 'autonomous_container_database_id': 'str', 'in_memory_percentage': 'int', @@ -375,6 +380,7 @@ def __init__(self, **kwargs): 'license_model': 'licenseModel', 'is_preview_version_with_service_terms_accepted': 'isPreviewVersionWithServiceTermsAccepted', 'is_auto_scaling_enabled': 'isAutoScalingEnabled', + 'is_dev_tier': 'isDevTier', 'is_dedicated': 'isDedicated', 'autonomous_container_database_id': 'autonomousContainerDatabaseId', 'in_memory_percentage': 'inMemoryPercentage', @@ -425,6 +431,7 @@ def __init__(self, **kwargs): self._license_model = None self._is_preview_version_with_service_terms_accepted = None self._is_auto_scaling_enabled = None + self._is_dev_tier = None self._is_dedicated = None self._autonomous_container_database_id = None self._in_memory_percentage = None @@ -1108,6 +1115,30 @@ def is_auto_scaling_enabled(self, is_auto_scaling_enabled): """ self._is_auto_scaling_enabled = is_auto_scaling_enabled + @property + def is_dev_tier(self): + """ + Gets the is_dev_tier of this CreateAutonomousDatabaseBase. + This project introduces Autonomous Database for Developers (ADB-Dev), a free tier on dedicated infrastructure, and Cloud@Customer for database development purposes. ADB-Dev enables ExaDB customers to experiment with ADB for free and incentivizes enterprises to use ADB for new development projects.Note that ADB-Dev have 4 CPU and 20GB of memory. For ADB-Dev , memory and CPU cannot be scaled + + + :return: The is_dev_tier of this CreateAutonomousDatabaseBase. + :rtype: bool + """ + return self._is_dev_tier + + @is_dev_tier.setter + def is_dev_tier(self, is_dev_tier): + """ + Sets the is_dev_tier of this CreateAutonomousDatabaseBase. + This project introduces Autonomous Database for Developers (ADB-Dev), a free tier on dedicated infrastructure, and Cloud@Customer for database development purposes. ADB-Dev enables ExaDB customers to experiment with ADB for free and incentivizes enterprises to use ADB for new development projects.Note that ADB-Dev have 4 CPU and 20GB of memory. For ADB-Dev , memory and CPU cannot be scaled + + + :param is_dev_tier: The is_dev_tier of this CreateAutonomousDatabaseBase. + :type: bool + """ + self._is_dev_tier = is_dev_tier + @property def is_dedicated(self): """ diff --git a/src/oci/database/models/create_autonomous_database_clone_details.py b/src/oci/database/models/create_autonomous_database_clone_details.py index dfd498766..a3e2f38db 100644 --- a/src/oci/database/models/create_autonomous_database_clone_details.py +++ b/src/oci/database/models/create_autonomous_database_clone_details.py @@ -112,6 +112,10 @@ def __init__(self, **kwargs): The value to assign to the is_auto_scaling_enabled property of this CreateAutonomousDatabaseCloneDetails. :type is_auto_scaling_enabled: bool + :param is_dev_tier: + The value to assign to the is_dev_tier property of this CreateAutonomousDatabaseCloneDetails. + :type is_dev_tier: bool + :param is_dedicated: The value to assign to the is_dedicated property of this CreateAutonomousDatabaseCloneDetails. :type is_dedicated: bool @@ -257,6 +261,7 @@ def __init__(self, **kwargs): 'license_model': 'str', 'is_preview_version_with_service_terms_accepted': 'bool', 'is_auto_scaling_enabled': 'bool', + 'is_dev_tier': 'bool', 'is_dedicated': 'bool', 'autonomous_container_database_id': 'str', 'in_memory_percentage': 'int', @@ -310,6 +315,7 @@ def __init__(self, **kwargs): 'license_model': 'licenseModel', 'is_preview_version_with_service_terms_accepted': 'isPreviewVersionWithServiceTermsAccepted', 'is_auto_scaling_enabled': 'isAutoScalingEnabled', + 'is_dev_tier': 'isDevTier', 'is_dedicated': 'isDedicated', 'autonomous_container_database_id': 'autonomousContainerDatabaseId', 'in_memory_percentage': 'inMemoryPercentage', @@ -362,6 +368,7 @@ def __init__(self, **kwargs): self._license_model = None self._is_preview_version_with_service_terms_accepted = None self._is_auto_scaling_enabled = None + self._is_dev_tier = None self._is_dedicated = None self._autonomous_container_database_id = None self._in_memory_percentage = None diff --git a/src/oci/database/models/create_autonomous_database_details.py b/src/oci/database/models/create_autonomous_database_details.py index 5900fdc85..ab2aaf542 100644 --- a/src/oci/database/models/create_autonomous_database_details.py +++ b/src/oci/database/models/create_autonomous_database_details.py @@ -104,6 +104,10 @@ def __init__(self, **kwargs): The value to assign to the is_auto_scaling_enabled property of this CreateAutonomousDatabaseDetails. :type is_auto_scaling_enabled: bool + :param is_dev_tier: + The value to assign to the is_dev_tier property of this CreateAutonomousDatabaseDetails. + :type is_dev_tier: bool + :param is_dedicated: The value to assign to the is_dedicated property of this CreateAutonomousDatabaseDetails. :type is_dedicated: bool @@ -240,6 +244,7 @@ def __init__(self, **kwargs): 'license_model': 'str', 'is_preview_version_with_service_terms_accepted': 'bool', 'is_auto_scaling_enabled': 'bool', + 'is_dev_tier': 'bool', 'is_dedicated': 'bool', 'autonomous_container_database_id': 'str', 'in_memory_percentage': 'int', @@ -291,6 +296,7 @@ def __init__(self, **kwargs): 'license_model': 'licenseModel', 'is_preview_version_with_service_terms_accepted': 'isPreviewVersionWithServiceTermsAccepted', 'is_auto_scaling_enabled': 'isAutoScalingEnabled', + 'is_dev_tier': 'isDevTier', 'is_dedicated': 'isDedicated', 'autonomous_container_database_id': 'autonomousContainerDatabaseId', 'in_memory_percentage': 'inMemoryPercentage', @@ -341,6 +347,7 @@ def __init__(self, **kwargs): self._license_model = None self._is_preview_version_with_service_terms_accepted = None self._is_auto_scaling_enabled = None + self._is_dev_tier = None self._is_dedicated = None self._autonomous_container_database_id = None self._in_memory_percentage = None diff --git a/src/oci/database/models/create_autonomous_database_from_backup_details.py b/src/oci/database/models/create_autonomous_database_from_backup_details.py index e921d9748..1e9f7d443 100644 --- a/src/oci/database/models/create_autonomous_database_from_backup_details.py +++ b/src/oci/database/models/create_autonomous_database_from_backup_details.py @@ -112,6 +112,10 @@ def __init__(self, **kwargs): The value to assign to the is_auto_scaling_enabled property of this CreateAutonomousDatabaseFromBackupDetails. :type is_auto_scaling_enabled: bool + :param is_dev_tier: + The value to assign to the is_dev_tier property of this CreateAutonomousDatabaseFromBackupDetails. + :type is_dev_tier: bool + :param is_dedicated: The value to assign to the is_dedicated property of this CreateAutonomousDatabaseFromBackupDetails. :type is_dedicated: bool @@ -257,6 +261,7 @@ def __init__(self, **kwargs): 'license_model': 'str', 'is_preview_version_with_service_terms_accepted': 'bool', 'is_auto_scaling_enabled': 'bool', + 'is_dev_tier': 'bool', 'is_dedicated': 'bool', 'autonomous_container_database_id': 'str', 'in_memory_percentage': 'int', @@ -310,6 +315,7 @@ def __init__(self, **kwargs): 'license_model': 'licenseModel', 'is_preview_version_with_service_terms_accepted': 'isPreviewVersionWithServiceTermsAccepted', 'is_auto_scaling_enabled': 'isAutoScalingEnabled', + 'is_dev_tier': 'isDevTier', 'is_dedicated': 'isDedicated', 'autonomous_container_database_id': 'autonomousContainerDatabaseId', 'in_memory_percentage': 'inMemoryPercentage', @@ -362,6 +368,7 @@ def __init__(self, **kwargs): self._license_model = None self._is_preview_version_with_service_terms_accepted = None self._is_auto_scaling_enabled = None + self._is_dev_tier = None self._is_dedicated = None self._autonomous_container_database_id = None self._in_memory_percentage = None diff --git a/src/oci/database/models/create_autonomous_database_from_backup_timestamp_details.py b/src/oci/database/models/create_autonomous_database_from_backup_timestamp_details.py index 6aa6ee7d1..3bad9dcc5 100644 --- a/src/oci/database/models/create_autonomous_database_from_backup_timestamp_details.py +++ b/src/oci/database/models/create_autonomous_database_from_backup_timestamp_details.py @@ -112,6 +112,10 @@ def __init__(self, **kwargs): The value to assign to the is_auto_scaling_enabled property of this CreateAutonomousDatabaseFromBackupTimestampDetails. :type is_auto_scaling_enabled: bool + :param is_dev_tier: + The value to assign to the is_dev_tier property of this CreateAutonomousDatabaseFromBackupTimestampDetails. + :type is_dev_tier: bool + :param is_dedicated: The value to assign to the is_dedicated property of this CreateAutonomousDatabaseFromBackupTimestampDetails. :type is_dedicated: bool @@ -265,6 +269,7 @@ def __init__(self, **kwargs): 'license_model': 'str', 'is_preview_version_with_service_terms_accepted': 'bool', 'is_auto_scaling_enabled': 'bool', + 'is_dev_tier': 'bool', 'is_dedicated': 'bool', 'autonomous_container_database_id': 'str', 'in_memory_percentage': 'int', @@ -320,6 +325,7 @@ def __init__(self, **kwargs): 'license_model': 'licenseModel', 'is_preview_version_with_service_terms_accepted': 'isPreviewVersionWithServiceTermsAccepted', 'is_auto_scaling_enabled': 'isAutoScalingEnabled', + 'is_dev_tier': 'isDevTier', 'is_dedicated': 'isDedicated', 'autonomous_container_database_id': 'autonomousContainerDatabaseId', 'in_memory_percentage': 'inMemoryPercentage', @@ -374,6 +380,7 @@ def __init__(self, **kwargs): self._license_model = None self._is_preview_version_with_service_terms_accepted = None self._is_auto_scaling_enabled = None + self._is_dev_tier = None self._is_dedicated = None self._autonomous_container_database_id = None self._in_memory_percentage = None diff --git a/src/oci/database/models/create_cross_region_autonomous_database_data_guard_details.py b/src/oci/database/models/create_cross_region_autonomous_database_data_guard_details.py index bd058169c..859bde689 100644 --- a/src/oci/database/models/create_cross_region_autonomous_database_data_guard_details.py +++ b/src/oci/database/models/create_cross_region_autonomous_database_data_guard_details.py @@ -148,6 +148,10 @@ def __init__(self, **kwargs): The value to assign to the is_auto_scaling_enabled property of this CreateCrossRegionAutonomousDatabaseDataGuardDetails. :type is_auto_scaling_enabled: bool + :param is_dev_tier: + The value to assign to the is_dev_tier property of this CreateCrossRegionAutonomousDatabaseDataGuardDetails. + :type is_dev_tier: bool + :param is_dedicated: The value to assign to the is_dedicated property of this CreateCrossRegionAutonomousDatabaseDataGuardDetails. :type is_dedicated: bool @@ -288,6 +292,7 @@ def __init__(self, **kwargs): 'license_model': 'str', 'is_preview_version_with_service_terms_accepted': 'bool', 'is_auto_scaling_enabled': 'bool', + 'is_dev_tier': 'bool', 'is_dedicated': 'bool', 'autonomous_container_database_id': 'str', 'in_memory_percentage': 'int', @@ -340,6 +345,7 @@ def __init__(self, **kwargs): 'license_model': 'licenseModel', 'is_preview_version_with_service_terms_accepted': 'isPreviewVersionWithServiceTermsAccepted', 'is_auto_scaling_enabled': 'isAutoScalingEnabled', + 'is_dev_tier': 'isDevTier', 'is_dedicated': 'isDedicated', 'autonomous_container_database_id': 'autonomousContainerDatabaseId', 'in_memory_percentage': 'inMemoryPercentage', @@ -391,6 +397,7 @@ def __init__(self, **kwargs): self._license_model = None self._is_preview_version_with_service_terms_accepted = None self._is_auto_scaling_enabled = None + self._is_dev_tier = None self._is_dedicated = None self._autonomous_container_database_id = None self._in_memory_percentage = None diff --git a/src/oci/database/models/create_cross_region_disaster_recovery_details.py b/src/oci/database/models/create_cross_region_disaster_recovery_details.py index 219534b68..8b993cbcd 100644 --- a/src/oci/database/models/create_cross_region_disaster_recovery_details.py +++ b/src/oci/database/models/create_cross_region_disaster_recovery_details.py @@ -144,6 +144,10 @@ def __init__(self, **kwargs): The value to assign to the is_auto_scaling_enabled property of this CreateCrossRegionDisasterRecoveryDetails. :type is_auto_scaling_enabled: bool + :param is_dev_tier: + The value to assign to the is_dev_tier property of this CreateCrossRegionDisasterRecoveryDetails. + :type is_dev_tier: bool + :param is_dedicated: The value to assign to the is_dedicated property of this CreateCrossRegionDisasterRecoveryDetails. :type is_dedicated: bool @@ -292,6 +296,7 @@ def __init__(self, **kwargs): 'license_model': 'str', 'is_preview_version_with_service_terms_accepted': 'bool', 'is_auto_scaling_enabled': 'bool', + 'is_dev_tier': 'bool', 'is_dedicated': 'bool', 'autonomous_container_database_id': 'str', 'in_memory_percentage': 'int', @@ -346,6 +351,7 @@ def __init__(self, **kwargs): 'license_model': 'licenseModel', 'is_preview_version_with_service_terms_accepted': 'isPreviewVersionWithServiceTermsAccepted', 'is_auto_scaling_enabled': 'isAutoScalingEnabled', + 'is_dev_tier': 'isDevTier', 'is_dedicated': 'isDedicated', 'autonomous_container_database_id': 'autonomousContainerDatabaseId', 'in_memory_percentage': 'inMemoryPercentage', @@ -399,6 +405,7 @@ def __init__(self, **kwargs): self._license_model = None self._is_preview_version_with_service_terms_accepted = None self._is_auto_scaling_enabled = None + self._is_dev_tier = None self._is_dedicated = None self._autonomous_container_database_id = None self._in_memory_percentage = None diff --git a/src/oci/database/models/create_refreshable_autonomous_database_clone_details.py b/src/oci/database/models/create_refreshable_autonomous_database_clone_details.py index ac7739e6b..71b5b9f88 100644 --- a/src/oci/database/models/create_refreshable_autonomous_database_clone_details.py +++ b/src/oci/database/models/create_refreshable_autonomous_database_clone_details.py @@ -112,6 +112,10 @@ def __init__(self, **kwargs): The value to assign to the is_auto_scaling_enabled property of this CreateRefreshableAutonomousDatabaseCloneDetails. :type is_auto_scaling_enabled: bool + :param is_dev_tier: + The value to assign to the is_dev_tier property of this CreateRefreshableAutonomousDatabaseCloneDetails. + :type is_dev_tier: bool + :param is_dedicated: The value to assign to the is_dedicated property of this CreateRefreshableAutonomousDatabaseCloneDetails. :type is_dedicated: bool @@ -257,6 +261,7 @@ def __init__(self, **kwargs): 'license_model': 'str', 'is_preview_version_with_service_terms_accepted': 'bool', 'is_auto_scaling_enabled': 'bool', + 'is_dev_tier': 'bool', 'is_dedicated': 'bool', 'autonomous_container_database_id': 'str', 'in_memory_percentage': 'int', @@ -310,6 +315,7 @@ def __init__(self, **kwargs): 'license_model': 'licenseModel', 'is_preview_version_with_service_terms_accepted': 'isPreviewVersionWithServiceTermsAccepted', 'is_auto_scaling_enabled': 'isAutoScalingEnabled', + 'is_dev_tier': 'isDevTier', 'is_dedicated': 'isDedicated', 'autonomous_container_database_id': 'autonomousContainerDatabaseId', 'in_memory_percentage': 'inMemoryPercentage', @@ -362,6 +368,7 @@ def __init__(self, **kwargs): self._license_model = None self._is_preview_version_with_service_terms_accepted = None self._is_auto_scaling_enabled = None + self._is_dev_tier = None self._is_dedicated = None self._autonomous_container_database_id = None self._in_memory_percentage = None diff --git a/src/oci/database/models/update_autonomous_database_details.py b/src/oci/database/models/update_autonomous_database_details.py index 24c310a9c..56cb05349 100644 --- a/src/oci/database/models/update_autonomous_database_details.py +++ b/src/oci/database/models/update_autonomous_database_details.py @@ -107,6 +107,10 @@ def __init__(self, **kwargs): The value to assign to the long_term_backup_schedule property of this UpdateAutonomousDatabaseDetails. :type long_term_backup_schedule: oci.database.models.LongTermBackUpScheduleDetails + :param is_dev_tier: + The value to assign to the is_dev_tier property of this UpdateAutonomousDatabaseDetails. + :type is_dev_tier: bool + :param compute_count: The value to assign to the compute_count property of this UpdateAutonomousDatabaseDetails. :type compute_count: float @@ -276,6 +280,7 @@ def __init__(self, **kwargs): 'local_adg_auto_failover_max_data_loss_limit': 'int', 'cpu_core_count': 'int', 'long_term_backup_schedule': 'LongTermBackUpScheduleDetails', + 'is_dev_tier': 'bool', 'compute_count': 'float', 'ocpu_count': 'float', 'data_storage_size_in_tbs': 'int', @@ -324,6 +329,7 @@ def __init__(self, **kwargs): 'local_adg_auto_failover_max_data_loss_limit': 'localAdgAutoFailoverMaxDataLossLimit', 'cpu_core_count': 'cpuCoreCount', 'long_term_backup_schedule': 'longTermBackupSchedule', + 'is_dev_tier': 'isDevTier', 'compute_count': 'computeCount', 'ocpu_count': 'ocpuCount', 'data_storage_size_in_tbs': 'dataStorageSizeInTBs', @@ -371,6 +377,7 @@ def __init__(self, **kwargs): self._local_adg_auto_failover_max_data_loss_limit = None self._cpu_core_count = None self._long_term_backup_schedule = None + self._is_dev_tier = None self._compute_count = None self._ocpu_count = None self._data_storage_size_in_tbs = None @@ -572,6 +579,30 @@ def long_term_backup_schedule(self, long_term_backup_schedule): """ self._long_term_backup_schedule = long_term_backup_schedule + @property + def is_dev_tier(self): + """ + Gets the is_dev_tier of this UpdateAutonomousDatabaseDetails. + This project introduces Autonomous Database for Developers (ADB-Dev), a free tier on dedicated infrastructure, and Cloud@Customer for database development purposes. ADB-Dev enables ExaDB customers to experiment with ADB for free and incentivizes enterprises to use ADB for new development projects.Note that ADB-Dev have 4 CPU and 20GB of memory. For ADB-Dev , memory and CPU cannot be scaled + + + :return: The is_dev_tier of this UpdateAutonomousDatabaseDetails. + :rtype: bool + """ + return self._is_dev_tier + + @is_dev_tier.setter + def is_dev_tier(self, is_dev_tier): + """ + Sets the is_dev_tier of this UpdateAutonomousDatabaseDetails. + This project introduces Autonomous Database for Developers (ADB-Dev), a free tier on dedicated infrastructure, and Cloud@Customer for database development purposes. ADB-Dev enables ExaDB customers to experiment with ADB for free and incentivizes enterprises to use ADB for new development projects.Note that ADB-Dev have 4 CPU and 20GB of memory. For ADB-Dev , memory and CPU cannot be scaled + + + :param is_dev_tier: The is_dev_tier of this UpdateAutonomousDatabaseDetails. + :type: bool + """ + self._is_dev_tier = is_dev_tier + @property def compute_count(self): """ diff --git a/src/oci/version.py b/src/oci/version.py index acfa268c4..46454c797 100644 --- a/src/oci/version.py +++ b/src/oci/version.py @@ -2,4 +2,4 @@ # Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -__version__ = "2.124.0" +__version__ = "2.124.1"